Got it to work, finally!

Here is how to do what I did:

To enable the counter MBean - add this to your "beans.xml for the service:

        <import resource="classpath:META-INF/cxf/cxf.xml" />

        <bean id="org.apache.cxf.management.InstrumentationManager"
                
class="org.apache.cxf.management.jmx.InstrumentationManagerImpl">
                <property name="bus" ref="cxf" />
                <property name="usePlatformMBeanServer" value="true" />
                <property name="enabled" value="true" />
        </bean>
        
        <bean id="CounterRepository"
class="org.apache.cxf.management.counters.CounterRepository">
                <property name="bus" ref="cxf" />
        </bean> 


Add this dependency to your pom.xml for the service:

               <dependency>
                   <groupId>org.apache.cxf</groupId>
                   <artifactId>cxf-rt-management</artifactId>
                   <version>${cxf.version}</version>
                </dependency>

Make sure the imported packages for your Felix plugin  in the service's
pom.xml include relevant CXF packages:

                            META-INF.cxf,
                            org.apache.cxf.bus,
                            org.apache.cxf.bus.spring,
                            org.apache.cxf.bus.resource,
                            org.apache.cxf.configuration.spring,
                            org.apache.cxf.resource,
                            org.apache.cxf.management,
                            org.apache.cxf.management.jmx,
                            org.apache.cxf.management.counters,
                            org.apache.cxf.jaxws,
                            org.apache.cxf.transport.http,

The URL for viewing the MBeans from JConsole is indeed:

           service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root 

Did several black flips around the lab when this finally worked!




--
View this message in context: 
http://karaf.922171.n3.nabble.com/JMX-Karaf-2-4-1-tp4040782p4040862.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to