Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-2879

Multiple threads: getPort Hangs on 100% CPU with fast infoset on asynchronous invocation

XMLWordPrintable

      Hi,
      i'm caching an instance of javax.xml.ws.Service.
      I cache the results of getPort in a ThreadLocal.
      When i use multiple parallel asynchronous invocations, this approach does not seem to work, so i invoke getPort for each asynchronous invocation.
      I have 8 threads using a web service running in parallel on a i7.
      After about 20h of work, all my worker threads are hanging on:

      "pool-41-thread-7" prio=10 tid=0x00007f8cc469d400 nid=0x156a runnable [0x000000004691a000..0x0000000046921ba0]
      java.lang.Thread.State: RUNNABLE
      at java.util.HashMap.put(HashMap.java:374)
      at java.util.HashSet.add(HashSet.java:200)
      at org.jboss.ws.metadata.umdm.FeatureSet.addFeature(FeatureSet.java:63)
      at org.jboss.ws.metadata.umdm.EndpointMetaData.addFeature(EndpointMetaData.java:375)
      at org.jboss.ws.core.jaxws.client.ClientFeatureProcessor.processFeature(ClientFeatureProcessor.java:84)
      at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.initWebserviceFeatures(ServiceDelegateImpl.java:537)
      at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:526)
      at javax.xml.ws.Service.getPort(Service.java:607)
      at com.spratpix.subdomains.ThreadLocalWebserviceProxy.getAsyncPort(ThreadLocalWebserviceProxy.java:47)

      Here is how i use getPort

      protected T getAsyncPort() {
      long t0 = System.nanoTime();
      try

      { return service.getPort(portClass, new FastInfosetFeature()); }

      finally

      { long dt = System.nanoTime() - t0; TimingInterceptor.callChain.addInvocationWithMethod(method, dt); }

      }

      And the problematic web service call seems to be

      public Future<Boolean> PutFileAsync(String domain, String type, String filename, S3Object file, AsyncHandler<Boolean> asyncHandler);

              Unassigned Unassigned
              fxtentacle_jira Hajo Krabbenhöft (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: