webMethods

webMethods

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.  can't commit transaction

    Posted Thu November 08, 2007 10:19 AM

    JDBC Adapter 6.5, transaction type is LOCAL_TRANSACTION ,
    my flow service as below:

    public.art.transaction:startTransaction
    SEQUENCE(exit on success)
    –SEQUENCE(exit on failure)
    ----call jdbc adapter service to insert
    ----public.art.transaction:commitTransaction
    –SEQUENCE(exit on done)
    ----pub.flow:getLastError
    ----public.art.transaction:rollbackTransaction

    i get the following error msg when public.art.transaction:commitTransaction executes:
    [ART.114.303] Adapter Runtime (Transaction): Unable to commit transaction.
    null

    but i find the data have been insert to the database, it seem the transaction have not started. how to solve it. Thanks advance.


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


  • 2.  RE: can't commit transaction

    Posted Thu November 08, 2007 11:14 AM

    If you are running the service in trace mode then u’ll get this error:

    The whole transaction is considered as an atomic unit of execution. If you use stepping function, the transaction will be executed in different thread and thus different context, which causes the transaction failure. If you run the whole transaction as a single step, it should be run properly.

    If you need more information about the implicit transaction (which is configuration on the connection level) and explicit transaction (which is done using art services), you can refer to the JMS adapter user’s guide Appendix A, or JDBC adapter user’s guide Appendix C.

    Thanks,


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


  • 3.  RE: can't commit transaction

    Posted Mon November 12, 2007 09:22 AM

    Hi, Mratala,

    Thanks. it doesn’t throw any exception when i run the following as a single step. but i found out the transaction don’t work. it call public.art.transaction:rollbackTransaction to roll back the transaction after insert by calling jdbc adapter, but the data have been insert to the database,
    and it didn’t throw any error message. My database is Oracle 9i. please advice, thanks a lot.

    Toby


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


  • 4.  RE: can't commit transaction

    Posted Mon November 12, 2007 06:03 PM

    if you are using the rollback transation, I presume you are doing in the following way

    MAIN ( exit on Success)
    TRY(exit on failure)
    Logic to start, commit transaciton
    CATCH(exit on Done)
    get last error,
    roll back transaction.

    The get last error should capture the error details.


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


  • 5.  RE: can't commit transaction

    Posted Tue November 13, 2007 07:02 AM

    please take care of one thing … dont drop variable… bcoz wen comiiting or rool backing… it cant find those…

    thanks,
    shaik


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


  • 6.  RE: can't commit transaction

    Posted Fri January 04, 2008 03:58 AM

    Check to see if you are passing a valid transaction value to the startTransaction call.


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