IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

implicit transactions

  • 1.  implicit transactions

    Posted Wed March 12, 2008 03:15 PM

    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


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 2.  RE: implicit transactions

    Posted Wed March 12, 2008 03:19 PM

    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.


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 3.  RE: implicit transactions

    Posted Wed March 12, 2008 06:19 PM

    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


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 4.  RE: implicit transactions

    Posted Wed March 12, 2008 07:24 PM

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


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: implicit transactions

    Posted Wed March 12, 2008 08:33 PM

    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.


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: implicit transactions

    Posted Thu March 13, 2008 12:12 PM

    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


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 7.  RE: implicit transactions

    Posted Thu March 13, 2008 04:12 PM

    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

    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods


  • 8.  RE: implicit transactions

    Posted Thu March 13, 2008 04:17 PM

    Mark,

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

    I hope this helps,

    Percio


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods


  • 9.  RE: implicit transactions

    Posted Fri March 14, 2008 02:29 PM

    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.


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 10.  RE: implicit transactions

    Posted Tue July 22, 2008 01:02 PM

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


    #webMethods
    #Adapters-and-E-Standards
    #Integration-Server-and-ESB


  • 11.  RE: implicit transactions

    Posted Tue July 22, 2008 03:36 PM

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

    • Percio

    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB