users@glassfish.java.net

Re: Threading problem during Ejb service invocation

From: Mark S White <Mark.White_at_Sun.COM>
Date: Thu, 25 Jun 2009 06:43:22 -0700

This is a GlassFish issue, re-posting to the GlassFish mail list. BTW,
have you tried this with
the latest GlassFish ESB v2.1 release?

donn wrote:
> Hi Guys,
>
> I am facing a very strange situation. I have a web service (in a web
> application) invoking a Ejb service using Spring JAX-WS proxy port feature.
> It did deploy ok on the following Glassfish ESB configuraton
>
> Glassfish Cluster (glassfish v2ur2) with One instance
> Platform: Ubuntu
> Jax-ws : 1.2.7
> Metro : 1.5
>
> We did a worse case test, where the Ejb service receives inappropriate data
> and throws an
> RuntimeException. We can make any number calls to the web application which
> inturn invokes this Ejb service any number of times sequentially. But when
> we start the load test using soapUI, after few runs, we got the following
> exception, which comes for few service invocations and disappears. It is
> very random by which I assume its clearly a threading problem.
>
> I was able to little investigation on my side and found out the following:
>
> As I understand, under load the Pipeline holding Pipe instances will be
> cloned. The Fiber holding the clone copy will at some time gets its share to
> a thread and gets executed. Exactly after the clone is done by calling
> JBITransportPipe.copy(this,cloner), I get the above mentioned exception in a
> particular thread.
>
> Any ideas why ?
>
> It would appreciate much if any one can shed light in to this. Thanks.
>
> The stack trace is as follows
>
>
> java.lang.RuntimeException
> at com.sun.xml.ws.api.message.Message.getOperation(Message.java:281)
> at
> com.sun.enterprise.jbi.serviceengine.bridge.transport.JBITransportPipe.process(JBITransportPipe.java:87)
> at
> com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
> at
> com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:89)
> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
> at
> com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
> at com.sun.xml.xwss.XWSSClientPipe.process(XWSSClientPipe.java:118)
> at
> com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
> at com.sun.xml.ws.client.Stub.process(Stub.java:248)
> at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
> at
> com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
> at
> com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
> at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
> at $Proxy162.doClientTransaction(Unknown Source)
> at sun.reflect.GeneratedMethodAccessor669.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.doInvoke(JaxWsPortClientInterceptor.java:416)
> at
> org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.doInvoke(JaxWsPortClientInterceptor.java:392)
> at
> org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.invoke(JaxWsPortClientInterceptor.java:379)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
> at $Proxy163.doClientTransaction(Unknown Source)
> at
> sample.proxy.RequestHandlerServiceImpl.doClientTransaction(RequestHandlerServiceImpl.java:43)
> at
> sample.proxy.RequestHandlerProxyBean.doClientTransaction(RequestHandlerProxyBean.java:147)
> at
> sample.proxy.RequestHandlerProxyEndPoint.doClientTransaction(RequestHandlerProxyEndPoint.java:41)
> at sun.reflect.GeneratedMethodAccessor668.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> com.sun.enterprise.webservice.InstanceResolverImpl$1.invoke(InstanceResolverImpl.java:112)
> at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
> at
> com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
> at
> com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
> at
> com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
> at
> com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
> at
> com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
> at
> com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
> at
> com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
> at
> com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
> at
> com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
> at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
> at
> com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
> at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
> at
> com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
> at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:176)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
> at
> org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
> at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
> at
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
> at
> com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:440)
> at
> com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:228)
> at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
> at
> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
>
>
>
> Bala
>

-- 
OpenESB Community (http://open-esb.org)
Check out my blog (http://blogs.sun.com/mwhite)