System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory");
DeploymentManager dm = (DeploymentManager) connections.get(server.getId());
if (dm == null) {
DeploymentFactory factory = getGeronimoServer(server).getDeploymentFactory();
String deployerURL = getGeronimoServer(server).getDeployerURL();
Trace.trace(Trace.INFO, "DeployerURL: " + deployerURL);
String user = getGeronimoServer(server).getAdminID();
String pw = getGeronimoServer(server).getAdminPassword();
dm = factory.getDeploymentManager(deployerURL, user, pw);
connections.put(server.getId(), dm);
}
getGeronimoServer(server).configureDeploymentManager(dm);