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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 11.0.0.Beta1
    • 11.0.0.Alpha1
    • 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

    Description

      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".

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: