manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1550177 - in /manifoldcf/trunk: ./ framework/agents/src/main/java/org/apache/manifoldcf/agents/ framework/agents/src/main/java/org/apache/manifoldcf/agents/system/ framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ framewo...
Date Wed, 11 Dec 2013 15:46:36 GMT
Author: kwright
Date: Wed Dec 11 15:46:36 2013
New Revision: 1550177

URL: http://svn.apache.org/r1550177
Log:
Fix CONNECTORS-836.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/AgentRun.java
    manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/AgentsDaemon.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IShutdownHook.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockManager.java
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1550177&r1=1550176&r2=1550177&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Wed Dec 11 15:46:36 2013
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 1.5-dev =====================
 
+CONNECTORS-836: Use the same thread context in the registered
+shutdown objects.
+(Karl Wright)
+
 CONNECTORS-835: Fix busted ZooKeeper implementation.
 (Karl Wright)
 

Modified: manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/AgentRun.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/AgentRun.java?rev=1550177&r1=1550176&r2=1550177&view=diff
==============================================================================
--- manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/AgentRun.java
(original)
+++ manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/AgentRun.java
Wed Dec 11 15:46:36 2013
@@ -110,10 +110,10 @@ public class AgentRun extends BaseAgents
       this.processID = processID;
     }
     
-    public void doCleanup()
+    @Override
+    public void doCleanup(IThreadContext tc)
       throws ManifoldCFException
     {
-      IThreadContext tc = ThreadContextFactory.make();
       ILockManager lockManager = LockManagerFactory.make(tc);
       // We can blast the active flag off here; we may have already exited though and an
exception will
       // therefore be thrown.

Modified: manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/AgentsDaemon.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/AgentsDaemon.java?rev=1550177&r1=1550176&r2=1550177&view=diff
==============================================================================
--- manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/AgentsDaemon.java
(original)
+++ manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/system/AgentsDaemon.java
Wed Dec 11 15:46:36 2013
@@ -377,12 +377,12 @@ public class AgentsDaemon
     {
     }
     
-    public void doCleanup()
+    @Override
+    public void doCleanup(IThreadContext threadContext)
       throws ManifoldCFException
     {
       // Shutting down in this way must prevent startup from taking place.
-      IThreadContext tc = ThreadContextFactory.make();
-      stopAgents(tc);
+      stopAgents(threadContext);
     }
     
   }

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IShutdownHook.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IShutdownHook.java?rev=1550177&r1=1550176&r2=1550177&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IShutdownHook.java
(original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IShutdownHook.java
Wed Dec 11 15:46:36 2013
@@ -23,7 +23,7 @@ public interface IShutdownHook
 {
   /** Do the requisite cleanup.
   */
-  public void doCleanup()
+  public void doCleanup(IThreadContext threadContext)
     throws ManifoldCFException;
 }
 

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockManager.java?rev=1550177&r1=1550176&r2=1550177&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockManager.java
(original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/ZooKeeperLockManager.java
Wed Dec 11 15:46:36 2013
@@ -931,7 +931,7 @@ public class ZooKeeperLockManager extend
     /** Do the requisite cleanup.
     */
     @Override
-    public void doCleanup()
+    public void doCleanup(IThreadContext threadContext)
       throws ManifoldCFException
     {
       shutdownPool();

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java?rev=1550177&r1=1550176&r2=1550177&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
(original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
Wed Dec 11 15:46:36 2013
@@ -1303,7 +1303,7 @@ public class ManifoldCF
             IShutdownHook hook = (IShutdownHook)cleanupHooks.get(i);
             try
             {
-              hook.doCleanup();
+              hook.doCleanup(threadContext);
             }
             catch (ManifoldCFException e)
             {
@@ -1350,7 +1350,8 @@ public class ManifoldCF
     }
 
     /** Delete all remaining files */
-    public void doCleanup()
+    @Override
+    public void doCleanup(IThreadContext threadContext)
       throws ManifoldCFException
     {
       synchronized (this)
@@ -1372,7 +1373,7 @@ public class ManifoldCF
     {
       try
       {
-        doCleanup();
+        doCleanup(ThreadContextFactory.make());
       }
       finally
       {
@@ -1389,7 +1390,8 @@ public class ManifoldCF
     {
     }
     
-    public void doCleanup()
+    @Override
+    public void doCleanup(IThreadContext threadContext)
       throws ManifoldCFException
     {
       // Clean up the database handles



Mime
View raw message