-
Bug
-
Resolution: Done
-
Major
-
1.0.4.Final
-
None
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:
@Stateful @TransactionManagement(BEAN) public class UserTransactionInjectedBean implements UserTransactionInjectedBeanLocal { @Inject transient UserTransaction userTransaction; public UserTransaction getUserTransaction() { return userTransaction; } }
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.