tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID" <dk0...@att.com>
Subject RE: Correct datasource settings to ensure connections are always reestablished?
Date Thu, 18 Aug 2016 19:24:39 GMT
> -----Original Message-----
> From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> Sent: Thursday, August 18, 2016 12:04 PM
> To: users@tomee.apache.org
> Subject: Re: Correct datasource settings to ensure connections are
> always reestablished?
> 
> Hello
> 
> Check warnings in startup logs
> 
> Suspect it is testWhileXxx instead of testOnXxx\

It was "testWhileIdle", not "testOnIdle", but the others are "testOn...".

> Le 18 août 2016 20:17, "KARR, DAVID" <dk068x@att.com> a écrit :
> 
> > My app with a DataSource was basically working, but I found that
> > sometimes it loses the db connection, and it apparently doesn't
> restore it.
> >
> > I'm now testing with the following added properties:
> > -------------
> > sus2.testOnReturn = true
> > sus2.testOnIdle = true
> > sus2.testOnBorrow = true
> > sus2.validationQuery = select 1 from dual;
> > -------------
> >
> > The connection loss doesn't happen very often, so I'd have to leave it
> > running for a while to make sure, but does this look like the correct
> > set of settings to ensure db connections are always reestablished?
> >
> > When I started it back up, I did notice some occurrences of
> > "java.sql.SQLException: Failed to validate a newly established
> > connection.", but the app appears to be working, so perhaps this is
> > just telling me that the settings are working.
> >
> > I guess I'll enable JMX and see what I can see about the status of the
> > DataSource.
> >
Mime
View raw message