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

JDBC Adapter 601

  • 1.  JDBC Adapter 601

    Posted Thu June 12, 2003 09:57 AM

    Hi
    I did the following in the flow:

    1. start Transaction
    2. SQL service to call stored procedure
    3. rollback Transaction (if stored procedure returns error)

    The flow service completed successfully but there’s an error log like this:

    2003-06-12 16:15:30 GMT+07:00 pub.art.transaction:rollbackTransaction [SCC.0121.0026E] delisted transaction commit failed: javax.transaction.RollbackException: Already marked for rollback xid = server-webMethods/1055404280974 Stack trace data … a2411cd24a8c16bcf5914d5305 NULL a2411cd24a8c16bcf5914d5305

    Anybody knows what does that mean ?
    Thanks.


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


  • 2.  RE: JDBC Adapter 601

    Posted Thu June 12, 2003 12:27 PM

    Hi, cK.

    The Flow finished but are you sure it was successful? For example, did your stored procedure perform as expected?

    To get a better handle on your error, step through your Flow using F7. After stepping over the stored procedure step (step #2 in your post), look at the Results tab in Developer. Make sure that there re no strange values in there that may indicate a problem.

    If everything looks normal, try taking a (small) screenshot and uploading it to your next post. This forum allows for images of 500x400 pixels and less than 30k. You could also try using a BMP and zipping it up.

    Being able to see what you see may help somebody to debug with you.

    Thanks.


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


  • 3.  RE: JDBC Adapter 601

    Posted Fri June 13, 2003 02:06 AM

    I couldn’t perform a step-thru on startTransaction service as it showed error. Pls see the error message in the screenshot.

    If I run the service, it completed successfully. No strange values. The insert statement also rollback successfully.

    It’s just the server error log the error messages shown in my previous post.

    BTW, the transaction type for my jdbc connection is LOCAL_TRANSACTION.
    Any idea?


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


  • 4.  RE: JDBC Adapter 601

    Posted Sun June 15, 2003 01:29 PM

    Hi ck,

        In  JDBCAdapter for insert operation,There is no need of  
    

    calling startTransaction,RollbackTransaction operations.Internally
    JDBC Adapter take care of.Try only call insert service only.

    Thanks,
    SriniK


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


  • 5.  RE: JDBC Adapter 601

    Posted Sun June 15, 2003 01:32 PM

    Ck,

    For Calling storedProcedure also JDBC Adapter internally take 
    

    care of(wmART).No need to call startTransaction,RollbackTransaction
    like in wmDB Adapter.

    Thanks,
    SriniK


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


  • 6.  RE: JDBC Adapter 601

    Posted Mon June 16, 2003 01:54 AM

    Hi Srinik
    Thanks for the reply.
    If I want to rollback a transaction based on the return value from the stored procedure, how should I do?
    For example, the service internally loop 5 times to call a stored procedure, stored procedure processes the first 2 looping successfully but returns value to indicate error on the 3rd looping, how should I do to rollback the first 2 calls?
    Thanks.


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


  • 7.  RE: JDBC Adapter 601

    Posted Mon June 16, 2003 07:56 PM

    Hi CK,

    I think you used startTransaction from WmART package,pub.art.transaction:startTrasaction.It input is transactionName 
    

    inside startTransactionInput document.So you have to setup any name
    like alias for trasactionName.You have to setvalue(hardcoded).Pass
    this value to trasactionName string in rollbackTransaction service.
    I think this will work.Otherwise you can use wmDB package.

    Thanks,
    SriniK


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


  • 8.  RE: JDBC Adapter 601

    Posted Tue June 17, 2003 01:21 AM

    Hi Srinik
    Yes, that’s exactly what I do. Unfortunately the error message appeared in the error log even though the transaction has been rolled back successfully.
    Anyway, thanks.


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


  • 9.  RE: JDBC Adapter 601

    Posted Thu October 09, 2003 07:24 PM

    Hi Ck:
    That message only indicates that you have a exception in your stored procedure and the IS server executes a rollback. However, there is nothing wrong with it.

    However, we are also have problems to trace services(F7) when we use a startTransaction service inside.Did you solve your problem finally?.

    Regards
    Gonzalo


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


  • 10.  RE: JDBC Adapter 601

    Posted Tue January 13, 2004 06:11 PM

    Hi all,

    I’m a WebMetohd’s newbie. I’ve already configured a JDBC connection, and an adapter service to insert in my Oracle Database. However, I have no idea how I’m suposed to control the transaction of my JDBCAdapter service. How I’m supposed to rollback if one of the lines is incorrect? I must use a TRY-CATCH sequence?

    Thanks in advance,

    Ignasi


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


  • 11.  RE: JDBC Adapter 601

    Posted Mon January 19, 2004 06:01 AM

    Ignasi If you used NO TRANSACTION in your JDBC connection setting you do not have control over this. your transaction will be commited automatically after every executionas as well as it will be rolled back if error occures. This is using default autocommit of standard JDBC Api. If you use LOCAL TRANSACTION setting that you have some control using commiTransaction rollbackTransaction built in services


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


  • 12.  RE: JDBC Adapter 601

    Posted Mon January 19, 2004 11:06 AM

    Now I’m using LOCAL_TRANSACTION. But I’m having some kind of problems related with an insert opertion. The first time I try to insert in my DB it works fine (and quick), but when I try to insert a record again, it doesn’t seem to do anything. If I take a look at the Transaction page in the Terminal Services Client, I can see that my main flow has been invoked, but nothing more happens. Does anybody know what’s happening?

    If it helps, I’m using an adapter service (InsertSQL pattern), and without ant transaction management.

    Thanks in advance,

    Ignasi


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


  • 13.  RE: JDBC Adapter 601

    Posted Mon January 19, 2004 12:03 PM

    Hi all,

    I’m working with JDBCAdapter, and all I’m doing with the DB are inserts and updates. I’m supposed to use the wmART.pub.art packacge to manage the transactions, or are internally checked?

    It’s necessary in the case that I musn’t perform one action depending of the result of one update done before?

    Thanks in advance,

    Ignasi


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


  • 14.  RE: JDBC Adapter 601

    Posted Mon January 19, 2004 12:56 PM

    Hi Ignasi,

    When you use LOCAL_TRANSACTION it is mandatory to have a start/commit/rollback trans that’s in WmART.pub.art.transaction. Once you implement this in your service, it should be fine.

    Please let us know how your service responds after implementing this.

    One question…are both the services (insert / update ) to the same connection or different db connections?

    Cheers!
    Aara Amudhan


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


  • 15.  RE: JDBC Adapter 601

    Posted Thu January 22, 2004 09:28 AM

    Hi Aara,

    Thanks, my problem with the transaction is now solved. But I’m still having problems with my service.

    I think I’ve finally been able to determinate what’s going wrong with my JDBC adapter service. The tables where I’m trying to insert don’t have primary key (instead of this, a unique index is used). If I insert a record and then erase it, when afterwards I try to insert again the same record my service generates an infinite loop, and doesn’t seem to finish.

    Does anyone knows if this can be solved without modifying my tables definitions?

    Thanks in advance,

    Ignasi


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