| Vijay |
Mon Mar 24 10:51:08 GMT 2008 |
| |
We are trying to migrate to Primrose v3.0.10 from v2.7.0 in a tomcat-based web application.
We are getting "Got 1 unclosed [Callable/Prepared]Statements !" error while closing a pooled connection even though we are properly closing all the result sets, statements before closing the connections. Please look into below code snippet and let us know if we are doing something wrong.
Here is the code snippet that we are using to close the rs/stmt/connections. The statement returns ony one resultset.
if (rs != null) {
try {
rs.close();
}
catch(SQLException sqle) {
//
}
}
if (statement != null) {
try {
statement.close();
}
catch(SQLException sqle) {
}
}
if (conn != null) {
try {
conn.close();
}
catch(SQLException sqle) {
}
}
|
| |
| sedj |
Mon Mar 24 18:31:24 GMT 2008 |
| |
Hi,
This is one of those situations where you say you are sure you are closing your statemet objects ... but I'm sure that its not a bug in primrose, but in your code.
There should be a stack trace in the message that says you have unclosed statements ... are you absolutely 100% sure you are closing all those statement objects ?
If so, theres not a lot I can do without a test case, so if you are sure its a bug in primrose, a test case would aid me in proving a problem exists.
Cheers |
| VijayaKrishna |
Fri Mar 28 06:53:38 GMT 2008 |
| |
Hi Sedj,
Thanks a lot for your reply. I am definitely closing all resultsets and statements. I was trying to attach the complete code but I was not able to submit the message due to large size. Is there any way I can send you the code as an attachment?
Thanks
Vijay |
| sedj |
Fri Mar 28 15:04:36 GMT 2008 |
| |
| If you use the "Contact Us" page, I'll reply with my email ... |
|