This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes SQLJ - Result Set closed error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
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: http://aspose.com/file-tools
 
subject: SQLJ - Result Set closed error
 
Similar Threads
DSRA9110E Connection is closed
DB2 SQLJ binding error
java.sql.SQLException: ORA-01000: maximum open cursors exceeded
Reusing Statement Object
HTTP 500: error..helpl Please!!!!