On Wed, May 9, 2012 at 6:45 PM, Deepthi <deepthi...@gmail.com> wrote:
> Hi Claus,
>
> I am trying to implement Threads EIP in the following manner:
>
> <threadPool id="myThread" poolSize="20" threadName="thread1"/>
>
> <from uri="[local folder]"  />
> <threads executorServiceRef="myThread">
>     <to uri="http://localhost:9002/REST-Webservice/rest/RESTService";  />
>     <bean ref="[bean name]" method="[method name]"/>
>     <camel:to uri="file://C:/Projects/GLS/test"/>
> </threads>
>
> The control is going till webservice but it is not entering the bean.
> How can i achieve the above using threads. Am I doing anything wrong?
>

When you call the http endpoint its using the camel-http component
which does not support async communication
http://camel.apache.org/asynchronous-routing-engine.html

So the thread will block until the reply comes back. But since you use
a thread pool, then you can have concurrency, but the other threads
will block as well.

Regardless what, its only *after* the reply is back from the http
service that Camel continues routing the message and invokes the bean.

eg its the pipes and filters eip
http://camel.apache.org/pipes-and-filters.html


> Also, is the above approach preferable performance wise?
>
> Appreciate your help
>
> Thanks
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/CXF-webservice-asyn-tp5695918p5697938.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to