/** * Close the transaction module. * It waits all transactions termination, the module will be initialized * anew before reusing it. * The log file is garbaged then closed. */ public synchronized void close() { if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "NTransaction, closes"); if (phase == INIT) return; while (phase != FREE) { // Wait for the transaction subsystem to be free try { wait(); } catch (InterruptedException exc) { } } setPhase(FINALIZE); logFile.stop(); setPhase(INIT); if (logmon.isLoggable(BasicLevel.INFO)) { logmon.log(BasicLevel.INFO, "NTransaction, closed: " + toString()); } }
/** * Close the transaction module. * It waits all transactions termination, the module will be initialized * anew before reusing it. * The log file is garbaged then closed. */ public synchronized void close() { if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "NTransaction, closes"); if (phase == INIT) return; while (phase != FREE) { // Wait for the transaction subsystem to be free try { wait(); } catch (InterruptedException exc) { } } setPhase(FINALIZE); logFile.stop(); setPhase(INIT); if (logmon.isLoggable(BasicLevel.INFO)) { logmon.log(BasicLevel.INFO, "NTransaction, closed: " + toString()); } }