You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Sergey Zolotaryov (Updated) (JIRA)" <ji...@apache.org> on 2012/02/02 08:59:54 UTC

[jira] [Updated] (CAMEL-4969) Processor is not started when passed into Endpoint.createConsumer()

     [ https://issues.apache.org/jira/browse/CAMEL-4969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Zolotaryov updated CAMEL-4969:
-------------------------------------

    Attachment: camel-issue.zip
    
> 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
>            Priority: Minor
>         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