camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashwin Karpe <aka...@fusesource.com>
Subject Re: Is there a way to change a bean config when testing?
Date Mon, 04 Jul 2011 19:47:11 GMT
Hi,

It is possible to do via the Registry.

You can store a bean reference in the registry and then refer to it. A
aimple way to do this is to use the "Ref" component.

http://camel.apache.org/ref.html http://camel.apache.org/ref.html 

You can also do this programmatically as shown in the Netty unit test below
where objects are bound in a registry and then referred to in the route.

https://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLTest.java?view=markup
https://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettySSLTest.java?view=markup


Hope this helps.

Cheers,

Ashwin...


-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com 
CamelOne 2011: http://fusesource.com/camel2011 
---------------------------------------------------------
--
View this message in context: http://camel.465427.n5.nabble.com/Is-there-a-way-to-change-a-bean-config-when-testing-tp4550083p4551013.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message