Connection getting closed automatically

I have written an web application and deployed in tomcat. I am using simple pojo java beans to access the database connection in my jsps. The problem is after some time (30-45 mts) if no activity is done on this application I am getting the null pointer exception. I suspect that the connection with the database is getting closed.

Will the database (mysql) automatically get closed in java?

[404 byte] By [RYALIa] at [2007-11-26 16:08:44]
# 1
the database is not in javayou use java to access the databaseif the database is closing connections, this probably has nothing to do with java unless your code is closing the connection(s) somewhere
CarrieHunta at 2007-7-8 22:31:03 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...