You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Claus Ibsen <ci...@silverbullet.dk> on 2008/06/24 09:44:10 UTC

JMX - spring-jms example - strange mbean name - try on your laptop please

Hi

I have enabled the JMX connector on the spring-jms example in the trunk.
Could you try to see from jconsole if your computer also reports the jms queue route with a strange name

How-to
======
svn up
cd examples/camel-example-spring-jms
mvn compile exec:java -PCamelServer

start jconsole
connect to the service URI reported from the console logginf from the CamelServer (service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi)
browse and see if any names are strange.

On my laptop the jms queues has a strange name. See the screenshot on the CAMEL-627 ticket.



Med venlig hilsen

Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk


Re: JMX - spring-jms example - strange mbean name - try on your laptop please

Posted by Willem Jiang <wi...@gmail.com>.
Sure, I will take care of it.

Willem

Claus Ibsen wrote:
> Hi
>
> Ah it need to use replaceAll and not just replace since there can be more tokens in the name. 
>
> Willem can you try with the replaceAll and see if it works? I am at work.
>
>
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
> -----Original Message-----
> From: Willem Jiang [mailto:willem.jiang@gmail.com] 
> Sent: 24. juni 2008 11:32
> To: camel-dev@activemq.apache.org
> Subject: Re: JMX - spring-jms example - strange mbean name - try on your laptop please
>
> Hi Claus,
>
> I got the same result with you.  After digging the code , I found it is 
> caused by the ObjectName can't contain one of :",=*?
> You can find more information in here[1]
>
> [1] 
> https://svn.apache.org/repos/asf/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/ObjectNameEncoder.java
>
> Willem
> Claus Ibsen wrote:
>   
>> Hi
>>
>> I have enabled the JMX connector on the spring-jms example in the trunk.
>> Could you try to see from jconsole if your computer also reports the jms queue route with a strange name
>>
>> How-to
>> ======
>> svn up
>> cd examples/camel-example-spring-jms
>> mvn compile exec:java -PCamelServer
>>
>> start jconsole
>> connect to the service URI reported from the console logginf from the CamelServer (service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi)
>> browse and see if any names are strange.
>>
>> On my laptop the jms queues has a strange name. See the screenshot on the CAMEL-627 ticket.
>>
>>
>>
>> Med venlig hilsen
>>
>> Claus Ibsen
>> ......................................
>> Silverbullet
>> Skovsgårdsvænget 21
>> 8362 Hørning
>> Tlf. +45 2962 7576
>> Web: www.silverbullet.dk
>>
>>
>>   
>>     
>
>
>   


RE: JMX - spring-jms example - strange mbean name - try on your laptop please

Posted by Claus Ibsen <ci...@silverbullet.dk>.
Hi

Okay the ".646039348" part is the hashcode if the endpoint is not a singleton.

Wouldn't it be better to use @ as prefix instead of dot?

So its:
[jms]queue%3anumbers@646039348

Instead of 
[jms]queue%3anumbers.646039348

Any thoughts?



Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: Claus Ibsen [mailto:ci@silverbullet.dk] 
Sent: 25. juni 2008 06:38
To: camel-dev@activemq.apache.org
Subject: RE: JMX - spring-jms example - strange mbean name - try on your laptop please

Hi

Ah it was a char based replace method - it does replace all. If the inputs was String objects then you needed to use the replaceAll.

I tried with jconsole from JDK6 and it also displayes the names "strangely".

I am curious where the why the name is translated into:
[jms]queue%3anumbers.646039348

What generates the ".646039348" part?

Okay I will fire up the debugger and see what is going on.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: Willem Jiang [mailto:willem.jiang@gmail.com] 
Sent: 24. juni 2008 14:06
To: camel-dev@activemq.apache.org
Subject: Re: JMX - spring-jms example - strange mbean name - try on your laptop please

Hi Claus,

I changed the code to use replaceAll but I got the same result.
String.replace() and String.replaceAll() are using the regex for 
replacing, so they will replace all the token that find.

Willem
Claus Ibsen wrote:
> Hi
>
> Ah it need to use replaceAll and not just replace since there can be more tokens in the name. 
>
> Willem can you try with the replaceAll and see if it works? I am at work.
>
>
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
> -----Original Message-----
> From: Willem Jiang [mailto:willem.jiang@gmail.com] 
> Sent: 24. juni 2008 11:32
> To: camel-dev@activemq.apache.org
> Subject: Re: JMX - spring-jms example - strange mbean name - try on your laptop please
>
> Hi Claus,
>
> I got the same result with you.  After digging the code , I found it is 
> caused by the ObjectName can't contain one of :",=*?
> You can find more information in here[1]
>
> [1] 
> https://svn.apache.org/repos/asf/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/ObjectNameEncoder.java
>
> Willem
> Claus Ibsen wrote:
>   
>> Hi
>>
>> I have enabled the JMX connector on the spring-jms example in the trunk.
>> Could you try to see from jconsole if your computer also reports the jms queue route with a strange name
>>
>> How-to
>> ======
>> svn up
>> cd examples/camel-example-spring-jms
>> mvn compile exec:java -PCamelServer
>>
>> start jconsole
>> connect to the service URI reported from the console logginf from the CamelServer (service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi)
>> browse and see if any names are strange.
>>
>> On my laptop the jms queues has a strange name. See the screenshot on the CAMEL-627 ticket.
>>
>>
>>
>> Med venlig hilsen
>>
>> Claus Ibsen
>> ......................................
>> Silverbullet
>> Skovsgårdsvænget 21
>> 8362 Hørning
>> Tlf. +45 2962 7576
>> Web: www.silverbullet.dk
>>
>>
>>   
>>     
>
>
>   


