thanks Jiang;

As your suggest, I have tried sync mode, it works well; 

async will dead lock, dumping the stack trace when dead locked, most threads 's 
stack trace as following:

"http-8090-57" daemon prio=10 tid=0x09c35000 nid=0x44d5 waiting on condition 
[0xaf487000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0xe321c210> (a 
java.util.concurrent.CountDownLatch$Sync)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
        at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
        at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969)
        at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)
        at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:207)
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:120)
        at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)
        at 
org.apache.camel.component.cxf.CxfConsumer$1.syncInvoke(CxfConsumer.java:121)
        at 
org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:71)
        at 
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at 
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
        at 
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
        - locked <0xe331d838> (a 
org.apache.cxf.interceptor.ServiceInvokerInterceptor$2)
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
        - locked <0xe323ce38> (a org.apache.cxf.phase.PhaseInterceptorChain)
        at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
        at 
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:206)
        at 
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:218)
        at 
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:200)
        at 
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:114)
        at 
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
        at 
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at 
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.

----- Original Message ----- 
From: "Willem Jiang" <[email protected]>
To: <[email protected]>
Sent: Friday, October 14, 2011 5:42 PM
Subject: Re: Concurrent Problem of CXF on tomcat?


> camel-cxf producer will use the async invocation by default, It's more 
> like an issue of CXF client async invocation.
> It could be more helpful if you can show us the stack trace or where 
> the code is blocked.
> On Fri Oct 14 16:42:24 2011, xuhb wrote:
>> Sorry forget to say proxy:
>> the proxy act as a web service to receive request from client and redirect 
>> to another existing webservice, and send the reponse from existing 
>> web-service back to original client;
>>
>> here in my test the client is Load Runner;
>> the rout of proxy is just like:
>> <route>
>> <from "cxf:...>
>> <to  "cxf:...>
>> </route>
>> ----- Original Message -----
>> From: "xuhb"<[email protected]>
>> To:<[email protected]>
>> Sent: Friday, October 14, 2011 3:32 PM
>> Subject: Concurrent Problem of CXF on tomcat?
>>
>>
>>> Hi:
>>>     I build a simple proxy with cxf(2.4.3)&  camel(2.8.1) on tomcat, and 
>>> trying to test the performance with HP LoadRunner;
>>>     the proxy program is build with pay-load model of camel-cxf;
>>>
>>>     If the concurrent client is only  1, there is nothing wrong, the 
>>> throughput capacity is very stable (about 150 hits/second)
>>>     If I increasei concurrent clients (etc to 40) ,  the throughput 
>>> capacity doesn't increased, but drop down to a very slow number; (the 
>>> hits/second is only serval number);
>>>
>>>     when concurrent clients is 40, at first the speed of cxf proxy is very 
>>> fast, but after a serveral seconds there are serveral 
>>> "java.net.SocketException: Unexpected end of file from server" occurs , and 
>>> then the speed of proxy will drop to very slow;
>>>
>>>      Tthe camel-cxf will share same cxf-client in multi threads ( I have 
>>> ask a question of CXF client concurrents, accoding to CXF FAQ , it is 
>>> thread safe in my test usage),
>>> and is there other issues cause such a concurrent problem ?
>>>
>>>     Thanks for any suggestion;
> 
> 
> 
> -- 
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>         http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang 
> Weibo: willemjiang 
> 
> 
>

Reply via email to