virtualHost.id = hostname;
virtualHost.host_names.add(hostname);
config.virtual_hosts.add(virtualHost);
// Configure the connectors
AcceptingConnectorDTO connector = new AcceptingConnectorDTO();
connector.connection_limit = 100;
connector.bind = "tcp://0.0.0.0:0";
config.connectors.clear();
config.connectors.add(connector);