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
Expand all | Collapse all

SP Call Issue

  • 1.  SP Call Issue

    Posted Mon July 25, 2005 09:49 PM

    Hello,

    I have a weird situtation where in the service end up returning null results when calling a SP thats supposed to return some values. I am using wM 6.1, Oracle 10g and JDBC Adapter.

    I was calling a SP which returns the cursor as output. When I was calling this SP for the first time, it was returning the cursor with all the values from the desired table. But when I was calling the same procedure for the second time or further, the cursor wasnt returning any data. Using Local_Transaction and oci driver type in the configuration settings and does these settings have anything to do with that? anyone come across a situation like this??

    appreciate your responses.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 2.  RE: SP Call Issue

    Posted Tue July 26, 2005 07:51 PM


  • 3.  RE: SP Call Issue

    Posted Wed July 27, 2005 07:21 PM

    John,

    I haven’t invoked Oracle SP’s that return cursors using WM JDBC Adapter Services.

    What is the behavior when you use the thin JDBC adapter rather than OCI? What happens with No_Transaction rather than Local_transaction?

    Mark


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: SP Call Issue

    Posted Wed July 27, 2005 08:09 PM

    Mark,

    Thanks for the response. I tried using thin Driver as well as No_Transaction but the behavior is same regardless of Driver type and Transaction kind. Any more thoughts???

    John


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 5.  RE: SP Call Issue

    Posted Wed July 27, 2005 08:49 PM

    Is this the case with any stored procedure you have tried to call using jdbc adapter or only this one, try to narrow down your problem by writing a stored procedure that returns cursors, a simple one to start with and see how your jdbc adapter respond. If it is behaving normally then only above mentioned stored procedure is the culprit; In that case provide more info on your stored proc and we might be able to help.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: SP Call Issue

    Posted Wed July 27, 2005 08:58 PM

    BTW, have you applied all relevant updates and patches for the JDBC Adapter v6.03?


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 7.  RE: SP Call Issue

    Posted Wed July 27, 2005 09:48 PM

    Adnan n Mark,

    Thanks alot for your valuable suggestions. I will try to work taking your inputs and will let you know if the problem still persists.

    Appreciate your responses.
    John


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: SP Call Issue

    Posted Thu July 28, 2005 04:59 AM

    Hi John - Note that in general, the OCI driver is more robust than the thin driver. For example, the OCI driver has to be used to return complex data types (e.g., arrays) whereas the thin driver only supports simple data types (e.g., integer, varchars, etc.).


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 9.  RE: SP Call Issue

    Posted Thu July 28, 2005 03:17 PM

    Rajesh,

    Thanks. Oracle cursor in our case returns a set of records that contain simple data types like number or varchars. Do you think thats a better idea to go for OCI driver since the SP call involves Cursor? (I will try to work with both driver types thou)
    Also, what difference does that make using NO_TRANSACTION or LOCAL_TRANSACTION type?


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 10.  RE: SP Call Issue

    Posted Thu July 28, 2005 05:21 PM

    john jdbc adapter user guide located in …\IntegrationServer\packages\WmJDBCAdapter\doc explains in detail what each type means, pls take a look at pg 15.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 11.  RE: SP Call Issue

    Posted Thu July 28, 2005 06:27 PM

    “Also, what difference does that make using NO_TRANSACTION or LOCAL_TRANSACTION type?”

    For the connection transaction type you use, it will depend on whether or not you want to maintain a transactional context for the rest of your service. As Adnan mentioned, you can read up on the implementation details in the JDBC Adapter documentation.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 12.  RE: SP Call Issue

    Posted Thu July 28, 2005 06:53 PM

    Thank you guys. Appreciate your time and suggestions. At last i was able to make it work. I made changes to the Transaction types, driver types and also modified the SP.

    I figured out the solution and my understanding is that since wM Adapter service doesnt have an option to close the cursor (Java apps do this thou) after fetching the data from the table, made changes to the SP logic (in DB) to see if the cursor is open and if its open, force it to close.

    anyways, thanks again for your support guys.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB