[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:31:04 EDT 2013
Jeff Mesnil created WFLY-2033:
---------------------------------
Summary: 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
Reporter: Jeff Mesnil
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