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??
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???
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.
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.).
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?
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.
“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.
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.