/** * Starts up a thread to process all existing HL7InQueue entries */ public void processHL7InQueue() throws HL7Exception { synchronized (lock) { if (isRunning) { log.warn("HL7 processor aborting (another processor already running)"); return; } isRunning = true; } try { log.debug("Start processing hl7 in queue"); while (processNextHL7InQueue()) { // loop until queue is empty } log.debug("Done processing hl7 in queue"); } finally { isRunning = false; } }