hello guys

i am facing a problem regarding one of my servlet

i use init() method to initialize the connection to the database and after that i use destroy method to disconnect from the database.
like this

destroy() {
try {

connection.close();
}
catch (Exception e){

out.println(e);
}

but the problem is after a couple of hours and i think when the destroy method executed any request to the database failed.
this is the exception

java.sql.SQLException: No operations allowed after connection closed.

now i dont really know the solution for this matter but if there is a way to solve it please dont hasitate to response

thanks