|
Author: jacopoc
Date: Fri Jul 20 05:33:35 2012 New Revision: 1363655 URL: http://svn.apache.org/viewvc?rev=1363655&view=rev Log: Small improvement: better log messages during system shutdown. Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java?rev=1363655&r1=1363654&r2=1363655&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java Fri Jul 20 05:33:35 2012 @@ -421,10 +421,11 @@ public class JobManager { /** Close out the scheduler thread. */ public void shutdown() { if (jp != null) { + Debug.logInfo("Stopping the JobManager...", module); jp.stop(); jp = null; - Debug.logInfo("JobManager: Stopped Scheduler Thread.", module); } + Debug.logInfo("JobManager stopped.", module); } @Override Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java?rev=1363655&r1=1363654&r2=1363655&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java Fri Jul 20 05:33:35 2012 @@ -120,17 +120,17 @@ public class JobPoller implements Runnab * Stops the JobPoller */ void stop() { - Debug.logInfo("Shutting down thread pool for " + this.name, module); + Debug.logInfo("Shutting down thread pool for JobPoller " + this.name, module); this.executor.shutdown(); try { // Wait 60 seconds for existing tasks to terminate if (!this.executor.awaitTermination(60, TimeUnit.SECONDS)) { // abrupt shutdown (cancel currently executing tasks) - Debug.logInfo("Attempting abrupt shut down of thread pool for " + this.name, module); + Debug.logInfo("Attempting abrupt shut down of thread pool for JobPoller " + this.name, module); this.executor.shutdownNow(); // Wait 60 seconds for tasks to respond to being cancelled if (!this.executor.awaitTermination(60, TimeUnit.SECONDS)) { - Debug.logWarning("Unable to shutdown the thread pool for " + this.name, module); + Debug.logWarning("Unable to shutdown the thread pool for JobPoller " + this.name, module); } } } catch (InterruptedException ie) { @@ -139,7 +139,7 @@ public class JobPoller implements Runnab // preserve interrupt status Thread.currentThread().interrupt(); } - Debug.logInfo("Shutdown completed of thread pool for " + this.name, module); + Debug.logInfo("Shutdown completed of thread pool for JobPoller " + this.name, module); } /** |
| Free forum by Nabble | Edit this page |
