[jboss-jira] [JBoss JIRA] (EJBTHREE-2254) @Singleton does not work with @RunAs/@RolesAllowed from an MDB (@Service works fine)
Richard Kennard (Commented) (JIRA)
jira-events at lists.jboss.org
Sun Nov 20 17:28:40 EST 2011
[ https://issues.jboss.org/browse/EJBTHREE-2254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644207#comment-12644207 ]
Richard Kennard commented on EJBTHREE-2254:
-------------------------------------------
Henk,
Thanks for looking at this issue. In response to your queries:
1. Can you please try deploying to JBoss-6.0.0.Final, rather than JBoss-6.1.0.Final? The latter seems to fail for some whole new reason, and I'd rather not complicate things.
2. I don't understand why it would be "impossible to inject such a bean with @EJB"? Where are you getting this from? All the docs I have seen indicate it should work, and it *does* work when I try it. The only problem is related to calling across security domains (not injection).
3. You're right about 'avant-ss', sorry. I thought it would need to be a security-domain that had been pre-configured in your JBoss. But any string seems to work fine.
I just retried the test case with a clean JBoss 6.0.0.Final and JBoss Tools and it reproduced the issue for me.
Again, thanks for trying this.
Regards,
Richard.
> @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