camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Zolotaryov (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-4969) Processor is not started when passed into Endpoint.createConsumer()
Date Thu, 02 Feb 2012 07:59:54 GMT
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

        

Mime
View raw message