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.  SAP 6.5 Problem in lockSession and releaseSession

    Posted Wed May 12, 2010 08:53 PM

    We are using SAP Adaper 6.5

    we receive JDBC Insert notifications and a serial trigger have been created to subscribe this notification document
    then we map those fields against SAP BAPI fields and call the BAPI by passing these values.

    Code snippet
    lock session
    Invoke the BAPI
    REceive the return parameters from the BAPI
    Check for MSG varaible
    when MSG=“S”
    Commit
    Release lock
    when MSG= “E”
    Rollback
    Release lock

    The problem we face is , suppose the table is inserted with 10 records in on shot then we get 10 different notification document been published, here the first notification document is picked by the trigger and calls the bapi and it works as expected. But on the consecutive calls we receive from the BAPI that webMethods User have not yet released the lock for this BAPI, but here in our code we have release lock which will release connection resources. but in originality for the second call the BAPI throws that it locked by the webMethods user… so even the release lock invoke is success in first call it doesnot actually releases the resources from SAP side… Could anyone have faced this issue… Please help me to resolve this issue.


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


  • 2.  RE: SAP 6.5 Problem in lockSession and releaseSession

    Posted Thu May 20, 2010 06:08 PM

    SAP does not synchronous apply updates or unlocks tables or bapis. You may need to but a delay or retry logic in your code to perform the bapi call.


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


  • 3.  RE: SAP 6.5 Problem in lockSession and releaseSession

    Posted Thu May 20, 2010 10:24 PM

    I do agree with as Bradley suggested,put some delay logic (thread sleep service) and try it.

    HTH,
    RMg


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


  • 4.  RE: SAP 6.5 Problem in lockSession and releaseSession

    Posted Thu August 19, 2010 04:35 PM

    Don’t play around with “sleep” or similar stuff.

    The correct way to do this: “pub.sap.bapi:commit” has an optional parameter called “wait”. If you set this to “true”, the backend waits until the DB update task has finished, before returning to the external caller.

    Lanzelot


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