Java Reference
In-Depth Information
* @throws WorkloadException
* Thrown if the host cannot be marked.
*/
private void markHostProcessed(String host)
throws WorkloadException
{
try
{
int hostID = this.getHostID(host, true);
this.stmtSetHostStatus.execute(Status.STATUS_DONE, hostID);
} catch (SQLException e)
{
throw new WorkloadException(e);
}
}
/**
* Open a database connection.
*
* @throws InstantiationException
* Thrown if the database driver could not be
* opened.
* @throws IllegalAccessException
* Thrown if the database driver can not be
* acccessed.
* @throws ClassNotFoundException
* Thrown if the wrong type of class is
* returned.
* @throws WorkloadException
* Thrown if the database cannot be opened.
* @throws SQLException
* Thrown if a SQL error occurs.
*/
private void open()
throws InstantiationException, IllegalAccessException,
ClassNotFoundException, SQLException, WorkloadException
{
Class.forName(this.driver).newInstance();
this.connection = DriverManager.getConnection(
this.url, this.uid, this.pwd);
for (RepeatableStatement statement : this.statements)
{
statement.create(this);
}
}
Search WWH ::




Custom Search