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.  Explicit transaction management

    Posted Thu November 12, 2009 12:31 PM

    Hi,
    please help me in the below issue

    the flow is as below:

    starttransaction for serviceA
    sequence(main)
    sequence(try)
    Invoke ServiceB
    Invoke adapter service
    invoke adapter service
    commit transactionA
    sequence(catch)
    RollBack transactionA

    Starttransaction for serviceB
    sequence(main)
    sequence(try)
    Invoke adapter service
    Invoke adapter service
    commit transaction for serviceB
    sequence(catch)
    RollBack transaction for transactionB

    If some error occred in adapterservices invoked by A, will the transactions that happened in service B roll back or not?

    Thanks,
    Rajasekhar


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


  • 2.  RE: Explicit transaction management

    Posted Thu November 12, 2009 06:37 PM

    I suspect at run-time you won’t get that far. In B when startTransaction is called I believe it will fail with “already in parent transaction.”

    It may work if the ID passed to startTransaction in B is the same as in A. Then they will be treated as a single trans. I think. You’ll want to extensively test.

    I usually try to avoid nested transactions such as this.


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


  • 3.  RE: Explicit transaction management

    Posted Thu November 12, 2009 09:52 PM

    No i don’t think trans in B can rollback.Yes try with same ID used in trans A and pass to B.And I do agree with Rob avoid nested transactions.

    Also put Exit step - Signal on Failure in both the catch blocks to rollback (explicit transactions) and try to test it.

    sequence(catch)
    getLastError
    RollBack transaction
    Exit (Signal on Failure)

    HTH,
    RMG


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