tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID" <dk0...@att.com>
Subject Correct datasource settings to ensure connections are always reestablished?
Date Thu, 18 Aug 2016 18:16:36 GMT
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