1 Reply Latest reply on Apr 7, 2010 4:43 AM by mmusgrov

    How can I access a jbossts bean via the profile service?

    mmusgrov

      I want to examine the beans defined in transaction-jboss-beans.xml via the profile service.

       

      For example to read the TransactionStatistics bean I expect to be able to do something similar to the following:

       

           InitialContext ic = new InitialContext();

           ManagementView managementView = (ManagementView) ic.lookup("java:ManagementView");

           ManagedComponent mc = managementView.getComponent("TransactionStatistics",

                 new ComponentType("jboss.jta:name=TransactionStatistics",

                 "com.arjuna.ats.arjuna.coordinator.TxStatsMBean"));

       

       

      However, I think I am supplying the wrong type/subtype pair for the ManagedComponent.

      Can anyone suggest what the correct type / subtype pair I need to use corresponding to, for example, the JMX annotation:

       
      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.jta:name=TransactionStatistics", exposedInterface=com.arjuna.ats.arjuna.coordinator.TxStatsMBean.class, registerDirectly=true)</annotation>
        • 1. Re: How can I access a jbossts bean via the profile service?
          mmusgrov

          I wasn't reading the xml file correctly - just after the JMX annotation there is the declaration of the ManagedComponent:

           

          @org.jboss.managed.api.annotation.ManagementObject(name="TransactionStatistics",componentType=@org.jboss.managed.api.annotation.ManagementComponent(type = "MCBean", subtype = "JTA"),targetInterface=com.arjuna.ats.arjuna.coordinator.TxStatsMBean.class)