3 Replies Latest reply on Aug 30, 2007 7:47 AM by shankha Bhattacharya

    MDB  InstanceNotFoundException +MBean

    shankha Bhattacharya Newbie

      I deploy a simple MDB (MessageEJB) in JBOSS.
      In the jboss.j2ee in the JMX console MBean responsible for operating the MessageEJB is JMSContainerInvoker.

      MBean Name: Domain Name: jboss.j2ee
      service: EJB
      plugin: invoker
      binding: message-driven-bean
      jndiName: local/MessageEJB@14023097
      MBean Java Class: org.jboss.ejb.plugins.jms.JMSContainerInvoker

      Binding name is


      In the code I have to look up the Object Name in the below mentioned way

      MBeanServerConnection mconn = (MBeanServerConnection)ctx.lookup("jmx/invoker/RMIAdaptor");
      ObjectName name = new ObjectName("jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/MessageEJB@32008150");
      Object val = mconn.getAttribute(name, "Name");
      ObjectInstance objInst = mconn.getObjectInstance(name);
      System.out.println(name + "\n\tObject Instance Class Name =" + objInst.getClassName());

      But for each and every time when I restart /deploy the JBOSS @32008150 is getting changed.

      And I am getting
      javax.management.InstanceNotFoundException: jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/MessageEJB@14023097 is not registered.

      How can I solve this problem?