9 Replies Latest reply on Mar 24, 2014 5:46 AM by ghansper

    Remoting client-endpoint Threads not closed if a scoped context is closed

    ghansper

      Hello,

       

      we are using the EJB Client API with scoped contexts as described in https://docs.jboss.org/author/display/AS72/Scoped+EJB+client+contexts from a standalone client against JBoss AS 7.2.

      We are now getting problems with our test suites that are creating many server connections and finally fail with "java.lang.OutOfMemoryError: unable to create new native thread".

      We are observing that though we are closing the InitialContext and the scoped EjbNamingContext as described in above Wiki, the Threads that are associated with the connections are not terminated. There are a couple of 'Remoting "client-endpoint" read/write/task' Daemon Threads associated with each Connection.

      Now, we'll be able to circumvent the problem by reducing the amount of connections per test run, but I wonder if there is a way to terminate those Threads?

       

      Regards,

          Gerret