JDBC XA Transaction Confusing

I am using an Integration Server 7.1.1 JDBC adapter in an XA transaction to perform an update to an Oracle database, but an error is occurring upon commit, indicating that a different JDBC adapter is failing, and then the rollback fails anyway, so the commit worked after all.

My flow looks basically like this:

SEQUENCE (exit on success)

SEQUENCE (try - exit on failure)

pub.art.transaction:startTransaction
myUpdateSqlAdapter
pub.art.transaction:commitTransaction (input transactionName mapped from startTransaction)
SEQUENCE (catch - exit on success)

pub.flow.getLastError
pub.flow.debugLog
pub.art.transaction:rollbackTransaction

The error is like this:

[ART.117.4002] Adapter Runtime (Adapter Service): Unable to invoke adapter service someOtherSqlAdapter

followed by a traceback from art.transaction.rollbackTransaction.

Anybody see anything wrong with my sequences or why the wrong JDBC adapter is getting called?

Try putting the StartTransaction outside and before the try/catch sequence.

It sounds like you’re only updating one database, right? Then why use XA? Use Local transaction.

  • Percio

Do you have any adapter service with local transaction in the same flow service ??

A single transaction context can contain any number of XA_TRANSACTION connections but no more than one LOCAL_TRANSACTION connection. If the flow contains adapter services that use more then one LOCAL_TRANSACTION connection, the you must use explicit transactions.

Also note that we do get this error if try to execute the flow service which has implicit transactions in debug more.

Catch block should be exit on DONE.

Sorry for the late response

Hi,

additonal information:

the startTransactions should be before the first sequence as otherwise the transaction id will not be available for the rollback step.

I cannot see the requirement for a XA Transaction in your code sample.

Regards,
Holger