Hi Eoghan,

I did a few tests and it looks like if I try to connect to the process from
JConsole it doesn't show CXF JMX stats. If I create a new connection using
JMX URL and username/password (cxf/cxf) I do see the CXF MBean appearing.

Thanks for the help.

Regards,

Ulhas Bhole

I just did a few tests

I just tried it on 2 different machines (Linux and Mac) using JDK 1.5
On Fri, Mar 19, 2010 at 10:05 AM, Ulhas Bhole <apachema...@gmail.com> wrote:

> Thanks Eoghan for quick reply. I will try to update build.xml target and
> check. I was putting cxf.xml in $CXF_HOME/samples/wsdl_first_rpclit
> directory and I think it was picked up because when I ran client it did got
> AddressAlreadyInUse for JMX port and also I could connect to the server
> using JConsole.
>
> I will try your route.
>
> Regards,
>
> Ulhas Bhole
>
>
> On Thu, Mar 18, 2010 at 10:05 PM, Eoghan Glynn <eogl...@gmail.com> wrote:
>
>> 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 <apachema...@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
>> >
>>
>
>

Reply via email to