private Module deployJobModule(CuratorFramework client, String jobName, String jobLabel,
			RuntimeModuleDeploymentProperties properties) throws Exception {
		logger.info("Deploying job '{}'", jobName);

		String jobDeploymentPath = new JobDeploymentsPath().setJobName(jobName).setModuleLabel(jobLabel)
				.setModuleSequence(properties.getSequenceAsString()).setContainer(containerAttributes.getId()).build();

		Module module = null;
		Job job = DeploymentLoader.loadJob(client, jobName, jobFactory);
		if (job != null) {
			ModuleDescriptor moduleDescriptor = job.getJobModuleDescriptor();
			module = deployModule(moduleDescriptor, properties);

			try {
				// this indicates that the container has deployed the module
				client.create().creatingParentsIfNeeded().withMode(CreateMode.EPHEMERAL).forPath(jobDeploymentPath);

				// set a watch on this module in the job path;
				// if the node is deleted this indicates an undeployment
				client.getData().usingWatcher(jobModuleWatcher).forPath(jobDeploymentPath);
			}
			catch (KeeperException.NodeExistsException e) {
				// This could possibly happen when the container disconnects and reconnects but
				// admin leader was not available to process container removed event.
				logger.info("Module for job {} already deployed", jobName);
			}
		}

		// todo: this will return null if the job doesn't exist...needs review
		return module;
	}
Deploy the requested job.

@param client curator client
@param jobName job name
@param jobLabel job label
@param properties module deployment properties
@return Module deployed job module
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/server/container/DeploymentListener.java