On 4/1/11 6:20 PM, ext2 wrote:
Thanks,Claus:
The real problem is spring doesn't understand the camel's xml schema. For
example:
<from uri="bean:beanId....">
the camel processor may dependency on a spring bean by the beanId; but the
spring know nothing about this;
So I am wondering if camel has carefully deal the destroy life cycle? I try
to check the source code of camel, but still know nothing about this;
As the bean is create by the spring, camel should not get involved with it.
You can add the depends-on in your camel context like this
<camelContext id="camel"
xmlns="http://camel.apache.org/schema/spring" depends-on="mybean">
<route>
<from uri="bean:mybean">
...
<route/>
</camelContext>
============================================================================
On Fri, Apr 1, 2011 at 9:20 AM, ext2<x...@tongtech.com> wrote:
Hi:
With spring, caml processors may depend on many beans. Could camel
will ensure the camelcontext will be destroy before all the dependencies
while spring context is destroy?
Check the spring documentation how it allows you to configure ordering
between beans. Thats normally the depends-on attribute you can use.
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Connect at CamelOne May 24-26
The Open Source Integration Conference
http://camelone.com