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
Expand all | Collapse all

Local Transaction in jdbc adapter

  • 1.  Local Transaction in jdbc adapter

    Posted Mon January 09, 2012 11:54 AM

    Hi Users,

    I have gone through the JDBC Adapter Guide…for adapter connection…
    but Local transaction is still not clear to me .How it work in real scenario …
    can any one give me the Example for local transaction…

    Please can any one help for explaning it…:confused:


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Local Transaction in jdbc adapter

    Posted Tue January 10, 2012 07:47 AM

    Hello All,

    can you please help me to clear this …


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: Local Transaction in jdbc adapter

    Posted Wed January 11, 2012 10:01 AM

    You said you do not understand only local transaction it means you understood xa transaction. it is little weird to me. But ok please let me know what you do not understand exactly in local transaction.

    Regards,
    Vikas


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Local Transaction in jdbc adapter

    Posted Wed January 11, 2012 11:46 AM

    Hi Vikas,

    In the Local Transaction by guide line its very clear that in this transcation in which multiple actions on a resource(database) are treated as a single unit and are all committed or rolled back together.
    all the operation perform only in one database and if there is any problem occure to update the info. it will rollback from there…

    But I need to know any example for that …
    Thanks for you input…can you please suggest any example for that…


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 5.  RE: Local Transaction in jdbc adapter

    Posted Wed January 11, 2012 05:36 PM

    No transaction – means the DB manages the transaction (not IS); this is “auto-commit”
    Local transaction – means IS manages the transaction; can only involve one Local transaction connection and 0 or more “No transaction” connections
    XA transaction – means IS manages the transaction and can handle distributed transactions (operation over more than 1 database)


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 6.  RE: Local Transaction in jdbc adapter

    Posted Thu January 12, 2012 06:03 AM

    Local transaction means in a single transaction we can do multiple operations on a single database. To be more clear all these multiple operations use the same Adapter connection.
    XA transaction means in a single transaction we can do multiple operations on different databases.
    To be more clear all these multiple operations use different Adapter connection.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 7.  RE: Local Transaction in jdbc adapter

    Posted Thu January 12, 2012 07:46 AM

    Hi Mukesh,
    Local transaction can be used in two ways. First one is using transaction boundry and second one is without using transaction boundry (Not recommended instead use NO_Transaction). When you do not define transaction boundry then local transaction behaves as no transaction. When you use transaction boundry then you start the local transaction for one database and do the necessary action and at last you commit all your action and incase of error you roll back all your changes.

    For Ex: you have list of 100 document and all has to be inserted into database and comit will be done when all document inserted successfully else rollback will be called.

    NOTE: Never use two local transaction in a same flow service without defining transaction boundry.

    Regards,
    Vikas


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: Local Transaction in jdbc adapter

    Posted Thu January 12, 2012 07:54 AM

    Thanks you very much Vikas ,Reamon and Mahesh for making the clear idea about the Local Transaction …

    Really its very much clear to me know…Thanks you very much…:slight_smile:


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 9.  RE: Local Transaction in jdbc adapter

    Posted Thu January 12, 2012 03:40 PM

    This is close but not quite accurate.

    The description of XA transaction is correct.

    But the Local Transaction description is a bit off. When using Local Transaction for DB activity one can use multiple connection pools as long as only one of them is defined with Local Transaction and the others are No Transaction.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 10.  RE: Local Transaction in jdbc adapter

    Posted Thu January 26, 2017 04:25 AM

    Hi,

    In local transaction, when we use mulitple operations for with same adapter connection . Any error in one operation roll backs the other operations.

    Thanks,
    Sathya


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 11.  RE: Local Transaction in jdbc adapter

    Posted Wed July 05, 2017 10:52 AM

    Hi,

    When NO_Transaction auto commits the transactions, what do we do in case of any errors?
    To be more clear for example, we are performing an insert of 100 rows into a table and have used NO_transaction as transaction type. The connection is lost after inserting some 40 rows and the transaction has failed. As it is an auto commit and we cannot roll back this transaction, what do we do in this case?

    When it has this drawback, why do we use NO_transaction? where exactly do we use no_transaction?

    please give me an example for each type of transaction


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 12.  RE: Local Transaction in jdbc adapter

    Posted Wed July 05, 2017 12:51 PM

    You have to use local transaction connection. To handle commit or rollback use the services present in WmART package.

    For more details refer jdbc adapter guide.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 13.  RE: Local Transaction in jdbc adapter

    Posted Thu July 06, 2017 04:06 AM

    where do we use NO_transaction then?

    In what situation do we use NO_transactions?


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 14.  RE: Local Transaction in jdbc adapter

    Posted Thu July 06, 2017 11:13 AM

    Use no transaction for select and local transaction for any DML (insert, delete, update) operations to handle the transaction boundary (via start, commit and rollback).

    As per your need, you go with local tx to handle the transaction manually.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 15.  RE: Local Transaction in jdbc adapter

    Posted Sat December 08, 2018 01:46 PM

    "In local transaction, when we use mulitple operations for with same adapter connection . Any error in one operation roll backs the other operations. "

    Iam using local transaction when error in one operation then roll back not happening in all the other successful operations, may i know what might be the reason ?

    This was working fine previously, not working after I changed few mappings to the adapter service.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 16.  RE: Local Transaction in jdbc adapter

    Posted Sat December 08, 2018 06:50 PM

    Hello Sandeep,

    I would suggest you create a new thread and do not hijack an old thread. Provide all the details including the IS and fix levels and also a code snippet if possible.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods