Details
Description
Please add this line to the struts-config_1_0.dtd in the datasource section:
<!ATTLIST data-source testsql CDATA #IMPLIED>
So that i can specify in the struts_config.xml a testsql value so that my
implementation of the DataSource can test the connection by sending that sql
string to it before return the connection to the request.
Maybe you can set some constraint to as that sql string must return atleast one
row so because this is done:
connection = pool.getConnection()
ResultSet rs = connection.createStatement().executeQuery(sqlTest);
if(rs.next())
{
rs.close();
// Now the connection is valid and returned:
return connection;
}
// Connection is not valid. Try to make a new one if that fails then throw an
error.
johan