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

No caller principal in new thread created from EJB (elytron)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 7.1.0.ER3
    • 7.1.0.ER2
    • Security
    • None
    • Hide
      mvn clean install -Delytron -DallTests -Dwildfly.tmp.enable.elytron.profile.tests=true -pl testsuite/integration/basic -Dtest=org.jboss.as.test.integration.ee.concurrent.DefaultManagedThreadFactoryTestCase
      
      Show
      mvn clean install -Delytron -DallTests -Dwildfly.tmp.enable.elytron.profile.tests= true -pl testsuite/integration/basic -Dtest=org.jboss.as.test.integration.ee.concurrent.DefaultManagedThreadFactoryTestCase

      When elytron profile of testsuite enabled, DefaultManagedThreadFactoryTestCase fails, because caller principal is not passed into new thread:

      java.lang.IllegalStateException: the caller principal anonymous is not the expected guest
      (TestEJBRunnable.java:70)
      

      Lets have:

      new InitialContext().lookup("java:comp/EJBContext").getCallerPrincipal()
      
      • On DefaultManagedThreadFactoryTestEJB:63 (in EJB, but outside of new thread yet) it gives correctly "guest".
      • On DefaultManagedThreadFactoryTestEJB:70 (inside Runnable) it gives "anonymous".

        1. jstack.txt
          66 kB
        2. server.log
          48 kB

              jkalina@redhat.com Jan Kalina (Inactive)
              jkalina@redhat.com Jan Kalina (Inactive)
              Josef Cacek Josef Cacek (Inactive)
              Josef Cacek Josef Cacek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: