if (remotingMultiplex) { startRemoting(true); }
   public void start() throws Exception   {      try      {         configureAddress();         toUnbindAtExit.clear();         jndiNamingFactory = System.getProperty("java.naming.factory.initial");         //TODO: need to think more about this; if I don't do it, though, bind() fails because it tries to use "java.naming.provider.url"         try         {            NamingManager.setInitialContextFactoryBuilder(new InVMInitialContextFactoryBuilder());         }         catch(IllegalStateException e)         {            // OK         }         Hashtable t = InVMInitialContextFactory.getJNDIEnvironment();         System.setProperty("java.naming.factory.initial",                            (String)t.get("java.naming.factory.initial"));         initialContext = new InitialContext();         boolean java5 = false;         try         {            ClassLoader cl = Thread.currentThread().getContextClassLoader();            cl.loadClass("java.lang.management.ManagementFactory");            java5 = true;         }         catch(ClassNotFoundException e)         {            // OK         }         if (java5)         {            System.setProperty("javax.management.builder.initial",                               "org.jboss.test.messaging.tools.jmx.MBeanServerBuilder");         }         mbeanServer = MBeanServerFactory.createMBeanServer("jboss");         serviceCreator = new ServiceCreator(mbeanServer);         startServiceController();         registerClassLoader();         if (database)         {            startInVMDatabase();         }         if (transaction)         {            startTransactionManager();         }         if (jca)         {            startManagedConnectionFactory();            startCachedConnectionManager();            startManagedConnectionPool();            startConnectionManager();            startWrapperDataSourceService();         }         if (remoting)         {            startRemoting();         }         if (security)         {            startSecurityManager();         }         loadJNDIContexts();         log.debug(this + " started");      }      catch(Throwable e)      {         log.error("Failed to start ServiceContainer", e);         throw new Exception("Failed to start ServiceContainer", e);      }   }