public void setup() throws Exception {
if (!HAS_RUN.get()) {
HAS_RUN.set(true);
CrawljaxRunner crawljax = null;
crawljax = new CrawljaxRunner(getCrawljaxConfiguration());
session = crawljax.call();
HAS_FINISHED.set(true);
} else {
while (!HAS_FINISHED.get()) {
LOG.debug("Waiting for crawl to finish...");
Thread.sleep(500);