[weld-issues] [JBoss JIRA] (CDITCK-220) BuiltInBeansTest.testUserTransactionBean()

Martin Kouba (JIRA) jira-events at lists.jboss.org
Wed Feb 15 08:39:36 EST 2012


     [ https://issues.jboss.org/browse/CDITCK-220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Kouba reassigned CDITCK-220:
-----------------------------------

    Assignee: Martin Kouba

    
> BuiltInBeansTest.testUserTransactionBean()
> ------------------------------------------
>
>                 Key: CDITCK-220
>                 URL: https://issues.jboss.org/browse/CDITCK-220
>             Project: CDI TCK
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Tests
>    Affects Versions: 1.0.4.Final
>            Reporter: David Blevins
>            Assignee: Martin Kouba
>             Fix For: 1.0.5.CR1, 1.1.0.Alpha2
>
>
> We're passing this test, but wanted to drop a note that it should be updated.  We just need to update this bean like so:
> {code}
> @Stateful
> @TransactionManagement(BEAN)
> public class UserTransactionInjectedBean implements UserTransactionInjectedBeanLocal
> {
>    @Inject transient UserTransaction userTransaction;
>    
>    public UserTransaction getUserTransaction()
>    {
>       return userTransaction;
>    }
> }
> {code}
> Only @Stateful session bean explicitly marked as @TransactionManagement(BEAN) are allowed to get UserTransaction via lookup or injection, the EJB TCK tests cover this pretty well.  In OpenEJB we have deploy-time checks for this if @Resource is used to get a UserTransaction and we'd like to expand that checking to properly cover @Inject injection as well.  Even though we are currently injecting that object and passing the test, it's a "false" pass and at runtime that UserTransaction object is hardwired to throw exceptions if used by a non-CMT 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 weld-issues mailing list