camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Zolotaryov (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-4969) Processor is not started when passed into Endpoint.createConsumer()
Date Thu, 02 Feb 2012 10:03:53 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-4969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13198651#comment-13198651
] 

Sergey Zolotaryov commented on CAMEL-4969:
------------------------------------------

Then why did it work before? And why do you pass a Processor in the method argument? I assume
it is a fully initialized Processor, since it is provided by the framework.
                
> Processor is not started when passed into Endpoint.createConsumer()
> -------------------------------------------------------------------
>
>                 Key: CAMEL-4969
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4969
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Sergey Zolotaryov
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.10.0
>
>         Attachments: camel-issue.zip
>
>
> We have been retrieving configuration parameters from Processor's that are passed to
Endpoint.createConsumer in order to properly initialize the Consumer being created. To ask
for the parameters we send a message to the Processor. It used to work in Camel 2.5 now we
are in the migration process and we have found that the Processor passed is not started, which
results in IllegalStateException. A workaround is explicit initialization of the Processor
before sending anything:
> {code}
> if (processor instanceof StatefulService) 
> {
>  final StatefulService service = (StatefulService) processor; 
>  if (!service.isStarted()) { service.start(); }
> }
> {code}
> I am attaching the sample project which illustrates the behaviour.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message