SQLException sqe = null;
Statement stmt = null;
try
{
stmt = c.createStatement();
stmt.execute(QUERY);
}
catch (SQLException e)
{
log.warn("warning: connection validation failed for current managed connection.");
sqe = e;
}
finally
{
try
{
if(stmt != null)
{
stmt.close();
}
}
catch (SQLException e)
{
log.warn("simple close failed for managed connection", e);
}
}
return sqe;