camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Burgazzoli (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-5690) Using bean component with beans that implement Service from Camel should have the lifecycle callbacks invoked
Date Tue, 05 Apr 2016 10:09:25 GMT

    [ 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)

Mime
View raw message