posted 13 years ago
I am facing one weird issue in WebSphere. The same code works fine in WebLogic 7.0 SP5 but fails in WebSphere 7.0.0.7
I have a MDB with Transaction Attribute set as "NOT_SUPPORTED".
This MDB calls three different Stateless Session Beans say BeanA, BeanB, and BeanC. All three EJBs write to three different data sources.
The transaction attribute of BeanA is "REQUIRED" and that of BeanB and BeanC is "REQUIRES NEW".
The transaction management for all 4 EJBs is container managed. The LTC (Local Transaction Containment for BeanA, BeanB, and BeanC is MethodBoundary).
When onMessage() method of MDB gets called, the only exception I see is following.
=====
WTRN0063E: An illegal attempt to commit a one phase capable resource with existing two phase capable resources has occurred.
WTRN0086I: XAException encountered during prepare phase for transaction 0000012A2597D71B00000001000000223093AA362DAC435BD399143CA63A56D26A92F4670000012A2597D71B00000001000000223093AA362DAC435BD399143CA63A56D26A92F46700000001. Local resources follow.
WTRN0089I: LocalTransactionWrapper@:26bd26bd localTransaction:com.ibm.ws.rsadapter.spi.WSRdbSpiLocalTransactionImpl@26d426d4 enlisted:trueHas Tran Rolled Back = false registeredForSynctruemcWrapper.hashcode()604775436: Vote: none.
WTRN0089I: [com.ibm.ws.sib.ra.inbound.impl.SibRaRecoverableSiXaResource@2a412a41 <siXaResource=com.ibm.ws.sib.msgstore.transactions.MSDelegatingXAResource@2a492a49> <meName=003HAYASDG409Node01.devMAAPServer-MAAPSIB> <meUuid=93EF716521FD5795> <busName=MAAPSIB> <xaRecoveryAlias=null> <userName=null> <password=null> <recoveryToken=3> <useServerSubject=false> <providerEndpoints=null>]: Vote: commit.
=====
I am using EJB3 annotations to declare the transaction attributes in the bean source files.
I think for some weird reasons the transaction attribute of MDB stays as "REQUIRED", which is causing the above issue.
Interestingly if I change the transaction management of MDB from Container managed to Bean managed then above method works fine. I don’t see any exceptions and data sources are getting updated properly.