Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2145

Proxy in JCA connector throws exception due to concurrency issues

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1, 2.0.6, 2.2
    • 2.0.11, 2.1.5, 2.2.1
    • Integration
    • None

    Description

      A customer is having a problem with concurrent access to a JCA endpoint that is deployed in WebSphere. The stacktrace is below.
      They are running a 2.0.x version of CXF with WebSphere 6.1.0.19, HP/UX version B.11.23, Java 1.5.0.13 .

      The problem is that the JCA connector uses a single MDB/EJB proxy for all threads which is causing the exception to be thrown. The solution is to create a pool of proxies which can be accessed so that the proxy is used by no more than 1 thread at a time.

      [3/10/09 15:55:19:685 EDT] 0000042f DispatchMDBIn E Failed to obtain service object java:comp/env/GreeterWithWsdlLocalHome
      java.lang.IllegalStateException: Multiple threads can not use same MessageEndpoint proxy instance concurrently
      at com.ibm.ejs.container.MessageEndpointHandler.throwIllegalStateException(MessageEndpointHandler.java:599)
      at com.ibm.ejs.container.MessageEndpointHandler.checkState(MessageEndpointHandler.java:433)
      at com.ibm.ejs.container.MessageEndpointHandler.invokeMdbMethod(MessageEndpointHandler.java:889)
      at com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java:747)
      at $Proxy50.lookupTargetObject(Unknown Source)
      at org.apache.cxf.jca.inbound.DispatchMDBInvoker.getServiceObject(DispatchMDBInvoker.java:57)
      at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:51)
      at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:56)
      at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
      at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:92)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:77)
      at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:280)
      at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:254)
      at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      at org.mortbay.jetty.Server.handle(Server.java:324)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
      at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

      Attachments

        1. patch.txt
          12 kB
          Seumas Soltysik
        2. patch2.txt
          10 kB
          Seumas Soltysik
        3. patch3.txt
          10 kB
          Seumas Soltysik

        Activity

          People

            dkulp Daniel Kulp
            seumassoltysik Seumas Soltysik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: