Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-12837

A stateless bean invocation or lookup should never throw a NoSuchEJBException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 7.1.0.CR4
    • EJB
    • None
    • Hide

      Reproducer is available in this package: https://github.com/kwart/wildfly/tree/JBEAP-12439/testsuite/integration/manualmode/src/test/java/org/wildfly/test/manual/elytron/seccontext

      The test itself is in the parent class (AbstractSecurityContextPropagationTestBase). Child classes (SecurityContextPropagation*) just configure if stateless or stateful EJBs are used.

      Full steps to reproduce the issue:

      git clone -b JBEAP-12439 https://github.com/kwart/wildfly.git
      cd wildfly
      mvn clean install -DskipTests -Dcheckstyle.skip -Denforcer.skip
      cd testsuite/integration/manualmode
      mvn clean test -Dcheckstyle.skip -Dcheckstyle.skip -Denforcer.skip -DtestLogToFile=false -Dtest=SecurityContextPropagation\*
      

      The test fail in stateless-stateless (SLSL) EJB combination and passes in the rest (SLSF, SFSL, SFSF).

      There is a NoSuchEJBException in the stateless session bean invocation, but it should not.

      Show
      Reproducer is available in this package: https://github.com/kwart/wildfly/tree/JBEAP-12439/testsuite/integration/manualmode/src/test/java/org/wildfly/test/manual/elytron/seccontext The test itself is in the parent class (AbstractSecurityContextPropagationTestBase). Child classes (SecurityContextPropagation*) just configure if stateless or stateful EJBs are used. Full steps to reproduce the issue: git clone -b JBEAP-12439 https: //github.com/kwart/wildfly.git cd wildfly mvn clean install -DskipTests -Dcheckstyle.skip -Denforcer.skip cd testsuite/integration/manualmode mvn clean test -Dcheckstyle.skip -Dcheckstyle.skip -Denforcer.skip -DtestLogToFile= false -Dtest=SecurityContextPropagation\* The test fail in stateless-stateless (SLSL) EJB combination and passes in the rest (SLSF, SFSL, SFSF). There is a NoSuchEJBException in the stateless session bean invocation, but it should not.

      NoSuchEJBException was thrown in the case of stateless session bean -> another stateless session bean invocation because of authentication failure.

      But according to EJB 3.2 spec(JSR 345), section: 3.4.3:

      It is invalid to reference a session object that does not exist. If a stateful session bean has been removed,
      attempted invocations on the stateful session bean business interface result in the
      javax.ejb.NoSuchEJBException. [3] If a singleton session bean did not successfully initialize,
      attempted invocations on the singleton session bean business interface result in the
      javax.ejb.NoSuchEJBException.
      
      [3] This may not apply to stateless session beans;
      

      Please refer to the Steps to Reproduce above to see how to reproduce the problem.

      Problem Description

      According to the spec, javax.ejb.NoSuchEJBException should be used for Singleton Session Bean and stateful session bean, but not for the Stateless session bean

              rhn-engineering-lgao Lin Gao
              rhn-engineering-lgao Lin Gao
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 1 day
                  1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified