On Tuesday, July 10, 2012 09:40:19 PM Balaji wrote: > Hi All, > > I am exploring a way to configure a thread pool from app server for > specific end point in CXF. Purpose is to limit the number of threads an > end point consumes in service API layer. I didn't find any CXF > documentation. > > Any inputs to configure are welcome.
If you have the JAX-WS Endpoint object for the endpoint, there is a setExecutor call right on it that can be used. HOWEVER,in CXF that executor is only used immediately around the call to the service method. All the soap processing, calls to handlers, interceptors, etc... would be on the original thread. Also, due to the extra context switch, some things may not work correctly as anything stored in a ThreadLocal would not be available. Something like Spring security contexts and such may not work. You COULD create a subclass of org.apache.cxf.service.invoker.SingletonFactory or similar that would just keep a count of current users and blocks until the count is OK. A little tricky to configure in. Dan > > Thanks > Balaji > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/Thread-Pool-for-JAX-WS-front-end-tp571086 > 1.html Sent from the cxf-user mailing list archive at Nabble.com. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
