This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes SQLJ - Result Set closed error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "SQLJ - Result Set closed error" Watch "SQLJ - Result Set closed error" New topic
Author

SQLJ - Result Set closed error

Amit Mathur
Ranch Hand

Joined: Jan 22, 2002
Posts: 49
Hi ...I am facing a strange issue while executing concurrent transactions from my sqlj code in Websphere. When I have a cursor retrieved using iterator and manipulated using FETCH , in one txn I get "Invalid operation: Result set closed" while the other txn goes through.

The same code when I wrote using normal JDBC (prep stmt and ResultSet), then I dont get any such error.( java generated from sqlj also has
Currently I am testing using 2 parallel txns only.
Database is DB2 UDB 8.0.

any ideas folks?
Thanks in advance


amit
Amit Mathur
Ranch Hand

Joined: Jan 22, 2002
Posts: 49
seem to have solved it!
I was using the DefaultContext for execution of sql's, but for multithreaded applications DefaultContext should not be used.( due to some static fields used by it)
On explicitly specifying the Connection contexts the issue is resolved.
 
I agree. Here's the link: jrebel
 
subject: SQLJ - Result Set closed error
 
Similar Threads
DB2 SQLJ binding error
DSRA9110E Connection is closed
HTTP 500: error..helpl Please!!!!
Reusing Statement Object
java.sql.SQLException: ORA-01000: maximum open cursors exceeded