camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jjb <jj_burf...@yahoo.com>
Subject creating a new bean per route invocation
Date Tue, 04 Aug 2009 20:53:35 GMT

Hi.

I need to do synchronous processing but not hold up routes of the same type
when many instances are active at the same time.  Take the following bean
and route definitions from camel-context.xml:

   <bean id="processor" class="DerivedClass"/>

    ...

    <!-- begin camel context -->
    <route>
      <from uri="jetty:http://0.0.0.0:8080/test/?sessionSupport=true"/>
      <to uri="bean:processor?method=process"/>
    </route>

And let's say I have a bunch of HTTP clients sending data at a high rate. 
It seems if I want this route to be synchronous, all concurrent invocations
of the route will be serialized chronologically.  Is there a way to force
Camel to create a new instance of DerivedClass (or better yet, grab one from
a pool) each time a client hits the route so one client doesn't block
another?

Regards

-- 
View this message in context: http://www.nabble.com/creating-a-new-bean-per-route-invocation-tp24816036p24816036.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message