I’m having some issues with the pub.ART.transaction:start/commit/rollback on our 6.01 IS. I’ve got a nested transaction that isn’t closing out, so my parent flow can’t commit the parent transaction. Flow looks like:
Enter flow A
Start transaction
Do stuff including:
A) Enter flow B
B) Start transaction
C) Commit or rollback based on if database operations within flow B succeed or fail
D) Return to flow A
Commit or rollback based on if several “sub-flows” within flow A succeed or fail
I’m finding that the IS gives flow A a transaction id of 1043. Within flow B it creates transaction ID 1045. Flow B completes, records show up in the database (so it must be committing, and it should be closing out txn 1045) , but I get an error message from flow A saying :
Error while committing transaction 1045. The transaction in progress is 1043.
my transaction IDs are auto-generated by IS, NOT hard-coded. any ideas where I’m going wrong here?
Here In your mail you mention A) Enter flow B.Then you called
B) StartTransaction.Is case B is inside Flow B or separate one?
I mean StartTransaction,case C etc…
If case B,Case C are inside Flow B.Then you create separate
Service.In that service you have to create try/ catch block if second
service startTransaction completed successfully then it commits.If some problem occured in your database Your startTransaction service not
completed Cursor goes to catch block there you have called rollBack,
ClearTransactionServices.
Now call this FlowB service you separatly created
into your main flow Service A after completion of your StartTransaction,dostuff then call flow B.
In your catch block for flow A you call getlastError service,rollBackService,ClearTransaction Service.
If flow B fails,It jumps to catch block in B,Then catch
block in A.It bubbles up error.This gives clear picture.
Srinik - thanks for the post. Yes, A,B,C, and D all are within “flow B.” I have seen several references to “ClearTransaction” service, but I cannot find it. With the new 6.01 integration server, I only have 4 adapter runtime (ART) transaction services. start, commit, rollback, and setTimeout. Am I missing something obvious, or did that service go away when the new version came out?
What I’m finding is that the nested service commits, but the IS fails to recognize that the nested transaction is complete so the parent transaction cannot commit. The error message I get basically says “cannot commit parent transaction because the nested transaction is still running,” which is not the case, because I can see in my database that the nested transaction has committed. so a “clearTransaction” service sounds like just what I need, but I can’t find it. Thanks,
You are right."ClearTransaction" service is not provided in
WmART package.But we used it in our integration.This service available
from WmDB package.We are using ver 6.0.1.Earlier in 6.0(fcs ver) I
used JDBC Adapter for DB Manipulations.But I feel difficult to find out
ART Exception for all types of Db Exceptions.Then onwards I am using
WmDB services for this type of database transactions.
Hi All,
I am using wmdb package to insert the records in to as/400 database. I am not getting any error message. But the records are not updating. However the records are updating when ever I remove the starttransaction and commit.
Here is the screen shot. Could you please give me an idea. Really I appreciate your help.
thanks
Nandu