[
https://issues.jboss.org/browse/WFLY-2033?page=com.atlassian.jira.plugin....
]
Jeff Mesnil updated WFLY-2033:
------------------------------
Fix Version/s: 8.0.0.Beta1
Steps to Reproduce:
1. fetch git branch
https://github.com/jmesnil/wildfly/tree/WFLY-2033_CMT_TXNS_MDB_setRollbac...
2. run the test with
./integration-tests.sh -Dts.noSmoke -Dts.basic
-Dtest=org.jboss.as.test.integration.ejb.mdb.cmt.notsupported.ContainerManagedTransactionNotSupportedTestCase
Assignee: jaikiran pai
Affects Version/s: 8.0.0.Alpha4
Workaround Description: add <method-intf>MessageEndpoint</method-intf> to
the deployment descriptor
Component/s: EJB
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