Thread.currentThread().setContextClassLoader(loader);
JBossASEmbeddedServer server = JBossASEmbeddedServerFactory.createServer(loader);
JBossASServerConfig config = server.getConfiguration();
config.jbossHome(jbossHome);
config.serverName(serverName);
config.bindAddress(bindAddress);
try
{
server.start();