[jboss-user] [Management, JMX/JBoss] - Binding MBean to JNDI
madeinstein
do-not-reply at jboss.com
Fri Jun 20 12:16:33 EDT 2008
Hi i've found this article that explains how to bind MBean to JNDI
http://wiki.jboss.org/wiki/BindMBeanToJNDI
But for some reason I can't get the object back using JNDI lookup, it's always null
| Object obj = remoteCtx.lookup("service/Engine");
| Assert.assertNotNull(obj);
|
The jndi is correct for sure because there is no NamingException and I can see the name in JndiView
I've added some debuging code to rebind() method to be sure that the object is being put to the Context but this look ok, see below.
| Name fullName = rootCtx.getNameParser("").parse(jndiName);
| System.out.println("Binding to '"+fullName+"' object: "+getObjectToBind());
| NonSerializableFactory.rebind(fullName, getObjectToBind(), true);
|
output
| [STDOUT] Binding to 'service/Engine' object: core.EngineService at 4e94a4
|
Any ideas what's missing?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159605#4159605
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159605
More information about the jboss-user
mailing list