You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Luca Burgazzoli (JIRA)" <ji...@apache.org> on 2016/04/05 12:09:25 UTC
[jira] [Commented] (CAMEL-5690) Using bean component with beans
that implement Service from Camel should have the lifecycle callbacks
invoked
[ https://issues.apache.org/jira/browse/CAMEL-5690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15226019#comment-15226019 ]
Luca Burgazzoli commented on CAMEL-5690:
----------------------------------------
Wouldn't be enough to change BeanProcessor.doStart like that:
{code:java}
protected void doStart() throws Exception {
// optimize to only get (create) a processor if really needed
if (beanHolder.supportProcessor() && allowProcessor(method, beanHolder.getBeanInfo())) {
processor = beanHolder.getProcessor();
ServiceHelper.startService(processor);
} else {
try {
// Start the bean if it implements Service interface
ServiceHelper.startService(beanHolder.getBean());
} catch (NoSuchBeanException e) {
// ignore
}
}
}
{code}
And BeanProcessor.doStop as well.
> Using bean component with beans that implement Service from Camel should have the lifecycle callbacks invoked
> -------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5690
> URL: https://issues.apache.org/jira/browse/CAMEL-5690
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: Future
>
>
> See nabble
> http://camel.465427.n5.nabble.com/lifecycle-of-components-tp5720371.html
> If an user has a bean that implements org.apache.camel.Service we should invoke the start|stop methods on its when the route is being started|stopped. as we do for Processor et all.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)