I’ve used a main service, which uses select adapter service and update service. Another service is called inside main service which uses batch insert adapater service.
Select and update adapter service uses one connection(Local_Transaction)
Insert adpater uses another connection(Local_Transaction)
I’ve used Start,commit,rollback for update and batch insert adapters.
Still i receive the following error.
com.wm.pkg.art.error.DetailedServiceException: [ART.117.4018] Adapter Runtime (Adapter Service): Error while closing transactions at service completion Error:[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…
[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.
Can anybody share an option to solve the error:( .
is it required that the insert adapter uses a different connection?
Can you share the layout of your services (esp. where there transactions are started, commited and/or rollbacked)?
Is it neccessary for update and insert to be committed or rollbacked together (all-or-nothing) or can they be committed separately?
Looks like some improper transaction handling.
Unfortunately those services cannot be debugged in Designer/Developer as this breaks the transactions by default.
If you plan to try Mahesh´s approach make sure that the transaction id from the sub service is dropped at the end of the sub service and will not be returned to the main service.
Otherwise it might corrupt the transaction in the main service.
As the select Adaptor does not really need transaction control, it can be useful to use an additional NO_TRANSACTION-connection for the select Adaptor outside of the transaction controlled block.
If Update and Insert should complete or fail together you should definitely consider XA_TRANSACTION here.
If Insert completes, but Update fails (or vice versa) XA_TRANSACTION is not neccessary, but depending on your use case and/or data consistency policies might lead to inconsistencies in the data.
Yes startTransaction should be very first step and make sure the transactionName is dropped properly before the next transaction starts and this would be tricky initially because that’s the way how local transaction objects work in the IS with propery Try/Catch sequence handling etc…
HI,
one question if i want to used batch insert and in the same transaction another update normal to a different DB, how the configuration of the adapters have to be ?
batch insert —> local_transaction or xa_transaction
update normal ----> xa_transaction
i have thi doubt because i have read that the operation under batch have to use local_transaction.
Thumb rule is, you could have only one connection with LOCAL TRANSACTION type inside a transaction boundary, and any other connections should be of type XA while dealing with multiple instances of db…
So, either you can have one LOCAL and another as XA, or both could be XA…
Kindly review :Built-In Transaction Management Services: from the JDBC adapter guide. It is explained clearly with examples. To handle No, Local and XA Transactions.