0 Replies Latest reply on Jun 30, 2011 3:41 AM by navnath

    How to get MDB object programmatically

    navnath Newbie

      Hi There,


      We can Registered Destination manager using ObjectNameusing like

      ObjectName desManager = new ObjectName("jboss.mq:service=DestinationManager");

      Which you can use it to do operations on it using MBeanServer


      Same way I want object of Existing MDB. I have try following line

      ObjectName objectName = new ObjectName("jboss.j2ee:name=local/MyListenerBean,service=EJB");


      But this gives me Exception

      javax.management.InstanceNotFoundException: jboss.j2ee:name=local/MyListenerBean,service=EJB is not registered.


      Can any one suggest me how do I get MDB object?

      What will be the string I can pass to ObjectName constructor as parameter?


      Thanks in Advance.