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.

 View Only
  • 1.  jdbc commit transactions

    Posted Wed February 08, 2006 10:19 PM

    hi experts,
    i have a flow service where i am creating five loops and inserting data into five different tables,i.e entering data into each table in each loop.
    the question is , i want to make all these five insertions as one transaction,i want to commit only after the fifth table gets succecfully inserted if not i have to rollback all the data entered in remaining tables.
    can anybody tell me how can i do it in flow service ,
    thanks srikanth


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


  • 2.  RE: jdbc commit transactions

    Posted Thu February 09, 2006 01:58 AM

    Are you using same transactionName? from starting of the transaction till you commit using wmART services?

    What you can do is put a flag under each loop and at the end check the flag if it is true then do comit transaction if not rollback.ofcourse you have to handle rollback transaction for trasient/network failures…

    HTH,
    RMG


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


  • 3.  RE: jdbc commit transactions

    Posted Thu February 09, 2006 01:52 PM

    hi RMG
    i have five loops and in each loop i am inserting data into a table , i.e into five different tables , i havent used any start transaction ,commit transaction and rollback transaction yet in my flow .
    my flow looks like this, can u tell me if i add the steps in the paranthesis below to my flow does it work .

    try block
    (pub.art.transaction:startTransaction)
    loop 1
    insert table 1
    loop 2
    insert table 2
    loop 3
    insert table 3

    loop 5
    insert table 5
    (pub.art.transaction:commitTransaction)
    catch block
    (pub.art.transaction:rollbackTransaction)
    exception handling

    can u explain me if there is any better way to make all five loops as a single transaction.
    thank you
    srikanth


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


  • 4.  RE: jdbc commit transactions

    Posted Thu February 09, 2006 03:44 PM

    Your approach is straight forward for insertion,what i am telling is put some flag in the each loop,if true or success then commit thetransaction else false then rollback the transaction.so at any point you will able to handle comit/rollback the whole transactions.

    This way you can insert all the five tables in single transaction,since transactionName object will be carried thru all pipeline.

    HTH,
    RMG


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


  • 5.  RE: jdbc commit transactions

    Posted Tue February 21, 2006 03:43 PM

    when rollback the transaction, set the transaction name with
    %lasterror/pipeline/starttransaction/transactionname%, and select perform variable substitution.
    Nancy


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