2 Replies Latest reply on Feb 13, 2013 5:09 AM by kieselhorst

    [Remoting 3]: Remoting threads never get closed

    kieselhorst

      Hi,

       

      I'm using a standalone remote client as described in the wiki in combination with a ConfigBasedEJBClientContextSelector. Several worker threads named Remoting "endpoint name" read-1, write-1, task-1, task-2, task-3 and task-4 are created and never get destroyed. The read-1 and write-1 threads are in state RUNNABLE:

       

      {noformat}

      Stack trace:

      sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)

      sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:273)

      sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:255)

      sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:136)

      sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)

         - locked sun.nio.ch.Util$2@478f67d0

         - locked java.util.Collections$UnmodifiableSet@17e8ad64

         - locked sun.nio.ch.WindowsSelectorImpl@7c9aff86

      sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)

      sun.nio.ch.SelectorImpl.select(SelectorImpl.java:84)

      org.xnio.nio.WorkerThread.run(WorkerThread.java:153)

      {noformat}

       

      The task-* threads are in state WAITING.

       

      Is it possible to create an idle timeout?

       

      Current properties supplied in a PropertiesBasedEJBClientConfiguration:

       

      {code:java}

      Properties p = new Properties();

      p.put("endpoint.name", "client-endpoint-for-"+userName);

      p.put("remote.connectionprovider.create.options.org.xnio.Options."+org.xnio.Options.SSL_ENABLED.getName(), "false");

      p.put("remote.connections", "default");

      p.put("remote.connection.default.port", String.valueOf(port));

      p.put("remote.connection.default.host", host);

      p.put("remote.connection.default.username", userName);

      p.put("remote.connection.default.password", password);

      p.put("remote.connection.default.connect.options.org.xnio.Options."+org.xnio.Options.SASL_POLICY_NOANONYMOUS.getName(), "false");

      p.put("remote.connection.default.connect.options.org.xnio.Options."+org.xnio.Options.SASL_POLICY_NOPLAINTEXT.getName(), "false");

      p.put("remote.connection.default.connect.options.org.xnio.Options."+org.xnio.Options.SASL_DISALLOWED_MECHANISMS.getName(), "JBOSS-LOCAL-USER");

      p.put("remote.connection.default.connect.options.org.xnio.Options."+org.xnio.Options.KEEP_ALIVE.getName(), "true");

      p.put("remote.connection.default.connect.options.org.jboss.remoting3."+RemotingOptions.HEARTBEAT_INTERVAL, String.valueOf(heartbeatInterval));

      {code}

       

      Thanks in advance!

       

      Regards

      Dennis

        • 1. Re: Remoting threads never get closed
          kieselhorst

          The stack trace on Linux looks a bit different:

           

          {noformat}

          java.lang.Thread.State: RUNNABLE

          at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)

          at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:210)

          at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:65)

          at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)

          - locked <22af132b> (a sun.nio.ch.Util$2)

          - locked <14137dd7> (a java.util.Collections$UnmodifiableSet)

          - locked <753a36f6> (a sun.nio.ch.EPollSelectorImpl)

          at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)

          at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:84)

          at org.xnio.nio.WorkerThread.run(WorkerThread.java:153)

          {noformat}

           

          I'm using ejb-client 1.0.16.Final, remoting 3.2.14.GA and xnio 3.0.7.GA.

          • 2. Re: Remoting threads never get closed
            kieselhorst

            org.jboss.ejb.client.remoting.RemotingCleanupHandler is responsible for closing, but I have to do an explicit call via ConfigBasedEJBClientContextSelector.getCurrent().close() to get it executed.

            1 of 1 people found this helpful