You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ext2 <xu...@tongtech.com> on 2011/04/01 09:20:05 UTC
destoring sequence of camel context and beans
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?
Re: destoring sequence of camel context and beans
Posted by Willem Jiang <wi...@gmail.com>.
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<xu...@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
Re: destoring sequence of camel context and beans
Posted by ext2 <xu...@tongtech.com>.
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;
============================================================================
On Fri, Apr 1, 2011 at 9:20 AM, ext2 <xu...@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.
>
>
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Re: destoring sequence of camel context and beans
Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Apr 1, 2011 at 9:20 AM, ext2 <xu...@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.
>
>
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/