[hibernate-users] Hibernate in Tomcat

Peter Rader p.rader at gmx.net
Tue Apr 5 11:40:57 EDT 2011


Hey,

please do not use hibernate.cfg.xml    and   hibernate.properties.
In the wiki you post, there is a xmlnode "|session-factory|" here we can 
put the jndi-name as an attribute.

what a database are you using friend?

regards.


Am 05.04.2011 15:56, schrieb ????:
> 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
>
>
> _______________________________________________
> hibernate-users mailing list
> hibernate-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-users/attachments/20110405/df54bee7/attachment.html 


More information about the hibernate-users mailing list