[jboss-jira] [JBoss JIRA] (WFLY-2033) NotSupported tx attribute is not taken into account without a MethodIntf for CMT MDB
Jeff Mesnil (JIRA)
jira-events at lists.jboss.org
Tue Sep 10 04:53:03 EDT 2013
[ https://issues.jboss.org/browse/WFLY-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803013#comment-12803013 ]
Jeff Mesnil commented on WFLY-2033:
-----------------------------------
I have pushed a Git branch to show the issues. The issue shows up only with DD-based MDB. A MDB annotated with TransactionAttribute(NOT_SUPPORTED) works as expected.
> NotSupported tx attribute is not taken into account without a MethodIntf for CMT MDB
> ------------------------------------------------------------------------------------
>
> Key: WFLY-2033
> URL: https://issues.jboss.org/browse/WFLY-2033
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 8.0.0.Alpha4
> Reporter: Jeff Mesnil
> Assignee: jaikiran pai
> Fix For: 8.0.0.Beta1
>
>
> A MDB is configured using a deployment descriptor as a CMT with:
> {noformat}
> <assembly-descriptor>
> <container-transaction>
> <method>
> <ejb-name>ContainerManagedTransactionNotSupportedMDBWithDD</ejb-name>
> <method-name>onMessage</method-name>
> <method-params>
> <method-param>javax.jms.Message</method-param>
> </method-params>
> </method>
> <trans-attribute>NotSupported</trans-attribute>
> </container-transaction>
> </assembly-descriptor>
> {noformat}
> According to the sec, a call to MessageDrivenContext.setRollbackOnly() in the MDB's onMessage() method must throw an illegal state exception (as there is no active transaction).
> Thats's not the case.
> I debugged the code and WildFly identifies the invocation as the component MESSAGE_ENDPOINT methodIntf and its tx attribute as REQUIRED. The call to MessageDrivenContext.setRollbackOnly() succeeds when it must not.
> The component txattrs do contain a BEAN methodIntf for the same method onMessage(javax.jms.Message) with NOT_SUPPORTED that corresponds to the deployment descriptor but it is not used.
> If I explicitly set
> {noformat}
> <method-intf>MessageEndpoint</method-intf>
> {noformat}
> the test passes (MessageDrivenContext.setRollbackOnly() throws the expected exception)
> I think it is a bug to have to specify the <method-intf> in the DD. The test should pass without it as this "style 3" method declaration is legal for MDB.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list