Hi All,
this thread has been quite instructive. I have designed the following flow:
1 Service Invoke INVOKE startTransaction
2 Sequence SEQUENCE
2.1 Sequence SEQUENCE (try)
2.11 Service Invoke INVOKE put2
2.12 Service Invoke INVOKE put1
2.13 Service Invoke INVOKE commitTransaction
2.14 Map MAP
2.2 Sequence SEQUENCE (catch)
2.21 Service Invoke INVOKE getLastError
2.22 Service Invoke INVOKE testForServiceRetry
2.23 Service Invoke INVOKE rollbackTransaction
2.24 Map MAP
3 Branch BRANCH on '/throwRetryException'
3.1 Service Invoke true: INVOKE throwExceptionForRetry
3.2 Exit false: EXIT '$flow' (signal Failure)
put1 and put2 are transaction connections to a local MQ Queue.
When I run this service I get the following exception:
[ART.114.303] Adapter Runtime (Transaction): Unable to commit transaction.
[ART.117.4015] Adapter Runtime (Adapter Service): Error(s) occurred while closing adapter connections.
[ART.117.4015] Adapter Runtime (Adapter Service): Error(s) occurred while closing adapter connections.
In the Server log,
[123]2009-10-07 11:33:14 EST [SCC.0121.0034E] commit failed: more than 1 local trans enlisted. xid = [FormatId=45744, GlobalId=machinename/1253684687875, BranchQual=1] rxid = {2}
[124]2009-10-07 11:33:14 EST [SCC.0121.0026E] delisted transaction commit failed: java.lang.IllegalStateException: commit failed. more than one local transaction enlisted. xid = machinename/1253684687875
I understand that a local_transaction is opened for each transactional put service used in a flow, which causes problems if you need to have multiple transactional puts in a flow.
I was also of the understanding after reading the MQ Adapter notes that this is the type of service I would need to construct so that I could open, commit, and rollback transactions. Clearly I have gotten something wrong here. Is there enough information here for someone to make a diagnosis? I have named the transaction “putTestMessageGroup” as a constant for each transaction control flow invoked.
#Integration-Server-and-ESB#webMethods#Adapters-and-E-Standards