0 Replies Latest reply on Aug 25, 2008 8:04 AM by viniciuscarvalho

    Can't get a dependency on jboss.ws:service=EndpointRegistry

    viniciuscarvalho

      Hello there! I've created MBeans several times on jboss, and I can't find what am I missing here.

      I'm developing a DatabaseRecordProcessor, it's start method looks like this:

       public void start() throws Exception{
       try
       {
       MBeanServer server = MBeanServerLocator.locate();
       ManagedEndpointRegistryMBean registry = (ManagedEndpointRegistryMBean)MBeanProxyExt.create(ManagedEndpointRegistryMBean.class, "jboss.ws:service=EndpointRegistry");
      
       Set<ObjectName> names = registry.getEndpoints();
       for(ObjectName o : names){
       ((ManagedEndpointMBean)MBeanProxyExt.create(ManagedEndpointMBean.class, o)).addRecordProcessor(this);
       }
       }
       catch (Exception e)
       {
       e.printStackTrace();
       }
      
       }
      


      and the jboss-service:

      <?xml version="1.0" encoding="UTF-8"?>
      <server>
      <mbean name="bobsam:service=DatabaseRecordProcessor" code="com.furiousbob.management.DatabaseRecordProcessor">
       <depends>jboss.ws:service=EndpointRegistry</depends>
      </mbean>
      
      </server>
      


      Well, it all seems ok. But it never gets installed, the jmx-core complains about jboss.ws:service=EndpointRegistry is NOTINSTALLED.

      What's funny is that: if I remove the dependency and put my sar on the deploy.last it works fine. What I can't understand is why the dependency mechanism is not working for jboss.ws mbeans?

      Regards