You may consider to inject a ProducerTemplate into t your bean like this[1]

Then you can send the message to the JMS endpoint as you want.

[1]http://camel.apache.org/pojo-producing.html

On Mon Mar  5 08:01:53 2012, Fitzcaraldo wrote:
Hi

I want to develop a bean that will write a copy of the message at various
points passing through a Camel route.  Something like as follows:

from(foo:bar).bean("MyClass", "input")
.to(foo:bar).bean("MyClass", "output")

Inside the MyClass bean I want to be able to write to a jms log queue.  Is
there anyway I can leverage an camel endpoint to do that or do I need to use
raw JMS?  If JMS is the anyway I can get hold of the existing JMS
connection?

Thanks

--
View this message in context: 
http://camel.465427.n5.nabble.com/Accessing-Endpoint-within-bean-tp5536081p5536081.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

Reply via email to