// } catch (java.rmi.ConnectException e) {
//System.out.println("DEBUG: [start_MX4J_rmi] e=[" + e + "]");
server.invoke(naming, "start", null, null);
// }
JRMPAdaptor adaptorBean = new JRMPAdaptor();
server.registerMBean(adaptorBean, adaptor);
adaptorBean.setJNDIName(jndiName);
// Optionally, you can specify the JNDI properties,
// instead of having in the classpath a jndi.properties file
adaptorBean.putJNDIProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory");
adaptorBean.putJNDIProperty(javax.naming.Context.PROVIDER_URL, "rmi://localhost:1099");
// Registers the JRMP adaptor in JNDI and starts it
adaptorBean.start();
hasStarted = true;
}
}