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

David Blevins (JIRA) jira-events at lists.jboss.org
Wed Jun 22 16:21:24 EDT 2011


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

David Blevins commented on CDITCK-220:
--------------------------------------

If you can exclude that would be great as I'd like to add the correct validation and that will cause this test to fail.

> 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
>             Fix For: 1.0.5.CR1
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list