You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by bdm <bd...@imageau.eu> on 2011/11/28 10:13:23 UTC

tapestry, hibernate and timeout

Hello,
I have got a problem with a small crud app developed with tapestry. This is
a low traffic application so it can be unused for more than one day before
we need it again. The problem is we got a timeout with the jdbc connection
and we need to restart the application container (Glassfish) to have the
jdbc connection up again.
It is getting boring ! :)

It seems I missed something in the tapestry application logic ! 
Is there a solution to close the session when the application has finished a
DB operation and open it only when needed ? 

Here is the stack trace:


Thanks !
BDM.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry-hibernate-and-timeout-tp5028263p5028263.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: tapestry, hibernate and timeout

Posted by bdm <bd...@imageau.eu>.
Thanks, but I already use the C3P0 connection pool without success ... maybe
it's a configuration problem but I can not figured out what is it !

I have move the post to the "Tapestry - User" forum as suggested !

I'll still digging ...

--
View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry-hibernate-and-timeout-tp5028844p5031673.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry, hibernate and timeout

Posted by Martin Strand <do...@gmail.com>.
On Mon, 28 Nov 2011 10:13:23 +0100, bdm <bd...@imageau.eu> wrote:

> Hello,
> I have got a problem with a small crud app developed with tapestry. This is
> a low traffic application so it can be unused for more than one day before
> we need it again. The problem is we got a timeout with the jdbc connection
> and we need to restart the application container (Glassfish) to have the
> jdbc connection up again.

Sounds like you haven't configured a connection pool for Hibernate.
The default pool implementation is not suitable for production. IIRC Hibernate even logs a warning about this.

C3P0 is a popular connection pool, you can use that if you set this property
hibernate.connection.provider_class = org.hibernate.connection.C3P0ConnectionProvider

You can probably get more help on the Hibernate forum.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: tapestry, hibernate and timeout

Posted by bdm <bd...@imageau.eu>.
sorry !

--
View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry-hibernate-and-timeout-tp5028263p5028838.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org