Delay in the release of connections to pool after closing.
Hi,
I'm using typical jdbc code to close the Connections got through ConnectionPool created on Weblogic 8.1. When the data access / update code is completed execution, I could observe couple of connections still open in the weblogic console connections monitor screen.
These open connections are getting released after 15 minutes approximately, provided if I'm not accessing any DB access/update code till then.
I'm using the following code for closing all the jdbc resources.
publicstaticvoid closeAllResources(){
try{
if (rSet !=null){
rSet.close();
rSet =null;
}
if (rSet2 !=null){
rSet2.close();
rSet2 =null;
}
if (preStatement !=null){
preStatement.close();
preStatement =null;
}
if (callStatement !=null){
callStatement.close();
callStatement =null;
}
if (conn !=null){
conn.close();
conn =null;
}
}
catch (SQLException e){
}
}
I'm closing the jdbc resources as follows in finally block...
publicstaticboolean saveXXX(String userid, ArrayList list)throws SQLException{
BaseDAO baseDAO =null;
String scode=null;
try{
baseDAO =new BaseDAO();
conn = baseDAO.getConnection();callStatement = baseDAO.prepareCallableStatement("call pkg_1.pr_add_XXX(?,?)");
callStatement.setObject(1, userid);
callStatement.setObject(2, scode);
int saveResult = callStatement.executeUpdate();
}
finally{
closeAllResources();
}
returntrue;
}
}
}
Both the above methods are present in the same java class.
Can sombody help me in resolving the issue immediately?
Regards
Sudarsan

