protected ZooKeeperConnection setupZookeeperPropertySource(String zkClientConnect, boolean isEmbedded) {
			if (!StringUtils.hasText(zkClientConnect)) {
				zkClientConnect = ZooKeeperConnection.DEFAULT_CLIENT_CONNECT_STRING;
			}
			if (!StringUtils.hasText(zkNamespace)) {
				zkNamespace = Paths.XD_NAMESPACE;
			}
			if (isEmbedded) {
				zkProperties.put(EMBEDDED_ZK_CONNECT, zkClientConnect);
			}
			else {
				zkProperties.put(ZK_CONNECT, zkClientConnect);
			}
			this.environment.getPropertySources().addFirst(
					new PropertiesPropertySource(ZK_PROPERTIES_SOURCE, zkProperties));
			ZooKeeperConnection zooKeeperConnection = new ZooKeeperConnection(zkClientConnect, zkNamespace,
					zkSessionTimeout, zkConnectionTimeout, zkInitialRetryWait, zkRetryMaxAttempts);

			zooKeeperConnection.setAutoStartup(!zkConnectionConfigured);

			return zooKeeperConnection;
		}
Beans defined and imported here are shared by the XD Admin Server and Container Server.
@author David Turanski
@author Mark Fisher
@author Ilayaperumal Gopinathan
@author Gary Russell
@author Patrick Peralta
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/server/SharedServerContextConfiguration.java