persistence@glassfish.java.net

Re: Losing dbase connection

From: Jagadish Prasath Ramu <Jagadish.Ramu_at_Sun.COM>
Date: Fri, 29 Sep 2006 13:37:44 +0530

Hi Peter,
Yes, as Marina said, switching on connection-validation (with validation
type as "table") will solve the issue.
For more information :
http://docs.sun.com/app/docs/doc/819-3662/6n5s9hmts?a=view


However, to be sure that it is because of connection timeout issue, can
you please post
a) connection pool configuration from
AS_INSTALL_DIR/domains/<DOMAINNAME>/config/domain.xml
b) complete exception stack traces from
AS_INSTALL_DIR/domains/<DOMAINNAME>/logs/server.log.


Thanks,
-Jagadish

On Fri, 2006-09-29 at 09:49 +0200, Peter Havelaar wrote:
> Sorry for the mispost Marina
> and thank you.
>
> Peter
>
> ----- Original Message -----
> From: "Marina Vatkina" <Marina.Vatkina_at_Sun.COM>
> To: <persistence_at_glassfish.dev.java.net>
> Sent: Friday, September 29, 2006 9:46 AM
> Subject: Re: Losing dbase connection
>
>
> Peter,
>
> Can you please resend this to the users alias? The exception most probably
> means that you didn't setup the connection pool validation properly, but
> you'll get a response from a wider audience.
>
> thanks,
> -marina
>
> Peter Havelaar wrote:
> > Hello everyone,
> >
> > I am running GF b48 with hibernate and mysql 5.0
> > It seems that sometimes overnight for some reason the database
> > connection gets lost and I get :
> >
> > org.hibernate.exception.JDBCConnectionException: could not execute query
> > The only solution is to restart glassfish.
> > Needless to say, this musn't happen in a production environment, but I
> > don't really know why this happens.
> >
> > Regards,
> > Peter Havelaar