[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ProgSoc] ResultSet
On Wed, 17 Apr 2002, Mads G. Sørhaug wrote:
> We are two students from Norway, that searched the Internet for anwers
> on what we could do with our "Exhausted ResultSet", and we found a page
> where a student asked you about the same thing. Would you be so kind to
> help us with this problem? We don't know what Exhausted ResultSet means,
> why we get it, or what to do with it. If you could help us, we would be
> eternally grateful.
> Borre and Geir
Suresh, you're the Database eggspurt here. Have you figured out a way to
capture an Exhausted ResultSet in the last 2 years since you posted this
page? (Talk about the past haunting you back) =D
Anyway, I guess I can sorta have a go at answering this and hopefully make
some sense in the process. Feel free to correct me, anyone.
An Exhausted ResultSet usually comes from a Statement Object being
accessed simultaneously by more than one session. This can usually happen
when your server is under heavy loading (though not the only reason) and
the ResultSet object, being entirely dependent on the Statement Object
that created it, is closed at the instant two session try to access the
statement object simultaneously.
The result is the Statement Object trying to close the same ResultSet
Object *twice* (A ResultSet is closed everytime the Statement Object
that created it closes, re-executes, or is used to retrieve the next
result from a sequence of results. You can imagine what'll happen when two
sessions call the same statement object simultaneously), hence the
Some suggest the best way to avoid this problem is to make less
prepareStatement calls on the connection. Others suggest creating new
prepareStatement Objects for each individual session to prevent the
likelihood of sessions using the same Statement object.
There ya go. I hope that helps, I hope it made sense, and I hope I got it
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to email@example.com.
If you are having trouble, ask firstname.lastname@example.org for help.