cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eoghan Glynn <eogl...@gmail.com>
Subject Re: JMX enabling in CXF 2.2.6
Date Thu, 18 Mar 2010 22:05:56 GMT
Ulhas,

How are you picking up the config file?

For example, if you're running the server via ant, you'd need to change the
server target defined in $CXF_HOME/samples/wsdl_first_rpclit/build.xml from:

    <target name="server" description="run demo server" depends="build">
        <cxfrun classname="demo.hwRPCLit.server.Server"
            param1="${basedir}/wsdl/hello_world_RPCLit.wsdl"/>
    </target>

to:

    <target name="server" description="run demo server" depends="build">
        <cxfrun classname="demo.hwRPCLit.server.Server"
            jvmarg1="-Dcxf.config.file=cxf.xml"
            param1="${basedir}/wsdl/hello_world_RPCLit.wsdl"/>
    </target>

Alternatively, you could change the
$CXF_HOME/samples/wsdl_first_rpclit/src/demo/hwRPCLit/server/Server.java to
use the SpringBusFactory to explicit identify the config file when creating
the Bus.

But obviously you must make the connection to the config in *some* way,
otherwise the intrumentation config will have no effect. BTW I just
confirmed that the CXF MBeans appear as expected with this demo using your
config file and the first approach described.

Cheers,
Eoghan


On 18 March 2010 17:24, Ulhas Bhole <apachemails@gmail.com> wrote:

> Hi,
> I am trying to enable JMX instrumentation in CXF 2.2.6 sample
> (wsdl_first_rpclit) but when I try to connect to server using JConsole I
> don't see any CXF MBeans. Do I need to do anything in addition to
> configuring Instrumentation manager?
>
> Here is my cxf.xml that I am using to enable instrumentation. I am not
> updating any implementation to collect endpoint statistics just want to see
> cxf stats first like Bus.
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>      xmlns:jaxws="http://cxf.apache.org/jaxws"
>      xmlns:cxf="http://cxf.apache.org/core"
>
>      xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
>
>
> <bean id="org.apache.cxf.management.InstrumentationManager"
>  class="org.apache.cxf.management.jmx.InstrumentationManagerImpl">
>  <property name="bus" ref="cxf" />
>  <property name="enabled" value="true" />
>  <property name="threaded" value="false" />
>  <property name="daemon" value="false" />
>  <property name="JMXServiceURL"
> value="service:jmx:rmi:///jndi/rmi://localhost:9914/jmxrmi" />
>
> </bean>
>
> <!-- Wiring the counter repository -->
>    <bean id="CounterRepository"
> class="org.apache.cxf.management.counters.CounterRepository">
>        <property name="bus" ref="cxf" />
>    </bean>
> </beans>
>
>
> Regards,
>
> Ulhas Bhole
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message