Java Reference
In-Depth Information
{
if (parameters[i] == null)
{
statement.setNull(i, Types.INTEGER);
} else
{
statement.setObject(i + 1, parameters[i]);
}
}
long time = System.currentTimeMillis();
statement.execute();
time = System.currentTimeMillis() - time;
return;
} catch (SQLException e)
{
logger.log(Level.SEVERE, "SQL Exception", e);
if (!(e.getCause() instanceof SQLException))
{
this.manager.tryOpen();
} else
{
throw (new WorkloadException(e));
}
}
}
} catch (SQLException e)
{
throw (new WorkloadException(e));
} finally
{
if (statement != null)
{
releaseStatement(statement);
}
}
}
/**
* Execute an SQL query that returns a result set. If an
* error occurs, the statement will be retried until it is
* successful. This handles broken connections.
*
* @param parameters
* The parameters for this SQL.
* @return The results of the query.
Search WWH ::




Custom Search