}
// check sequence value thread
// 60,000 msec = 1 minute delay between checks
logger.println("Starting sequence reader thread");
SequenceReader sequenceReader = new SequenceReader( DriverManager.getConnection( jdbcUrl, prop ), 60000 );
sequenceReader.start();
// Wait for the test threads to finish and join back
for (int j = 0; j < maxTestThreads; j++)
{
logger.println("Waiting for thread " + j+ " to join back/finish");
testThreads[j].join();
}
if ( timerThread != null )
{
timerThread.stopNow();
timerThread.interrupt();
timerThread.join();
}
// stop the sequence reader thread
sequenceReader.stopNow = true;
sequenceReader.interrupt();
sequenceReader.join();
// Print statistics
printStatistics();
// Finally also stop the memory checker thread