[jboss-jira] [JBoss JIRA] Created: (EJBTHREE-2254) @Singleton does not work with @RunAs/@RolesAllowed from an MDB (@Service works fine)

Richard Kennard (JIRA) jira-events at lists.jboss.org
Tue Jun 7 19:33:59 EDT 2011


@Singleton does not work with @RunAs/@RolesAllowed from an MDB (@Service works fine)
------------------------------------------------------------------------------------

                 Key: EJBTHREE-2254
                 URL: https://issues.jboss.org/browse/EJBTHREE-2254
             Project: EJB 3.0
          Issue Type: Bug
         Environment: JBoss 6.0.0.Final
            Reporter: Richard Kennard


Test case attached. Please open as an Eclispe JBoss Tools project. It creates a Quartz-based MDB that tries to call various other beans (Session, Service and Singleton) that are secured with @RolesAllowed.

To observe the behaviour:

1. Deploy the app. Notice that the MDB (which triggers every minute) can successfully run the secured methods from the Session bean and the Service bean, but NOT the Singleton bean. The @RunAs credentials are not being passed to the @Singleton bean

2. Uncomment the lines indicated in the code (in RunAsTestMDB.java and jboss.xml). This sets a null security-domain on the Singleton bean, allowing it to be invoked. However immediately afterwards the @RunAs credentials are lost and the MDB can no longer call other beans

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list