"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
"<configuration port=\"" + port + "\">" +
" <shutdown />" +
"</configuration>";
ConfigurationLoader loader = new ConfigurationLoader(server);
loader.startup(new StringReader(config));
sleep(1000);
// Be sure we can connect to the socket
Socket socket = new Socket((String)null, port);
socket.getOutputStream().write(DefaultConfigurationBuilder.SHUTDOWN_COMMAND.getBytes());