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: [EMAIL PROTECTED]
  | 

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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to