time = start = end = 0;
SampleResult res = new SampleResult();
Connection con = null;
ResultSet rs = null;
Statement stmt = null;
Data data = new Data();
res.setSampleLabel(getName());
start = System.currentTimeMillis();
try
{
int count = 0;
while (count < 20 && (con = manager.getConnection(key)) == null)
{
try
{
Thread.sleep(10);
}
catch (Exception err)
{
count++;
}
}
stmt = con.createStatement();
// Execute database query
boolean retVal = stmt.execute(getQuery());
// Based on query return value, get results
if (retVal)
{
rs = stmt.getResultSet();
data = getDataFromResultSet(rs);
rs.close();
}
else
{
int updateCount = stmt.getUpdateCount();
}
stmt.close();
manager.releaseConnection(con);
res.setResponseData(data.toString().getBytes());
res.setDataType(SampleResult.TEXT);
res.setSuccessful(true);
}
catch (Exception ex)
{