7 Replies Latest reply on Nov 4, 2017 12:31 PM by Matthew Harrison

    Remoting  config-based-ejb-client-endpoint threads remain after context.close()

    Matthew Harrison Newbie

      ( Wildfly 10.1.0.Final, Windows 10 )

       

      Hi,

       

      we have a client app framework which launches component apps, loading their classes dynamically.

      One of these apps uses EJBs and I've just updated from JBoss 4 to Wildfly 10.1.0.Final.

       

      It runs nicely, the ejbs get looked up (not using Scoped EJB client contexts), and ejb calls work.

       

      When the app closes, initialContext.close() is called, and 2 or 3 threads close, but about 18 threads hang around

      (Remoting  "config-based-ejb-client-endpoint" I/O-1, Accept, task-1 ...task-16 ) which is a show stopper.

       

      I've replicated this behaviour using a modified quickstart ejb-remote/client project, and the context and remote beans eventually get GC'd

       

      These worker threads eventually get shutdown when the main app closes, it looks like by a VM shutdown hook.

       

      I couldn't get Scoped EJB client contexts to work, which is a separate issue, but I shouldn't need to, should I?

       

      I've tried adding KEEP_ALIVE options to jboss-ejb-client.properties, to no avail:

       

      remote.connectionprovider.create.options.org.xnio.Options.KEEP_ALIVE=false

      remote.connectionprovider.create.options.org.xnio.Options.WORKER_TASK_KEEPALIVE=5000

       

      I really need to be able to shut these threads down when the component app closes.

      (As the component app launches with a new classloader each time, we get 18 threads created each time)

       

      Many thanks for any help.