[ 
https://issues.apache.org/activemq/browse/SMXCOMP-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63572#action_63572
 ] 

Nickolay Martinov commented on SMXCOMP-606:
-------------------------------------------

According to JBI 1.0 specification undeploy() is more appropriate place for 
cleanup than shutDown():

6.6.2 Service Assembly Undeployment Processing
Service assemblies are undeployed using the DeploymentServiceMBean's undeploy() 
method, which takes as a parameter the unique name of the service assembly that 
is to be undeployed.
3.The implementation may clean up resources associated with the service unit 
deployment, including the file store under the root directory for the service 
unit.

6.7 Service Unit Life Cycle
Shutdown state means that both provision and consumption of services have 
ceased. 

> ApplicationContext lifecycle in XBean Component/Endpoint causes invalid state 
> of camel after shutdown+start
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: SMXCOMP-606
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-606
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-camel, servicemix-common
>    Affects Versions: servicemix-camel-2009.01, servicemix-shared-2009.01
>            Reporter: Maciej Prochniak
>         Attachments: servicemix-common.debug.patch
>
>
> When using XBeanServiceUnit and AbstractXBeanDeployer (which is the case for 
> most smx components) applicationContext is created and started during 
> deployment and closed (destroyed) during shutdown.
> However, endpoint beans are still referenced by jbi registry, and can be used 
> after SU is started. This can be quite confusing for beans performing some 
> kind of shutdown during context closing.
> Particularly, when using camel, after closing camel context some processors 
> (e.g. DeadLetterChannel) throw exception when trying to process exchange. 
> This could be fixed in two ways:
> - override defaults in camel component 
> - fix it directly in servicemix-common (not sure if and how it would affect 
> other components)
> I think that fix would have to involve refreshing/recreating 
> applicationContext in start method of SU. However, this would have to swap 
> endpoint instances in endpoint registry

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to