LOCAL_TRANSACTION Connection Type Usage Understanding

Hi Experts,

I have read many threads on Tech Forums regarding the usage of LOCAL_TRANSACTION connection type usage along with Adapter Services

Can you please concur if the below understanding is correct ?

Implicit Transaction

Scenario 1 : This will work
MAIN
TRY
Insert Adapter service which uses same LOCAL_TRANSACTION connection

Scenario 2 : This will work
MAIN
TRY
Insert Adapter service which uses same LOCAL_TRANSACTION connection
Update Adapter service which uses same LOCAL_TRANSACTION connection

Scenario 3 : This will work
MAIN
TRY
Insert Adapter service which uses same LOCAL_TRANSACTION connection
Update Adapter service which uses same LOCAL_TRANSACTION connection
Delete Adapter service which uses different LOCAL_TRANSACTION connection

Explicit Transaction

Scenario 1 : This will work
StartTransaction
MAIN
TRY
Insert Adapter service which uses same LOCAL_TRANSACTION connection
CommitTransaction
CATCH
RollbackTransaction

Scenario 2 : This will work
StartTransaction
MAIN
TRY
Insert Adapter service which uses same LOCAL_TRANSACTION connection
Update Adapter service which uses same LOCAL_TRANSACTION connection
CommitTransaction
CATCH
RollbackTransaction

Scenario 3 : This will NOT work
StartTransaction
MAIN
TRY
Insert Adapter service which uses same LOCAL_TRANSACTION connection
Update Adapter service which uses different LOCAL_TRANSACTION connection
CommitTransaction
CATCH
RollbackTransaction

Thanks,
Kailash

Hi Kailash

ADK(Adapter Development Kit) user guide describes in detail on what is supported by the Integration Server and when to use the explicit Transaction . Please take a look at the “Integration Server Transaction Support” in ADK user guide.

Implicit Transaction Scenario 2 : Integration Server reuses the same connection , when it finds, its already being used in flow/current execution . As the Transaction scope , has only 1 LT(Local Transaction) resource, service execution will succeed.

If a flow service contains multiple local transactions, then the user must explicitly control the
scope of the transaction, by using Explicit Transactions.

So scenario 3 in Implicit Transaction wont work. It will fail with the exception(commit failed. more than one local transaction enlisted), if you execute the flow service.

Scenario 3 for explicit Transaction also wont work(as mentioned by you correctly) . Transaction scope cannot have 2 different Local Transaction resources.

Hope this helps. Please do refer to ADK IUG as well.

Thanks
Nagasrikrishna

@Nagasrikrishna_Dasari

Thanks a lot for your input and reading suggestion. Now things are clear.

This topic was automatically closed after 1083 days. New replies are no longer allowed.