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

Transaction state:Transaction is rolled back [ART.117.4036].

  • 1.  Transaction state:Transaction is rolled back [ART.117.4036].

    Posted Tue May 23, 2006 09:33 AM

    Hi,

    I’m trying to implement a service which checks all my database connections to be sure everything is up and running. To achive this I use the different JDBC-adapters we have installed and fire a ‘select sysdate from dual’ (Oracle) of ‘select getdate()’ (SQL-server) statement to the database. The results are passed to the main-flow service.

    The main flow looks like:
    try

    • CheckDatabase1 (Oracle)
    • CheckDatabase2 (Oracle)
    • CheckDatabase3 (SQL-server)
    • CheckDatabase4 (Oracle)
    • CheckDatabase5 (SQL-server)
    • CheckDatabase6 (SQL-server)
      catch
    • If anything fails raise error
      exit

    Each CheckDatabase flow is like:
    select sysdate from dual
    map result into variable db_Timestamp
    clear pipeline except db_Timestamp

    If I step through this flow in developer it works exactly as expected. Also running a trace gives the same result.

    But… if I run this service I get the following error:

    com.wm.app.b2b.server.ServiceException: [ART.117.4036] Adapter Runtime (Adapter Service): Unable to rollback transaction. Transaction state:Transaction is rolled back

    I read things about using transactions, but this gives the same results on running the main-flow.

    Anybody some good idea how to solve this?

    Regards,

    Jeroen


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


  • 2.  RE: Transaction state:Transaction is rolled back [ART.117.4036].

    Posted Tue May 23, 2006 11:10 AM

    Hi Jeroen,
    it looks that, it doesnt work because your are connecting to different database in the same transaction. To solve the problem You have to either use XA transaction or use explicit transaction management. That is your main flow will look like:

    startTransaction

    • CheckDatabase1 (Oracle)
      commitTransaction
      startTransaction
    • CheckDatabase2 (Oracle)
      commitTransaction
      startTransaction
    • CheckDatabase3 (SQL-server)
      commitTransaction
      startTransaction
    • CheckDatabase4 (Oracle)
      commitTransaction
      startTransaction
    • CheckDatabase5 (SQL-server)
      commitTransaction
      startTransaction
    • CheckDatabase6 (SQL-server)
      commitTransaction

    The trace can work because each step of the flow is run in separate thread, and then transactions work differently.

    best regards
    Kasper


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


  • 3.  RE: Transaction state:Transaction is rolled back [ART.117.4036].

    Posted Tue May 23, 2006 11:45 AM

    Hi Jeroen

    This error generally comes if the transaction is still active.

    If you handle transactions correctly this error will not come. Check to Commit/rollback all transactions opened.

    Regards

    Sreedhar


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


  • 4.  RE: Transaction state:Transaction is rolled back [ART.117.4036].

    Posted Tue May 23, 2006 12:42 PM

    Kasper, Sreedhar,

    Thank you for your help. I changed my main flow as suggested and now everything works as expected.:happy:

    May thanks,

    Jeroen


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