<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hey,<br>
<br>
please do not use hibernate.cfg.xml and hibernate.properties.<br>
In the wiki you post, there is a xmlnode "<code class="jive-code
jive-xml"><span class="jive-xml-tag">session-factory</span></code>"
here we can put the jndi-name as an attribute. <br>
<br>
what a database are you using friend?<br>
<br>
regards.<br>
<br>
<br>
Am 05.04.2011 15:56, schrieb הילה:
<blockquote
cite="mid:BANLkTi=B3OQTt62_4svOXRcB=p-oF0UwbQ@mail.gmail.com"
type="cite">
<div dir="rtl">
<div style="text-align: left;">Hey guys,<br>
<br>
I tried to explore a bit the possibility of hibernate in
tomcat, but some things aren't that clear for me.<br>
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).<br>
<br>
Now for 2 specific questions, if I may :]<br>
1. in this article, its states that hibernate can be used for
managing the JDBC connection pool, but the strings are for
c3p0 pool-<br>
<a moz-do-not-send="true"
href="http://community.jboss.org/wiki/UsingHibernatewithTomcat"
target="_blank">http://community.jboss.org/wiki/UsingHibernatewithTomcat</a><br>
why is that?<br>
can I use both c3p0 settings with Datasource pool (JNDI?) ?<br>
<br>
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?<br>
<br>
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:<br>
<br>
* ERROR, hibernate.transaction.
<div>JDBCTransaction JDBC begin failed javasql.SQLException:
Invalid state, the Connection object is closed. <br>
<br>
* org.hibernate.util.JDBCExceptionReporter , Timeout: Pool
empty. Unable to fetch a connection in 10 seconds, none
available[0 in use]<br>
<br>
* WARN, hibernate.util.JDBCExceptionReporter SQL Error: 0,
SQLState: 08S01<br>
ERROR, hibernate.util.JDBCExceptionReporter I/O Error: DB
server closed connection.<br>
ERROR, error processing request:
exception.*appname*Error:
.hibernate.exception.JDBCConnectionException: Cannot open
connection <br>
<br>
Does my hunch is correct, and I need to change hibernate
settings for the disconnections to stop from occuring? or is
it something else? <br>
<br>
</div>
<br>
Thanks<br>
</div>
<div style="text-align: left;">Hila</div>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
hibernate-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:hibernate-users@lists.jboss.org">hibernate-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/hibernate-users">https://lists.jboss.org/mailman/listinfo/hibernate-users</a>
</pre>
</blockquote>
</body>
</html>