implicit transactions

Hi,

I am trying to understand how implicit transactions work in web methods.

Environment IS 6.1 JDBC adapter 6.0.3.1 , using oracle thin client and LOCAL_TRANSACTION.

I have a simple test flow that

insert row A using a dynamic sql adapter— which will always succeed
insert row B using the same dynamic sql adapter— which will fail

I had assumed the implicit transaction would roll back, but row A is committed, it appears that row A is being auto committed.

Everything works as expected when explicit transaction control is used.

Thanks in advance for any help

Mark

Mark,

In your situation row A should roll back, are you stepping through the service to see the roll back because if you do then every transaction is on its own i.e. every transaction will auto commit before it moves to next step, this is because when you step through the service you actually call each step sepeartely.

Thanks for the reply.

I have tested this both with the developer (not stepping through) and through the web.

Row A is committed and is not rolled back

Mark,
Interesting… post more details on the dynamic sql you are using to row A to succeed and row B to fail?

Mark,

Are you using Exit with signal failure in your catch block i.e. after the error occurs in row B it should go to Catch block, where at the end you are supposed to use Exit with Signal failure for auto rollback.

Hi,

I took another look at my try and catch, by setting the exit from $flow, I can stop row A going in. But if i’m calling my test flow from a parent flow, row A is still committed !!. This is how i would have to call the flows.

The dynamic insert statements are very simple, i was investigating whether i could apply implicit transaction control to some legacy flows, to stop partial data being applied. I am trying to minimise changes required.

And i guess that implicit transactions are not the way to go, the documentation in this subject is rather poor.

Thanks for your help
Mark

Mark,

If your parent/top-level service has a try-catch block, you will need to rethrow the exception from within the catch block. The implicit transaction is associated with the top-level service. Therefore, if that service completes without an error, then the transaction is assumed to have succeeded.

  • Percio

Mark,

Here’s an excerpt from the JDBC Adapter User’s Guide:

I hope this helps,

Percio

Hello All,
My service will do some database operations.This service is scheduled one.

The service will fetch data from database and after business logic
updates the same to database.

I like to know is it safe to run this job for every 15 minutes.

As in our scenario IS and database locations are very very far.

Any suggestions will make me helpful

Rajesh.

how do we roll back the data to the database when jdbc adapter is dis connected due to some unknown reasons.

There are numerous threads here in WMUsers that talk about rolling back adapter transactions (including this one.) Please search and read.

  • Percio