I'm doing exactly the same thing and am experiencing the same problem with Hibernate v3.1.3. Did you ever find a good solution to your problem? So far the only solution I've found is to set the following property:
Code:
hibernate.connection.release_mode on_close
but this doesn't seem like the best solution to me as it's a global setting and is not really recommended according to the manual. It seems to me this is actually a bug in Hibernate. Shouldn't Hibernate do a check for open resultsets/cursors instead of blindly releasing the connection at the end of a transaction?
Thanks,
Corey