You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bvahdat <ba...@swissonline.ch> on 2011/09/01 09:48:09 UTC

backslashes on Endpoint URI by JConsole

Hi,

looking at the Camel's endpoints (2.8.0) in JConsole 
http://camel.465427.n5.nabble.com/file/n4757427/jconsole.jpeg jconsole.jpeg 
I see backslashes on the endpoint URI (like zls://log\...). The Camel
component "zls" is my own proprietary component which logs the message
exchanges to the central-logging-system of the client. Everthing works fine,
but just wonder where that backslashes come from as in the routes the zls
Producer is invoked like:

... to("zls:log?componentName=...&eventType=...")...

Other than that the endpoints shown as /getVersionsService
/updateUsersService and /uploadUsersService are actually servlet endpoints,
as an example the consumer URI in Java-DSL is :

from("servlet:/getVersionsService?servletName=egris-servlet")...

But in JConsole I see just /getVersionsService, however in the case of the
direct endpoint, I see what I would expected, that's "direct://continue".

Any idea?

Regards, Babak

--
View this message in context: http://camel.465427.n5.nabble.com/backslashes-on-Endpoint-URI-by-JConsole-tp4757427p4757427.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: backslashes on Endpoint URI by JConsole

Posted by Hadrian Zbarcea <hz...@gmail.com>.
This is more likely a bug. I am now looking into the Camel use of URIs 
an I am trying to cleanup as much as I can. Thanks for pointing it out.

Hadrian


On 09/01/2011 10:39 AM, bvahdat wrote:
> Hi Claus,
>
> I'll try to dig into the code to see if I can find something...
>
> FYI, enabling JMX-Agent on [1] will bring up exactly the same behaviour on
> the JConsole when one runs [2]. See the screenshot here:
> http://camel.465427.n5.nabble.com/file/n4758587/test.jpg test.jpg
>
> [1]
> https://svn.apache.org/repos/asf/camel/trunk/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/camelContext.xml
> [2]
> https://svn.apache.org/repos/asf/camel/trunk/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteSpringTest.java
>
> Regards, Babak
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/backslashes-on-Endpoint-URI-by-JConsole-tp4757427p4758587.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: backslashes on Endpoint URI by JConsole

Posted by bvahdat <ba...@swissonline.ch>.
Hi Claus,

I'll try to dig into the code to see if I can find something...

FYI, enabling JMX-Agent on [1] will bring up exactly the same behaviour on
the JConsole when one runs [2]. See the screenshot here: 
http://camel.465427.n5.nabble.com/file/n4758587/test.jpg test.jpg 

[1]
https://svn.apache.org/repos/asf/camel/trunk/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/camelContext.xml
[2]
https://svn.apache.org/repos/asf/camel/trunk/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteSpringTest.java

Regards, Babak

--
View this message in context: http://camel.465427.n5.nabble.com/backslashes-on-Endpoint-URI-by-JConsole-tp4757427p4758587.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: backslashes on Endpoint URI by JConsole

Posted by bvahdat <ba...@swissonline.ch>.
Thanks for applying the patch...

Was not aware that camel-gae depends on camel-servlet, so that I ran all
camel-servlet's own test cases to verify I don't break any existing tests by
camel-servlet itself.

Theoretically *any* change on the trunk should be verified by running
camel's *all* test cases, however that would cost me more than 3 hours for
each patch :-(

Regards, Babak 

--
View this message in context: http://camel.465427.n5.nabble.com/backslashes-on-Endpoint-URI-by-JConsole-tp4757427p4770697.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: backslashes on Endpoint URI by JConsole

Posted by bvahdat <ba...@swissonline.ch>.
Hi Willem,

just wanted to verify your changes to camel-gae through the following
revision:

http://svn.apache.org/viewvc?view=revision&revision=1165152

and realized that you've overriden the isLenientProperties() method like the
following:

    @Override
    public boolean isLenientProperties() {
        // GHttpEndpoint knows about all it's options on the passed URI
        return true;
    }

I would say either the comment or the return value is wrong, as returnung
true means that the endpoint allows additional unknown options to be passed
to it, or am I wrong?

Regards, Babak

 



--
View this message in context: http://camel.465427.n5.nabble.com/backslashes-on-Endpoint-URI-by-JConsole-tp4757427p4770859.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: backslashes on Endpoint URI by JConsole

Posted by Willem Jiang <wi...@gmail.com>.
FYI, I applied the patch into trunk and 2.8.x branch, also fix the side 
effect of patch which causes the camel-gae tests failure.
 
On Sat Sep  3 21:14:39 2011, bvahdat wrote:
> Hi Claus,
>
> Sorry for my late answer but am pretty busy these days...
>
> FIY, I create a ticket and provided a patch containing a unit test as well:
>
> https://issues.apache.org/jira/browse/CAMEL-4410
>
> Regards, Babak
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/backslashes-on-Endpoint-URI-by-JConsole-tp4757427p4765459.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang 
Weibo: willemjiang 


Re: backslashes on Endpoint URI by JConsole

Posted by bvahdat <ba...@swissonline.ch>.
Hi Claus,

Sorry for my late answer but am pretty busy these days...

FIY, I create a ticket and provided a patch containing a unit test as well:

https://issues.apache.org/jira/browse/CAMEL-4410

Regards, Babak

--
View this message in context: http://camel.465427.n5.nabble.com/backslashes-on-Endpoint-URI-by-JConsole-tp4757427p4765459.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: backslashes on Endpoint URI by JConsole

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Sep 1, 2011 at 12:14 PM, bvahdat <ba...@swissonline.ch> wrote:
> Hi again,
>
> Just saw at the screenshots of Camel WIKI itself that backslashes get
> included as soon as the endpoint are invoked with some options:
>
> http://camel.apache.org/camel-jmx.data/camel-jmx.png
>
> And it happens by the call to
>
> javax.management.ObjectName.quote(name)
>
> in the method
>
> org.apache.camel.management.DefaultManagementNamingStrategy.getObjectNameForCamelContext()
>
> And Javadoc clearly states that behaviour as well:
>
> http://download.oracle.com/javase/6/docs/api/javax/management/ObjectName.html#quote(java.lang.String)
>
> What I still don't understand is regarding my previous second question,
> that's the way the servlet endpoints are shown in JConsole:
>
> /getVersionsService

Hmm could be if ServletEndpoint have a getEndpointUri / Key which
returns a custom string.
Could you check the camel-servlet source code.


>
> instead of to my expectation
>
> servlet://getVersionsService
>
> Any idea regarding this?
>
> Regards, Babak
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/backslashes-on-Endpoint-URI-by-JConsole-tp4757427p4757778.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: backslashes on Endpoint URI by JConsole

Posted by bvahdat <ba...@swissonline.ch>.
Hi again,

Just saw at the screenshots of Camel WIKI itself that backslashes get
included as soon as the endpoint are invoked with some options:

http://camel.apache.org/camel-jmx.data/camel-jmx.png

And it happens by the call to

javax.management.ObjectName.quote(name)

in the method

org.apache.camel.management.DefaultManagementNamingStrategy.getObjectNameForCamelContext()

And Javadoc clearly states that behaviour as well:

http://download.oracle.com/javase/6/docs/api/javax/management/ObjectName.html#quote(java.lang.String)

What I still don't understand is regarding my previous second question,
that's the way the servlet endpoints are shown in JConsole:

/getVersionsService

instead of to my expectation

servlet://getVersionsService

Any idea regarding this?

Regards, Babak



--
View this message in context: http://camel.465427.n5.nabble.com/backslashes-on-Endpoint-URI-by-JConsole-tp4757427p4757778.html
Sent from the Camel - Users mailing list archive at Nabble.com.