RE: JMX - spring-jms example - strange mbean name - try on your laptop please

Posted by Claus Ibsen <ci...@silverbullet.dk>.
Hi

Ah it was a char based replace method - it does replace all. If the inputs was String objects then you needed to use the replaceAll.

I tried with jconsole from JDK6 and it also displayes the names "strangely".

I am curious where the why the name is translated into:
[jms]queue%3anumbers.646039348

What generates the ".646039348" part?

Okay I will fire up the debugger and see what is going on.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: Willem Jiang [mailto:willem.jiang@gmail.com] 
Sent: 24. juni 2008 14:06
To: camel-dev@activemq.apache.org
Subject: Re: JMX - spring-jms example - strange mbean name - try on your laptop please

Hi Claus,

I changed the code to use replaceAll but I got the same result.
String.replace() and String.replaceAll() are using the regex for 
replacing, so they will replace all the token that find.

Willem
Claus Ibsen wrote:
> Hi
>
> Ah it need to use replaceAll and not just replace since there can be more tokens in the name. 
>
> Willem can you try with the replaceAll and see if it works? I am at work.
>
>
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
> -----Original Message-----
> From: Willem Jiang [mailto:willem.jiang@gmail.com] 
> Sent: 24. juni 2008 11:32
> To: camel-dev@activemq.apache.org
> Subject: Re: JMX - spring-jms example - strange mbean name - try on your laptop please
>
> Hi Claus,
>
> I got the same result with you.  After digging the code , I found it is 
> caused by the ObjectName can't contain one of :",=*?
> You can find more information in here[1]
>
> [1] 
> https://svn.apache.org/repos/asf/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/ObjectNameEncoder.java
>
> Willem
> Claus Ibsen wrote:
>   
>> Hi
>>
>> I have enabled the JMX connector on the spring-jms example in the trunk.
>> Could you try to see from jconsole if your computer also reports the jms queue route with a strange name
>>
>> How-to
>> ======
>> svn up
>> cd examples/camel-example-spring-jms
>> mvn compile exec:java -PCamelServer
>>
>> start jconsole
>> connect to the service URI reported from the console logginf from the CamelServer (service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi)
>> browse and see if any names are strange.
>>
>> On my laptop the jms queues has a strange name. See the screenshot on the CAMEL-627 ticket.
>>
>>
>>
>> Med venlig hilsen
>>
>> Claus Ibsen
>> ......................................
>> Silverbullet
>> Skovsgårdsvænget 21
>> 8362 Hørning
>> Tlf. +45 2962 7576
>> Web: www.silverbullet.dk
>>
>>
>>   
>>     
>
>
>   


RE: JMX - spring-jms example - strange mbean name - try on your laptop please

Posted by Claus Ibsen <ci...@silverbullet.dk>.
Hi

Okay. Maybe if the name is only for display we could replace all invalid tokens with _ so they are looking okay in the jconsole.

Jconsole can not escape %3a or whatever they have been replaced with to anything nice in the display.

Have you tried with jconsole from jdk6, maybe its working better on that platform?


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: Willem Jiang [mailto:willem.jiang@gmail.com] 
Sent: 24. juni 2008 14:06
To: camel-dev@activemq.apache.org
Subject: Re: JMX - spring-jms example - strange mbean name - try on your laptop please

Hi Claus,

I changed the code to use replaceAll but I got the same result.
String.replace() and String.replaceAll() are using the regex for 
replacing, so they will replace all the token that find.

Willem
Claus Ibsen wrote:
> Hi
>
> Ah it need to use replaceAll and not just replace since there can be more tokens in the name. 
>
> Willem can you try with the replaceAll and see if it works? I am at work.
>
>
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
> -----Original Message-----
> From: Willem Jiang [mailto:willem.jiang@gmail.com] 
> Sent: 24. juni 2008 11:32
> To: camel-dev@activemq.apache.org
> Subject: Re: JMX - spring-jms example - strange mbean name - try on your laptop please
>
> Hi Claus,
>
> I got the same result with you.  After digging the code , I found it is 
> caused by the ObjectName can't contain one of :",=*?
> You can find more information in here[1]
>
> [1] 
> https://svn.apache.org/repos/asf/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/ObjectNameEncoder.java
>
> Willem
> Claus Ibsen wrote:
>   
>> Hi
>>
>> I have enabled the JMX connector on the spring-jms example in the trunk.
>> Could you try to see from jconsole if your computer also reports the jms queue route with a strange name
>>
>> How-to
>> ======
>> svn up
>> cd examples/camel-example-spring-jms
>> mvn compile exec:java -PCamelServer
>>
>> start jconsole
>> connect to the service URI reported from the console logginf from the CamelServer (service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi)
>> browse and see if any names are strange.
>>
>> On my laptop the jms queues has a strange name. See the screenshot on the CAMEL-627 ticket.
>>
>>
>>
>> Med venlig hilsen
>>
>> Claus Ibsen
>> ......................................
>> Silverbullet
>> Skovsgårdsvænget 21
>> 8362 Hørning
>> Tlf. +45 2962 7576
>> Web: www.silverbullet.dk
>>
>>
>>   
>>     
>
>
>   


