Hi Maciek,

I'm agree, we haven't a clean behavior between SMX component and camel endpoints. I think the best way is to override the start() method in the camel component to rebind the camel context.

Feel free to open a Jira task on this topic.

Regards
JB

Maciej Prochniak wrote:
Hello,
We found strange (I would say - buggy) behaviour of servicemix-camel
component (SMX 3.3 + servicemix-camel 2008.01).

Basically we have camel SU using standard dead letter channel. When SA
is shutdown (e.g. because of missing components for other SUs, or using
JMX) and then started, camel route throws RejectedExecutionException.
Looking into the code it is caused by the following:

1) Camel context is created during deployment of SU
2) When shutdown is being called, the applicationContext for given SU i
s destroyed. This includes calling .stop() on camelContext.
3) When start is called the camel context is still in stopped state (but
its servicemix endpoint are still registered in SMX registry).
4) Dead letter channel throws exceptions when receiving messages while
being in stopped state.

For me, this looks like some compatibility issues between camel
endpoints lifecycle and servicemix endpoints lifecycle (this is mostly
coded in AbstractXBeanDeployer and XBeanServiceUnit). The application
context is destroyed in shutdown method, but if start is called
afterwards, endpoint beans are being used - this is rather unpleasant
behaviour in my opinion - maybe camel context should be created during
start of SU?

Could anybody comment on this?

thanks and br.
maciek prochniak

Reply via email to