From: <ssk...@vh...> - 2005-09-14 10:06:33
|
Author: sskracic Date: 2005-09-14 11:57:10 +0200 (Wed, 14 Sep 2005) New Revision: 805 Modified: ccm-cms/trunk/src/com/arsdigita/cms/lifecycle/Scheduler.java Log: Made survival of LC thread across db restarts possible. Set LC thread name to 'cycle', while we're at it. Modified: ccm-cms/trunk/src/com/arsdigita/cms/lifecycle/Scheduler.java =================================================================== --- ccm-cms/trunk/src/com/arsdigita/cms/lifecycle/Scheduler.java 2005-09-14 09:08:15 UTC (rev 804) +++ ccm-cms/trunk/src/com/arsdigita/cms/lifecycle/Scheduler.java 2005-09-14 09:57:10 UTC (rev 805) @@ -154,8 +154,12 @@ fireCycleEvents(i, false); } catch (Throwable t) { - if (txn != null) { - txn.abortTxn(); + try { + if (txn != null) { + txn.abortTxn(); + } + } catch (Throwable t2) { + s_log.warn("Transaction cleanup failed: ", t2); } } finally { s_running = false; @@ -198,6 +202,7 @@ * run - Run the task */ public static synchronized void run() { + Thread.currentThread().setName("cycle"); Session ssn = SessionManager.getSession(); if ( !s_running ) { new KernelExcursion() { |