Is Camel JMX working ?
I have activated the JMX by setting the parameter <camelContext
useJmx="true" in my context
but when I launch my jconsole, the screen is desperately empty even if I try
to connect to the link mentioned in the blog service:jmx:rmi:///
Remark : I have launched my Camel context through Eclipse using
Main starter = new Main();
starter.setApplicationContextUri(spring/camelContext.xml);
starter.run(args);
Regards,
Charles
Hadrian Zbarcea wrote:
>
> Hi Arjan,
>
> Yeah, that would work. I'm glad you got it running. We'll make it
> nicer with camel-285 :).
>
> Thanks
> Hadrian
>
> Arjan Moraal wrote:
>>
>> Arjan Moraal wrote:
>>
>>> Hi Hadrian,
>>>
>>>
>>> Hadrian Zbarcea wrote:
>>>
>>>> Thanks for your interest in Camel. Enabling JMX in your code is fairly
>>>> easy. This is what you have to do:
>>>>
>>>>
>>> Thanks, I've got it working now.
>>> Can't find the actual number of messages in a seda queue though, the
>>> seda
>>> endpoints just have an uri attribute at the moment.
>>> But I guess adding current number of messages is part of the work to be
>>> done for CAMEL-285
>>>
>>>
>>
>> I managed to include the number of messages in the seda queue by adding
>> the
>> following method to ManagedEndpoint.java:
>>
>> @ManagedAttribute(description = "Messages In Queue")
>> public int getMessagesInQueue() throws Exception {
>> if (endpoint instanceof SedaEndpoint) {
>> return ((SedaEndpoint)endpoint).getQueue().size();
>> } else {
>> return -1;
>> }
>> }
>>
>> Not really an elegant solution, but it works for us for the moment.
>>
>> Thanks,
>> Arjan
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Inspecting-seda-queues-tp14685106s22882p16851040.html
Sent from the Camel - Users mailing list archive at Nabble.com.