JBoss: ver 4.0.3 SP1 (it's the same with 4.04) installing "all" packets JVM: 1.5.0_05 IDE: Netbeans 5 beta
I need to get access to the TreeCache from a servlet. So i used a EJB that find the TreeCacheMBeans and manage it. And a Servlet that lookup and use the EJB When i look for the MBeanServer from inside the EJB with the code: | server = MBeanServerLocator.locatejboss(); | the MBeanServerLocator throws an exception: java.lang.RuntimeException: javax.ejb.CreateException: java.lang.IllegalStateException: No 'jboss' MBeanServer found! It doesn't work also if I use MBeanServerLocator.locate() instead of MBeanServerLocator.locatejboss(). The method .locate() throws java.util.NoSuchElementException. The only way i found to get the MBeanServer is using this code from inside the SERVLET: List servers=MBeanServerFactory.findMBeanServer(null); | if(servers == null || servers.size() == 0) | throw new Exception("TreeCacheView.init(): no MBeanServers found"); | server=(MBeanServer)servers.get(0); But this DOESN'T work inside the EJB!! How is it? How is it possible to find the MBeanServer from the EJB? Thanks! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3926761#3926761 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3926761 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user