host = "[" + host + "]";
}
if (log.isDebugEnabled()) {
log.debug("Using JMXServiceURL with host=" + host + ", port=" + params.getPort());
}
JMXServiceURL address = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"+ host +":"+params.getPort()+"/JMXConnector");
JMXConnector jmxConnector = JMXConnectorFactory.connect(address, environment);
RemoteDeploymentManager manager = getRemoteDeploymentManager();
manager.init(jmxConnector, host);
if(!manager.isSameMachine()) {
manager.setAuthentication(username, password);