[weld-issues] [JBoss JIRA] (WELD-1103) EJB using CMT demarcation with an injection point of type UserTransaction is not detected as definition error

Martin Kouba (JIRA) jira-events at lists.jboss.org
Wed Apr 4 08:33:48 EDT 2012


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

Martin Kouba commented on WELD-1103:
------------------------------------

CDI TCK 1.1 test:
https://github.com/jboss/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/broken/transaction/UserTransactionInvalidInjectionTest.java
                
> EJB using CMT demarcation with an injection point of type UserTransaction is not detected as definition error
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: WELD-1103
>                 URL: https://issues.jboss.org/browse/WELD-1103
>             Project: Weld
>          Issue Type: Bug
>    Affects Versions: 1.1.5.Final, 2.0.0.Alpha1
>            Reporter: Martin Kouba
>
> CDI spec *3.7. Additional built-in beans* states:
> "If a Java EE component class has an injection point of type UserTransaction and qualifier @Default, and may not validly make use of the JTA UserTransaction according to the Java EE platform specification, the container automatically detects the problem and treats it as a definition error."
> ... and EJB 3.1 spec states:
> *13.3.4 Enterprise Beans Using Container-Managed Transaction Demarcation*
> "The enterprise bean's business methods, message listener methods, business method interceptor meth-
> ods, lifecycle callback interceptor methods, or timeout callback methods must not attempt to obtain or
> use the javax.transaction.UserTransaction interface. ..."
> *16.12 UserTransaction Interface*
> "The container must make the UserTransaction interface available to the enterprise beans that are
> allowed to use this interface (only session and message-driven beans with bean-managed transaction
> demarcation are allowed to use this interface) either through injection using the Resource annotation
> or in JNDI under the name java:comp/UserTransaction, in addition to through the EJBContext
> interface. ..."

--
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