Uploaded image for project: 'EJB Client Library (AS7+)'
  1. EJB Client Library (AS7+)
  2. EJBCLIENT-67

OOME (Threads) if scoped EJB context (EJBCLIENT-34) is used with lookups in a loop

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 2.0.0.Beta1, 1.0.17.Final
    • 1.0.16.Final
    • Hide

      private static InitialContext createContextApp2() throws NamingException

      { Properties p = new Properties(); p.put("org.jboss.ejb.client.scoped.context", true); p.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming"); p.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false"); p.put("remote.connections", "appTwo"); p.put("remote.connection.appTwo.port", String.valueOf(5247)); p.put("remote.connection.appTwo.host", "localhost"); p.put("remote.connection.appTwo.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS", "JBOSS-LOCAL-USER"); p.put("remote.connection.appTwo.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false"); p.put("remote.connection.appTwo.username", "quickuser2"); p.put("remote.connection.appTwo.password", "quick+123"); return new InitialContext(p); }

      public void main(String[] args) {
      InitialContext ic = createContextApp2();
      while(true)

      { // can be replaced with any SLSB ((AppTwo)ic.lookup(REMOTE_NAME)).invoke("invokeWithContext A"); }

      }

      Show
      private static InitialContext createContextApp2() throws NamingException { Properties p = new Properties(); p.put("org.jboss.ejb.client.scoped.context", true); p.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming"); p.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false"); p.put("remote.connections", "appTwo"); p.put("remote.connection.appTwo.port", String.valueOf(5247)); p.put("remote.connection.appTwo.host", "localhost"); p.put("remote.connection.appTwo.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS", "JBOSS-LOCAL-USER"); p.put("remote.connection.appTwo.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false"); p.put("remote.connection.appTwo.username", "quickuser2"); p.put("remote.connection.appTwo.password", "quick+123"); return new InitialContext(p); } public void main(String[] args) { InitialContext ic = createContextApp2(); while(true) { // can be replaced with any SLSB ((AppTwo)ic.lookup(REMOTE_NAME)).invoke("invokeWithContext A"); } }

      If a simple java-main application use the scoped-context each lookup will create 6 new threads (task-[1234]; read-1; write-1)

              jaikiran Jaikiran Pai (Inactive)
              rhn-support-wfink Wolf Fink
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: