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

henk de boer (Commented) (JIRA) jira-events at lists.jboss.org
Mon Nov 21 17:22:41 EST 2011


    [ https://issues.jboss.org/browse/EJBTHREE-2254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644499#comment-12644499 ] 

henk de boer commented on EJBTHREE-2254:
----------------------------------------

{quote}Could you please let me know how you go reproducing it with JBoss 6.0.0.Final?{quote}

That one indeed crashes:

{code}
INFO  [STDOUT] RunAsTestMDB( "Foo" ): false (expect 'false')
INFO  [STDOUT] RunAsTestSessionBean.isCallerInRole( "Foo" ): true (expect 'true')
ERROR [STDERR] java.lang.IllegalArgumentException: Either callerSubject or callerRunAs should be non-null
{code}

Via Eclipse I deployed the exact same code to both server runtimes. When I start the JBoss AS 6.10, the results are as in my previous comment, when I deploy to AS 6.0 there's the exception as shown above.

It thus seems that this issue is fixed by virtue of fixing something else (or the person fixing it forgot to mention it here?)
                
> @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
>         Attachments: RunAsTest.zip
>
>
> 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 allow this, it uses @RunAs.
> 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 MDB's @RunAs credentials are lost and it can no longer call the Session bean

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list