Thanks for your valuable response,

Now I'm using ProducerTemplate to invoke a camel route by injecting the
template as below:

public class Test implements Processor {
    @EndpointInject(uri="direct:invokeWS")
     ProducerTemplate producer;

   @Override
    public void process(Exchange exchange) throws Exception {
      .....
      .....
       producer.requestBody(somePayload); //invokes the camel route
"direct:invokeWS" as expected.
      .....
      .....
    }
}

and It's working fine, my doubt is when do i call *producer.stop() method*
to close down all the resources it has been using ?

as my application will be running forever ! and for each SOAP request
process() method of Test class will be invoked.

Thanks,
Nithesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/ProducerTemplate-creates-too-much-threads-tp5751299p5787436.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to