4 Replies Latest reply on Sep 10, 2013 5:15 AM by arun168403

    MBeanServer  ObjectName for ejb

    arun168403

      What is the ObjectName on the MBeanServer to access the EJBs deployed.

       

      I have implementation in my application deployed in 4.2.3 to access the manage the EJBs as below:

       

      String jndiName = "jboss.j2ee:jndiName=" + gemBeanJndiNames[i] + ",service=EJB";
        ObjectName objName = new ObjectName(jndiName);
            server.invoke(objName, "stop", new Object[] {}, new String[] {});
                 wait(100000);
            server.invoke(objName, "start", new Object[] {},new String[] {});
      

       

       

      I would like to do the same when the applcation is deployed in 7.1.1.

       

      But I'm getting the exception as :

       

      javax.management.InstanceNotFoundException: jboss.j2ee:jndiName=gem/TestAccessNameSpaceObject,service=EJB
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
       at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getClassLoaderFor(DefaultMBeanServerInterceptor.java:1444)
       at com.sun.jmx.mbeanserver.JmxMBeanServer.getClassLoaderFor(JmxMBeanServer.java:1324)
       at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.pushClassLoader(PluggableMBeanServerImpl.java:588)
       at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.invoke(PluggableMBeanServerImpl.java:496)
       at org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:246)
      

       

       

       

      Whant is the Instance name to be used to achive my STOP and START logic.