This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQLJ - Result Set closed error

 
Amit Mathur
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 Mathur
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic