Hey guys,

I tried to explore a bit the possibility of hibernate in tomcat, but some things aren't that clear for me.
Before hitting the specific questions, please explain what is hibernate in Tomcat, when do we want to use it, how do I use it specifically with the JDBC connection pool (instead of the default DBCP connection pool), and if misconfiguration of the hibernate can cause disconnections of users on the application (that uses tomcat).

Now for 2 specific questions, if I may :]
1. in this article, its states that hibernate can be used for managing the JDBC connection pool, but the strings are for c3p0 pool-
http://community.jboss.org/wiki/UsingHibernatewithTomcat
why is that?
can I use both c3p0 settings with Datasource pool (JNDI?) ?

2. Do I have to use hibernate.properties file, or can I rename it to x.properties and still use the content of the hibernate settings?

Errors in my application when there are disconnections (between client and app server, that caused by disconnections between app server and DB), that leads me to think there's a problem with the hibernate settings:

* ERROR, hibernate.transaction.
JDBCTransaction JDBC begin failed javasql.SQLException: Invalid state, the Connection object is closed.

* org.hibernate.util.JDBCExceptionReporter , Timeout: Pool empty. Unable to fetch a connection in 10 seconds, none available[0 in use]

* WARN, hibernate.util.JDBCExceptionReporter SQL Error: 0, SQLState: 08S01
ERROR, hibernate.util.JDBCExceptionReporter I/O Error: DB server closed connection.
ERROR,  error processing request:   exception.*appname*Error: .hibernate.exception.JDBCConnectionException: Cannot open connection

Does my hunch is correct, and I need to change hibernate settings for the disconnections to stop from occuring? or is it something else?


Thanks
Hila