Re: JMX - spring-jms example - strange mbean name - try on your laptop please

Posted by Willem Jiang <wi...@gmail.com>.
Hi Claus,

I changed the code to use replaceAll but I got the same result.
String.replace() and String.replaceAll() are using the regex for 
replacing, so they will replace all the token that find.

Willem
Claus Ibsen wrote:
> Hi
>
> Ah it need to use replaceAll and not just replace since there can be more tokens in the name. 
>
> Willem can you try with the replaceAll and see if it works? I am at work.
>
>
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
> -----Original Message-----
> From: Willem Jiang [mailto:willem.jiang@gmail.com] 
> Sent: 24. juni 2008 11:32
> To: camel-dev@activemq.apache.org
> Subject: Re: JMX - spring-jms example - strange mbean name - try on your laptop please
>
> Hi Claus,
>
> I got the same result with you.  After digging the code , I found it is 
> caused by the ObjectName can't contain one of :",=*?
> You can find more information in here[1]
>
> [1] 
> https://svn.apache.org/repos/asf/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/ObjectNameEncoder.java
>
> Willem
> Claus Ibsen wrote:
>   
>> Hi
>>
>> I have enabled the JMX connector on the spring-jms example in the trunk.
>> Could you try to see from jconsole if your computer also reports the jms queue route with a strange name
>>
>> How-to
>> ======
>> svn up
>> cd examples/camel-example-spring-jms
>> mvn compile exec:java -PCamelServer
>>
>> start jconsole
>> connect to the service URI reported from the console logginf from the CamelServer (service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi)
>> browse and see if any names are strange.
>>
>> On my laptop the jms queues has a strange name. See the screenshot on the CAMEL-627 ticket.
>>
>>
>>
>> Med venlig hilsen
>>
>> Claus Ibsen
>> ......................................
>> Silverbullet
>> Skovsgårdsvænget 21
>> 8362 Hørning
>> Tlf. +45 2962 7576
>> Web: www.silverbullet.dk
>>
>>
>>   
>>     
>
>
>   


RE: JMX - spring-jms example - strange mbean name - try on your laptop please

Posted by Claus Ibsen <ci...@silverbullet.dk>.
Hi

Ah it need to use replaceAll and not just replace since there can be more tokens in the name. 

Willem can you try with the replaceAll and see if it works? I am at work.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: Willem Jiang [mailto:willem.jiang@gmail.com] 
Sent: 24. juni 2008 11:32
To: camel-dev@activemq.apache.org
Subject: Re: JMX - spring-jms example - strange mbean name - try on your laptop please

Hi Claus,

I got the same result with you.  After digging the code , I found it is 
caused by the ObjectName can't contain one of :",=*?
You can find more information in here[1]

[1] 
https://svn.apache.org/repos/asf/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/ObjectNameEncoder.java

Willem
Claus Ibsen wrote:
> Hi
>
> I have enabled the JMX connector on the spring-jms example in the trunk.
> Could you try to see from jconsole if your computer also reports the jms queue route with a strange name
>
> How-to
> ======
> svn up
> cd examples/camel-example-spring-jms
> mvn compile exec:java -PCamelServer
>
> start jconsole
> connect to the service URI reported from the console logginf from the CamelServer (service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi)
> browse and see if any names are strange.
>
> On my laptop the jms queues has a strange name. See the screenshot on the CAMEL-627 ticket.
>
>
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
>
>   


Re: JMX - spring-jms example - strange mbean name - try on your laptop please

Posted by Willem Jiang <wi...@gmail.com>.
Hi Claus,

I got the same result with you.  After digging the code , I found it is 
caused by the ObjectName can't contain one of :",=*?
You can find more information in here[1]

[1] 
https://svn.apache.org/repos/asf/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/management/ObjectNameEncoder.java

Willem
Claus Ibsen wrote:
> Hi
>
> I have enabled the JMX connector on the spring-jms example in the trunk.
> Could you try to see from jconsole if your computer also reports the jms queue route with a strange name
>
> How-to
> ======
> svn up
> cd examples/camel-example-spring-jms
> mvn compile exec:java -PCamelServer
>
> start jconsole
> connect to the service URI reported from the console logginf from the CamelServer (service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi)
> browse and see if any names are strange.
>
> On my laptop the jms queues has a strange name. See the screenshot on the CAMEL-627 ticket.
>
>
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
>
>