ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1522538 - /ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java
Date Thu, 12 Sep 2013 11:53:43 GMT
Author: jawi
Date: Thu Sep 12 11:53:42 2013
New Revision: 1522538

URL: http://svn.apache.org/r1522538
Log:
Accidentally committed incorrect pool size for executor service.

Modified:
    ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java

Modified: ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java?rev=1522538&r1=1522537&r2=1522538&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java (original)
+++ ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/Activator.java Thu Sep 12
11:53:42 2013
@@ -18,8 +18,8 @@
  */
 package org.apache.ace.agent.impl;
 
-import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.atomic.AtomicInteger;
 
@@ -65,7 +65,8 @@ public class Activator implements Bundle
      */
     @Override
     public void start(BundleContext bundleContext) throws Exception {
-        m_executorService = Executors.newScheduledThreadPool(5, new InternalThreadFactory());
+        // Essentially a single-threaded executor with scheduling support...
+        m_executorService = new ScheduledThreadPoolExecutor(1 /* core pool size */, new InternalThreadFactory());
 
         m_dependencyTracker = new DependencyTrackerImpl(bundleContext, this);
 
@@ -114,7 +115,7 @@ public class Activator implements Bundle
         m_agentContext.setHandler(DeploymentHandler.class, new DeploymentHandlerImpl(context,
m_packageAdmin));
         m_agentContext.setHandler(AgentUpdateHandler.class, new AgentUpdateHandlerImpl(context));
         m_agentContext.setHandler(FeedbackHandler.class, new FeedbackHandlerImpl());
-        
+
         IdentificationHandler identificationHandler = (m_identificationHandler != null) ?
m_identificationHandler : new IdentificationHandlerImpl();
         m_agentContext.setHandler(IdentificationHandler.class, identificationHandler);
 
@@ -126,7 +127,7 @@ public class Activator implements Bundle
 
         m_agentContext.addComponent(new DefaultController());
         m_agentContext.addComponent(new EventLoggerImpl(context));
-        
+
         m_agentContext.start();
 
         m_agentControlRegistration = context.registerService(AgentControl.class.getName(),
new AgentControlImpl(m_agentContext), null);



Mime
View raw message