Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3316

Multi threaded ejb invocations via remote-naming produce EJBCLIENT000025 if the Context is closed

XMLWordPrintable

    • Hide

      Use the attached application and client

      • start a server
      • configure '/subsystem=ejb3:write-attribute(name=default-missing-method-permissions-deny-access, value=false)'
      • deploy 'jboss-ejb-multi-server-app-two.ear'
      • run the client:
        java -cp bin/client/jboss-client.jar:jboss-ejb-multi-server-app-two-ejb-client.jar:jboss-as-ejb-clients-remote-naming.jar org.jboss.as.quickstarts.ejb.clients.MultiThreadJBossRemoteClient -U http-remoting://localhost:8080 -M [0|1|2]

      -M 0 => create IC and proxy inside the Thread loop each time
      -M 1 => create IC once and create the proxy each time
      -M 2 => create IC and proxy inside the Thread once and reuse it

      Show
      Use the attached application and client start a server configure '/subsystem=ejb3:write-attribute(name=default-missing-method-permissions-deny-access, value=false)' deploy 'jboss-ejb-multi-server-app-two.ear' run the client: java -cp bin/client/jboss-client.jar:jboss-ejb-multi-server-app-two-ejb-client.jar:jboss-as-ejb-clients-remote-naming.jar org.jboss.as.quickstarts.ejb.clients.MultiThreadJBossRemoteClient -U http-remoting://localhost:8080 -M [0|1|2] -M 0 => create IC and proxy inside the Thread loop each time -M 1 => create IC once and create the proxy each time -M 2 => create IC and proxy inside the Thread once and reuse it

      If a client run multi threads and each Thread use it's own InitialContext the behaviour is unexpected.

      The behaviour is as followed:
      if each invocation create it's own IC and lookup the EJB there is sometimes a EJBCLIENT000025 because one of the one thread has closed the IC until another thread try to invoke an EJB.
      If the IC is reused the failure might happen only if the first Thread has finished the invocations and close the IC during other Threads are still running.

      It looks that the underlying remote connection will be closed if the first IC is closed without respect that there are different IC's created and still in use.

              elguardian@gmail.com Enrique González Martínez (Inactive)
              rhn-support-wfink Wolf Fink
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: