JBoss Community

Re: MBeanServer and TCL for MBeans

created by Thomas Diesler in JBoss AS7 Development - View the full discussion

Kabir,

 

it seems that this fixes an issue in one place but has negative effect in other places. The remote jsr160 connection does not seem to see MBeans that were registered in the injected MBeanServer.

 

[JBAS-8581] TcclMBeanServer breaks remote MBeanServer access

 

In other places we have could like this

 

   /**
    * Find or create the MBeanServer
    */
   public static MBeanServer findOrCreateMBeanServer()
   {
      MBeanServer mbeanServer = null;
      ArrayList<MBeanServer> serverArr = MBeanServerFactory.findMBeanServer(null);
      if (serverArr.size() > 1)
         log.warn("Multiple MBeanServer instances: " + serverArr);
      if (serverArr.size() > 0)
         mbeanServer = serverArr.get(0);
      if (mbeanServer == null)
      {
         log.debug("No MBeanServer, create one ...");
         mbeanServer = MBeanServerFactory.createMBeanServer();
      }
      return mbeanServer;
   }

 

 

which now also does not work any more.

 

I suppose there should only be one MBeanServer in AS7 that all components share and that the jsr160 connector connects to. The code above also comes from third party that does not have access to the MBeanServerService

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community