camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Spring destroys camelTemplate before CamelContext
Date Fri, 10 Feb 2012 07:05:52 GMT
On Thu, Feb 9, 2012 at 12:35 AM, muhammad siddique
<abubakar.saddique@gmail.com> wrote:
> I tried removing camelTemplate from spring configuration and creating camel
> Producer template from camel context in my POJO. Here is what i got
>
> 2012-02-08 17:26:01,144 DEBUG
> [org.apache.camel.processor.DefaultErrorHandler.debug(72)] - <Failed
> delivery for exchangeId: ID-msidd-3710-1328739667175-0-17. On delivery
> attempt: 0 caught: org.apache.camel.RuntimeCamelException:
> org.springframework.beans.factory.BeanCreationNotAllowedException: Error
> creating bean with name 'camel': Singleton bean creation not allowed while
> the singletons of this factory are in destruction (Do not request a bean
> from a BeanFactory in a destroy method implementation!)>
>
>
> It looks like spring has no way to find that camel Context is the bean that
> should be destroyed first.
> I looked into code of SpringCamelContext and it doesn't implement
> SmartLifecycle interface from spring. If it does , we will probably have a
> way to tell spring its creation and destruction order.
>

If the SmartLifecycle is part of Spring 3.0 api, then that would be
possible to improve in camel-spring, as we are spring 3.0+ api
compatible.
We love contributions at Apache Camel. So take a dive into and see if
you can help with this.
http://camel.apache.org/contributing.html

> --
> View this message in context: http://camel.465427.n5.nabble.com/Spring-destroys-camelTemplate-before-CamelContext-tp5464452p5468029.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message