Onceagain thanks for ur reply,
I have written one startup Java class which first starts JBoss server and then starts our own server, for these I passed all the required parameters(for starting my server) in command line, for ur ref.,I'm using JBoss2.2.2
My code snippet:
System.out.println("************Before main of JBoss*************");
String[] arg = {"default"};
org.jboss.Main.main(arg);//the place
where we start JBOSS Server from the same JVM.
System.out.println("Before MyServer call..... ");
Myserver start = new Myserver(args); //the place where we start MyServer in the same JVM.
NameLookup lookup = new NameLookupImpl();
//Our own interface
String factory = "org.jnp.interfaces.NamingContextFactory";
// the jboss factory
String url = "localhost"; //the
jboss url
Hashtable ht = new Hashtable(2);
ht.put(Context.INITIAL_CONTEXT_FACTORY,
factory);
ht.put(Context.PROVIDER_URL, url);
Context ctx = new InitialContext(ht);
ctx.bind(name, lookup); //JNDI
bind
following exception is thrown when using JBoss2.2.2, please clarify this.Note: This same startup is working fine with JBoss2.0
[Configuration] Could not create MBean
DefaultDomain:service=Naming(org.jboss.naming.NamingService)
[Configuration] javax.management.RuntimeErrorException: Error thrown
in the MBean's empty
constructor
[Configuration] at
com.sun.management.jmx.MBeanServerImpl.internal_instantiate(MBeanServerImpl.java:2125)
[Configuration] at
com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:509)
[Configuration] at
org.jboss.configuration.ConfigurationService.create(ConfigurationService.java:340)
[Configuration] at
org.jboss.configuration.ConfigurationService.loadConfiguration(ConfigurationService.java:27
1)
[Configuration] at
java.lang.reflect.Method.invoke(Native Method)
[Configuration] at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Configuration] at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Configuration] at
org.jboss.Main.<init>(Main.java:209)
[Configuration] at
org.jboss.Main$1.run(Main.java:121)
[Configuration] at
java.security.AccessController.doPrivileged(Native Method)
[Configuration] at
org.jboss.Main.main(Main.java:117)
[Configuration] at
com.adventnet.nms.ejb.jboss.JbossStarter.startup(JbossStarter.java:31)
Thanks,
Chithuu