configure(config);
config.setProperty(RemotePropertySet.USERNAME, userName);
config.setProperty(RemotePropertySet.PASSWORD, getPassword());
config.setProperty(GeneralPropertySet.HOSTNAME, hostname);
AbstractRemoteContainer container = (AbstractRemoteContainer) containerFactory.createContainer(id, ContainerType.REMOTE, config);
return container;
} else {
AbstractStandaloneLocalConfiguration config = (AbstractStandaloneLocalConfiguration) configFactory.createConfiguration(id, ContainerType.INSTALLED, ConfigurationType.STANDALONE, home);
configure(config);
AbstractInstalledLocalContainer container = (AbstractInstalledLocalContainer) containerFactory.createContainer(id, ContainerType.INSTALLED, config);
// Explicitly sets the home on the LocalContainer:
container.setHome(home);
return container;
}