Re: Giving anonymous processors an identity - is there an annoation for that?
will this work with the camel:dot task in maven? If you do not override the toString() method in your org.apache.camel.Processor, the text in the output .png file just shows as a class instance string. On Sat, Oct 9, 2010 at 2:03 AM, Claus Ibsen claus.ib...@gmail.com wrote: Hi Its a known issue with the tracer when it gets a bit more complex when using interceptors etc. Its listed in the known issue section in the release notes. And we got a couple of JIRA tickets about this. A rework on internals in Camel 3 should help us make this work better than we currently can do in 2.x. On Fri, Oct 8, 2010 at 11:22 PM, Christian Müller christian.muel...@gmail.com wrote: Hello Claus, hello Ade! I modified the test a bit on my machine. I added the following two lines to enable the default tracer: {code:java} context.setTracing(true); context.getInterceptStrategies().add(new Tracer()); {code} I received the following log statements: {code} 2010-10-08 23:13:14,164 [main ] INFO Tracer - ID-christian-muellers-macbook-pro-local-56443-1286572393506-0-2 (foo) from(direct://start) -- log://foo Pattern:InOnly, BodyType:String, Body:Hello World 2010-10-08 23:13:14,165 [main ] INFO foo - Exchange[ExchangePattern:InOnly, BodyType:String, Body:Hello World] 2010-10-08 23:13:14,168 [main ] INFO Tracer - ID-christian-muellers-macbook-pro-local-56443-1286572393506-0-2 (foo) log://foo -- org.apache.camel.processor.inlinedprocessoridtest$...@786c1a82 Pattern:InOnly, BodyType:String, Body:Hello World 2010-10-08 23:13:14,169 [main ] INFO Tracer - ID-christian-muellers-macbook-pro-local-56443-1286572393506-0-2 (foo) org.apache.camel.processor.inlinedprocessoridtest$...@786c1a82 -- mock://result Pattern:InOnly, Headers:{foo=123}, BodyType:String, Body:Hello World {code} That's not what we want, is it? Instead of log://foo -- org.apache.camel.processor.inlinedprocessoridtest$...@786c1a82 I expected log -- inlined. Have a nice weekend, Christian P.S. Looking forward to the FUSE community day in Paris. -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Re: Giving anonymous processors an identity - is there an annoation for that?
Hi Its a known issue with the tracer when it gets a bit more complex when using interceptors etc. Its listed in the known issue section in the release notes. And we got a couple of JIRA tickets about this. A rework on internals in Camel 3 should help us make this work better than we currently can do in 2.x. On Fri, Oct 8, 2010 at 11:22 PM, Christian Müller christian.muel...@gmail.com wrote: Hello Claus, hello Ade! I modified the test a bit on my machine. I added the following two lines to enable the default tracer: {code:java} context.setTracing(true); context.getInterceptStrategies().add(new Tracer()); {code} I received the following log statements: {code} 2010-10-08 23:13:14,164 [main ] INFO Tracer - ID-christian-muellers-macbook-pro-local-56443-1286572393506-0-2 (foo) from(direct://start) -- log://foo Pattern:InOnly, BodyType:String, Body:Hello World 2010-10-08 23:13:14,165 [main ] INFO foo - Exchange[ExchangePattern:InOnly, BodyType:String, Body:Hello World] 2010-10-08 23:13:14,168 [main ] INFO Tracer - ID-christian-muellers-macbook-pro-local-56443-1286572393506-0-2 (foo) log://foo -- org.apache.camel.processor.inlinedprocessoridtest$...@786c1a82 Pattern:InOnly, BodyType:String, Body:Hello World 2010-10-08 23:13:14,169 [main ] INFO Tracer - ID-christian-muellers-macbook-pro-local-56443-1286572393506-0-2 (foo) org.apache.camel.processor.inlinedprocessoridtest$...@786c1a82 -- mock://result Pattern:InOnly, Headers:{foo=123}, BodyType:String, Body:Hello World {code} That's not what we want, is it? Instead of log://foo -- org.apache.camel.processor.inlinedprocessoridtest$...@786c1a82 I expected log -- inlined. Have a nice weekend, Christian P.S. Looking forward to the FUSE community day in Paris. -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Giving anonymous processors an identity - is there an annoation for that?
Is it possible to give an anonymous inline Processor an identity using a Java annotation? Am thinking that this would be great for trace or audit purposes, where you want a tracer or interceptor to log/audit that a particular processor on the route has been invoked. I'm not sure if you can put an annotation on an inline anonymous class; however, we could perhaps simply annotate the process() method. Something like this: from(...) .process(new Processor() { @Processor(label = doImportantStuff) public void process(Exchange ex) throws Exception { } }); Does such an annotation exist in Camel? If not, then do you think this is a good idea? -- View this message in context: http://camel.465427.n5.nabble.com/Giving-anonymous-processors-an-identity-is-there-an-annoation-for-that-tp3204380p3204380.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Giving anonymous processors an identity - is there an annoation for that?
Hi Maybe we should make sure you can use .id(xxx) as the rest of the DSL with an inlined anonym as well. I actually don't know if you can do that. But I can check it out :) On Fri, Oct 8, 2010 at 12:31 PM, Ade adrian.trena...@googlemail.com wrote: Is it possible to give an anonymous inline Processor an identity using a Java annotation? Am thinking that this would be great for trace or audit purposes, where you want a tracer or interceptor to log/audit that a particular processor on the route has been invoked. I'm not sure if you can put an annotation on an inline anonymous class; however, we could perhaps simply annotate the process() method. Something like this: from(...) .process(new Processor() { �...@processor(label = doImportantStuff) public void process(Exchange ex) throws Exception { } }); Does such an annotation exist in Camel? If not, then do you think this is a good idea? -- View this message in context: http://camel.465427.n5.nabble.com/Giving-anonymous-processors-an-identity-is-there-an-annoation-for-that-tp3204380p3204380.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Re: Giving anonymous processors an identity - is there an annoation for that?
On Fri, Oct 8, 2010 at 1:45 PM, Claus Ibsen claus.ib...@gmail.com wrote: Hi Maybe we should make sure you can use .id(xxx) as the rest of the DSL with an inlined anonym as well. I actually don't know if you can do that. But I can check it out :) Works fine see http://svn.apache.org/viewvc?rev=1005791view=rev On Fri, Oct 8, 2010 at 12:31 PM, Ade adrian.trena...@googlemail.com wrote: Is it possible to give an anonymous inline Processor an identity using a Java annotation? Am thinking that this would be great for trace or audit purposes, where you want a tracer or interceptor to log/audit that a particular processor on the route has been invoked. I'm not sure if you can put an annotation on an inline anonymous class; however, we could perhaps simply annotate the process() method. Something like this: from(...) .process(new Processor() { �...@processor(label = doImportantStuff) public void process(Exchange ex) throws Exception { } }); Does such an annotation exist in Camel? If not, then do you think this is a good idea? -- View this message in context: http://camel.465427.n5.nabble.com/Giving-anonymous-processors-an-identity-is-there-an-annoation-for-that-tp3204380p3204380.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Re: Giving anonymous processors an identity - is there an annoation for that?
Sweet! Very, very nice. Thanks Claus! Am now compelled to buy you a beer at the FUSE Community Day in Paris next week :) On 08/10/2010 12:59, Claus Ibsen wrote: On Fri, Oct 8, 2010 at 1:45 PM, Claus Ibsenclaus.ib...@gmail.com wrote: Hi Maybe we should make sure you can use .id(xxx) as the rest of the DSL with an inlined anonym as well. I actually don't know if you can do that. But I can check it out :) Works fine see http://svn.apache.org/viewvc?rev=1005791view=rev On Fri, Oct 8, 2010 at 12:31 PM, Adeadrian.trena...@googlemail.com wrote: Is it possible to give an anonymous inline Processor an identity using a Java annotation? Am thinking that this would be great for trace or audit purposes, where you want a tracer or interceptor to log/audit that a particular processor on the route has been invoked. I'm not sure if you can put an annotation on an inline anonymous class; however, we could perhaps simply annotate the process() method. Something like this: from(...) .process(new Processor() { @Processor(label = doImportantStuff) public void process(Exchange ex) throws Exception { } }); Does such an annotation exist in Camel? If not, then do you think this is a good idea? -- View this message in context: http://camel.465427.n5.nabble.com/Giving-anonymous-processors-an-identity-is-there-an-annoation-for-that-tp3204380p3204380.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Re: Giving anonymous processors an identity - is there an annoation for that?
On Fri, Oct 8, 2010 at 2:01 PM, Adrian Trenaman trena...@progress.com wrote: Sweet! Very, very nice. Thanks Claus! Am now compelled to buy you a beer at the FUSE Community Day in Paris next week :) Cool didn't you bring back some Victorian Bitters from down under ? But hey I bet everybody got reasons to buy a round of beer. On 08/10/2010 12:59, Claus Ibsen wrote: On Fri, Oct 8, 2010 at 1:45 PM, Claus Ibsenclaus.ib...@gmail.com wrote: Hi Maybe we should make sure you can use .id(xxx) as the rest of the DSL with an inlined anonym as well. I actually don't know if you can do that. But I can check it out :) Works fine see http://svn.apache.org/viewvc?rev=1005791view=rev On Fri, Oct 8, 2010 at 12:31 PM, Adeadrian.trena...@googlemail.com wrote: Is it possible to give an anonymous inline Processor an identity using a Java annotation? Am thinking that this would be great for trace or audit purposes, where you want a tracer or interceptor to log/audit that a particular processor on the route has been invoked. I'm not sure if you can put an annotation on an inline anonymous class; however, we could perhaps simply annotate the process() method. Something like this: from(...) .process(new Processor() { �...@processor(label = doImportantStuff) public void process(Exchange ex) throws Exception { } }); Does such an annotation exist in Camel? If not, then do you think this is a good idea? -- View this message in context: http://camel.465427.n5.nabble.com/Giving-anonymous-processors-an-identity-is-there-an-annoation-for-that-tp3204380p3204380.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Re: Giving anonymous processors an identity - is there an annoation for that?
Any Victorian Bitters I encountered, I swiftly quaffed ;) On 08/10/2010 13:05, Claus Ibsen wrote: On Fri, Oct 8, 2010 at 2:01 PM, Adrian Trenamantrena...@progress.com wrote: Sweet! Very, very nice. Thanks Claus! Am now compelled to buy you a beer at the FUSE Community Day in Paris next week :) Cool didn't you bring back some Victorian Bitters from down under ? But hey I bet everybody got reasons to buy a round of beer. On 08/10/2010 12:59, Claus Ibsen wrote: On Fri, Oct 8, 2010 at 1:45 PM, Claus Ibsenclaus.ib...@gmail.comwrote: Hi Maybe we should make sure you can use .id(xxx) as the rest of the DSL with an inlined anonym as well. I actually don't know if you can do that. But I can check it out :) Works fine see http://svn.apache.org/viewvc?rev=1005791view=rev On Fri, Oct 8, 2010 at 12:31 PM, Adeadrian.trena...@googlemail.com wrote: Is it possible to give an anonymous inline Processor an identity using a Java annotation? Am thinking that this would be great for trace or audit purposes, where you want a tracer or interceptor to log/audit that a particular processor on the route has been invoked. I'm not sure if you can put an annotation on an inline anonymous class; however, we could perhaps simply annotate the process() method. Something like this: from(...) .process(new Processor() { @Processor(label = doImportantStuff) public void process(Exchange ex) throws Exception { } }); Does such an annotation exist in Camel? If not, then do you think this is a good idea? -- View this message in context: http://camel.465427.n5.nabble.com/Giving-anonymous-processors-an-identity-is-there-an-annoation-for-that-tp3204380p3204380.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Re: Giving anonymous processors an identity - is there an annoation for that?
Hello Claus, hello Ade! I modified the test a bit on my machine. I added the following two lines to enable the default tracer: {code:java} context.setTracing(true); context.getInterceptStrategies().add(new Tracer()); {code} I received the following log statements: {code} 2010-10-08 23:13:14,164 [main ] INFO Tracer - ID-christian-muellers-macbook-pro-local-56443-1286572393506-0-2 (foo) from(direct://start) -- log://foo Pattern:InOnly, BodyType:String, Body:Hello World 2010-10-08 23:13:14,165 [main ] INFO foo- Exchange[ExchangePattern:InOnly, BodyType:String, Body:Hello World] 2010-10-08 23:13:14,168 [main ] INFO Tracer - ID-christian-muellers-macbook-pro-local-56443-1286572393506-0-2 (foo) log://foo -- org.apache.camel.processor.inlinedprocessoridtest$...@786c1a82 Pattern:InOnly, BodyType:String, Body:Hello World 2010-10-08 23:13:14,169 [main ] INFO Tracer - ID-christian-muellers-macbook-pro-local-56443-1286572393506-0-2 (foo) org.apache.camel.processor.inlinedprocessoridtest$...@786c1a82 -- mock://result Pattern:InOnly, Headers:{foo=123}, BodyType:String, Body:Hello World {code} That's not what we want, is it? Instead of log://foo -- org.apache.camel.processor.inlinedprocessoridtest$...@786c1a82 I expected log -- inlined. Have a nice weekend, Christian P.S. Looking forward to the FUSE community day in Paris.