You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2013/12/06 10:32:30 UTC

svn commit: r1548462 - in /manifoldcf/branches/CONNECTORS-781/framework: agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/ agents/src/main/java/org/apache/manifoldcf/agents/interfaces/ agents/src/main/java/org/apache/manifoldcf/agent...

Author: kwright
Date: Fri Dec  6 09:32:29 2013
New Revision: 1548462

URL: http://svn.apache.org/r1548462
Log:
Use connection name everywhere as the pool key.  This means that the release methods also need a connection name passed in.

Modified:
    manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
    manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnectorPool.java
    manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnectorpool/OutputConnectorPool.java
    manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java
    manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/editjob.jsp
    manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/execute.jsp
    manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewauthority.jsp
    manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewconnection.jsp
    manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewjob.jsp
    manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewmapper.jsp
    manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewoutput.jsp
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/CheckAll.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authorityconnectorpool/AuthorityConnectorPool.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/interfaces/IAuthorityConnectorPool.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/interfaces/IMappingConnectorPool.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/mappingconnectorpool/MappingConnectorPool.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/system/AuthCheckThread.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/system/MappingThread.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnectorPool.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repositoryconnectorpool/RepositoryConnectorPool.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentCleanupThread.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobNotificationThread.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StufferThread.java
    manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java

Modified: manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java Fri Dec  6 09:32:29 2013
@@ -216,7 +216,7 @@ public class IncrementalIngester extends
     }
     finally
     {
-      outputConnectorPool.release(connector);
+      outputConnectorPool.release(connection,connector);
     }
   }
 
@@ -241,7 +241,7 @@ public class IncrementalIngester extends
     }
     finally
     {
-      outputConnectorPool.release(connector);
+      outputConnectorPool.release(connection,connector);
     }
   }
 
@@ -267,7 +267,7 @@ public class IncrementalIngester extends
     }
     finally
     {
-      outputConnectorPool.release(connector);
+      outputConnectorPool.release(connection,connector);
     }
   }
 
@@ -293,7 +293,7 @@ public class IncrementalIngester extends
     }
     finally
     {
-      outputConnectorPool.release(connector);
+      outputConnectorPool.release(connection,connector);
     }
   }
 
@@ -317,7 +317,7 @@ public class IncrementalIngester extends
     }
     finally
     {
-      outputConnectorPool.release(connector);
+      outputConnectorPool.release(connection,connector);
     }
 
   }
@@ -1662,7 +1662,7 @@ public class IncrementalIngester extends
     }
     finally
     {
-      outputConnectorPool.release(connector);
+      outputConnectorPool.release(connection,connector);
     }
   }
 
@@ -1681,7 +1681,7 @@ public class IncrementalIngester extends
     }
     finally
     {
-      outputConnectorPool.release(connector);
+      outputConnectorPool.release(connection,connector);
     }
   }
 

Modified: manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnectorPool.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnectorPool.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnectorPool.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnectorPool.java Fri Dec  6 09:32:29 2013
@@ -47,15 +47,17 @@ public interface IOutputConnectorPool
     throws ManifoldCFException;
 
   /** Release multiple output connectors.
+  *@param connections are the connections describing the instances to release.
   *@param connectors are the connector instances to release.
   */
-  public void releaseMultiple(IOutputConnector[] connectors)
+  public void releaseMultiple(IOutputConnection[] connections, IOutputConnector[] connectors)
     throws ManifoldCFException;
 
   /** Release an output connector.
+  *@param connection is the connection describing the instance to release.
   *@param connector is the connector to release.
   */
-  public void release(IOutputConnector connector)
+  public void release(IOutputConnection connection, IOutputConnector connector)
     throws ManifoldCFException;
 
   /** Idle notification for inactive output connector handles.

Modified: manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnectorpool/OutputConnectorPool.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnectorpool/OutputConnectorPool.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnectorpool/OutputConnectorPool.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnectorpool/OutputConnectorPool.java Fri Dec  6 09:32:29 2013
@@ -72,18 +72,20 @@ public class OutputConnectorPool impleme
   {
     // For now, use the OutputConnectorFactory method.  This will require us to extract info
     // from each output connection, however.
+    String[] connectionNames = new String[outputConnections.length];
     String[] classNames = new String[outputConnections.length];
     ConfigParams[] configInfos = new ConfigParams[outputConnections.length];
     int[] maxPoolSizes = new int[outputConnections.length];
     
     for (int i = 0; i < outputConnections.length; i++)
     {
+      connectionNames[i] = outputConnections[i].getName();
       classNames[i] = outputConnections[i].getClassName();
       configInfos[i] = outputConnections[i].getConfigParams();
       maxPoolSizes[i] = outputConnections[i].getMaxConnections();
     }
     return localPool.grabMultiple(threadContext,
-      orderingKeys, classNames, configInfos, maxPoolSizes);
+      orderingKeys, connectionNames, classNames, configInfos, maxPoolSizes);
   }
 
   /** Get an output connector.
@@ -94,28 +96,35 @@ public class OutputConnectorPool impleme
   public IOutputConnector grab(IOutputConnection outputConnection)
     throws ManifoldCFException
   {
-    return localPool.grab(threadContext, outputConnection.getClassName(),
+    return localPool.grab(threadContext, outputConnection.getName(), outputConnection.getClassName(),
       outputConnection.getConfigParams(), outputConnection.getMaxConnections());
   }
 
   /** Release multiple output connectors.
+  *@param connections are the connections describing the instances to release.
   *@param connectors are the connector instances to release.
   */
   @Override
-  public void releaseMultiple(IOutputConnector[] connectors)
+  public void releaseMultiple(IOutputConnection[] connections, IOutputConnector[] connectors)
     throws ManifoldCFException
   {
-    localPool.releaseMultiple(connectors);
+    String[] connectionNames = new String[connections.length];
+    for (int i = 0; i < connections.length; i++)
+    {
+      connectionNames[i] = connections[i].getName();
+    }
+    localPool.releaseMultiple(connectionNames, connectors);
   }
 
   /** Release an output connector.
+  *@param connection is the connection describing the instance to release.
   *@param connector is the connector to release.
   */
   @Override
-  public void release(IOutputConnector connector)
+  public void release(IOutputConnection connection, IOutputConnector connector)
     throws ManifoldCFException
   {
-    localPool.release(connector);
+    localPool.release(connection.getName(),connector);
   }
 
   /** Idle notification for inactive output connector handles.
@@ -163,10 +172,10 @@ public class OutputConnectorPool impleme
       return connectorManager.isInstalled(className);
     }
 
-    public IOutputConnector[] grabMultiple(IThreadContext tc, String[] orderingKeys, String[] classNames, ConfigParams[] configInfos, int[] maxPoolSizes)
+    public IOutputConnector[] grabMultiple(IThreadContext tc, String[] orderingKeys, String[] connectionNames, String[] classNames, ConfigParams[] configInfos, int[] maxPoolSizes)
       throws ManifoldCFException
     {
-      return grabMultiple(tc,IOutputConnector.class,orderingKeys,classNames,configInfos,maxPoolSizes);
+      return grabMultiple(tc,IOutputConnector.class,orderingKeys,connectionNames,classNames,configInfos,maxPoolSizes);
     }
 
   }

Modified: manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java Fri Dec  6 09:32:29 2013
@@ -32,8 +32,8 @@ public abstract class ConnectorPool<T ex
   public static final String _rcsid = "@(#)$Id$";
 
   // Pool hash table.
-  // Keyed by PoolKey; value is Pool
-  protected final Map<PoolKey,Pool> poolHash = new HashMap<PoolKey,Pool>();
+  // Keyed by connection name; value is Pool
+  protected final Map<String,Pool> poolHash = new HashMap<String,Pool>();
 
   protected ConnectorPool()
   {
@@ -128,7 +128,8 @@ public abstract class ConnectorPool<T ex
   * so that any connector exhaustion will not cause a deadlock.
   */
   public T[] grabMultiple(IThreadContext threadContext, Class<T> clazz,
-    String[] orderingKeys, String[] classNames, ConfigParams[] configInfos, int[] maxPoolSizes)
+    String[] orderingKeys, String[] connectionNames,
+    String[] classNames, ConfigParams[] configInfos, int[] maxPoolSizes)
     throws ManifoldCFException
   {
     T[] rval = (T[])Array.newInstance(clazz,classNames.length);
@@ -144,12 +145,13 @@ public abstract class ConnectorPool<T ex
     {
       String orderingKey = orderingKeys[i];
       int index = orderMap.get(orderingKey).intValue();
+      String connectionName = connectionNames[index];
       String className = classNames[index];
       ConfigParams cp = configInfos[index];
       int maxPoolSize = maxPoolSizes[index];
       try
       {
-        T connector = grab(threadContext,className,cp,maxPoolSize);
+        T connector = grab(threadContext,connectionName,className,cp,maxPoolSize);
         rval[index] = connector;
       }
       catch (Throwable e)
@@ -161,7 +163,7 @@ public abstract class ConnectorPool<T ex
           index = orderMap.get(orderingKey).intValue();
           try
           {
-            release(rval[index]);
+            release(connectionName,rval[index]);
           }
           catch (ManifoldCFException e2)
           {
@@ -181,36 +183,35 @@ public abstract class ConnectorPool<T ex
   }
 
   /** Get a connector.
-  * The connector is specified by its class and its parameters.
+  * The connector is specified by its connection name, class, and parameters.  If the
+  * class and parameters corresponding to a connection name change, then this code
+  * will destroy any old connector instance that does not correspond, and create a new
+  * one using the new class and parameters.
   *@param threadContext is the current thread context.
+  *@param connectionName is the name of the connection.  This functions as a pool key.
   *@param className is the name of the class to get a connector for.
   *@param configInfo are the name/value pairs constituting configuration info
   * for this class.
   */
-  public T grab(IThreadContext threadContext,
+  public T grab(IThreadContext threadContext, String connectionName,
     String className, ConfigParams configInfo, int maxPoolSize)
     throws ManifoldCFException
   {
     // We want to get handles off the pool and use them.  But the
     // handles we fetch have to have the right config information.
 
-    // Use the classname and config info to build a pool key.  This
-    // key will be discarded if we actually have to save a key persistently,
-    // since we avoid copying the configInfo unnecessarily.
-    PoolKey pk = new PoolKey(className,configInfo);
     Pool p;
     synchronized (poolHash)
     {
-      p = poolHash.get(pk);
+      p = poolHash.get(connectionName);
       if (p == null)
       {
-        pk = new PoolKey(className,configInfo.duplicate());
-        p = new Pool(pk,maxPoolSize);
-        poolHash.put(pk,p);
+        p = new Pool(maxPoolSize);
+        poolHash.put(connectionName,p);
       }
     }
 
-    T rval = p.getConnector(threadContext);
+    T rval = p.getConnector(threadContext,className,configInfo);
 
     return rval;
 
@@ -218,16 +219,17 @@ public abstract class ConnectorPool<T ex
 
   /** Release multiple output connectors.
   */
-  public void releaseMultiple(T[] connectors)
+  public void releaseMultiple(String[] connectionNames, T[] connectors)
     throws ManifoldCFException
   {
     ManifoldCFException currentException = null;
     for (int i = 0; i < connectors.length; i++)
     {
+      String connectionName = connectionNames[i];
       T c = connectors[i];
       try
       {
-        release(c);
+        release(connectionName,c);
       }
       catch (ManifoldCFException e)
       {
@@ -240,9 +242,10 @@ public abstract class ConnectorPool<T ex
   }
 
   /** Release an output connector.
+  *@param connectionName is the connection name.
   *@param connector is the connector to release.
   */
-  public void release(T connector)
+  public void release(String connectionName, T connector)
     throws ManifoldCFException
   {
     // If the connector is null, skip the release, because we never really got the connector in the first place.
@@ -250,11 +253,10 @@ public abstract class ConnectorPool<T ex
       return;
 
     // Figure out which pool this goes on, and put it there
-    PoolKey pk = new PoolKey(connector.getClass().getName(),connector.getConfiguration());
     Pool p;
     synchronized (poolHash)
     {
-      p = poolHash.get(pk);
+      p = poolHash.get(connectionName);
     }
 
     p.releaseConnector(connector);
@@ -309,76 +311,17 @@ public abstract class ConnectorPool<T ex
     }
   }
 
-  /** This is an immutable pool key class, which describes a pool in terms of two independent keys.
-  */
-  public static class PoolKey
-  {
-    protected final String className;
-    protected final ConfigParams configInfo;
-
-    /** Constructor.
-    */
-    public PoolKey(String className, Map configInfo)
-    {
-      this.className = className;
-      this.configInfo = new ConfigParams(configInfo);
-    }
-
-    public PoolKey(String className, ConfigParams configInfo)
-    {
-      this.className = className;
-      this.configInfo = configInfo;
-    }
-
-    /** Get the class name.
-    *@return the class name.
-    */
-    public String getClassName()
-    {
-      return className;
-    }
-
-    /** Get the config info.
-    *@return the params
-    */
-    public ConfigParams getParams()
-    {
-      return configInfo;
-    }
-
-    /** Hash code.
-    */
-    public int hashCode()
-    {
-      return className.hashCode() + configInfo.hashCode();
-    }
-
-    /** Equals operator.
-    */
-    public boolean equals(Object o)
-    {
-      if (!(o instanceof PoolKey))
-        return false;
-
-      PoolKey pk = (PoolKey)o;
-      return pk.className.equals(className) && pk.configInfo.equals(configInfo);
-    }
-
-  }
-
   /** This class represents a value in the pool hash, which corresponds to a given key.
   */
   public class Pool
   {
     protected final List<T> stack = new ArrayList<T>();
-    protected final PoolKey key;
     protected int numFree;
 
     /** Constructor
     */
-    public Pool(PoolKey pk, int maxCount)
+    public Pool(int maxCount)
     {
-      key = pk;
       numFree = maxCount;
     }
 
@@ -386,9 +329,11 @@ public abstract class ConnectorPool<T ex
     * If none exists, construct it using the information in the pool key.
     *@return the connector, or null if no connector could be connected.
     */
-    public synchronized T getConnector(IThreadContext threadContext)
+    public synchronized T getConnector(IThreadContext threadContext, String className, ConfigParams configParams)
       throws ManifoldCFException
     {
+      // numFree represents the number of available connector instances that have not been given out at this moment.
+      // So it's the max minus the pool count minus the number in use.
       while (numFree == 0)
       {
         try
@@ -401,23 +346,42 @@ public abstract class ConnectorPool<T ex
         }
       }
 
-      if (stack.size() == 0)
+      // We decrement numFree when we hand out a connector instance; we increment numFree when we
+      // throw away a connector instance from the pool.
+      while (true)
       {
-        String className = key.getClassName();
-        ConfigParams configParams = key.getParams();
-
-        T newrc = createConnectorInstance(threadContext,className);
-        newrc.connect(configParams);
-        stack.add(newrc);
-      }
-      
-      // Since thread context set can fail, do that before we remove it from the pool.
-      T rc = stack.get(stack.size()-1);
-      rc.setThreadContext(threadContext);
-      stack.remove(stack.size()-1);
-      numFree--;
-      
-      return rc;
+        if (stack.size() == 0)
+        {
+          T newrc = createConnectorInstance(threadContext,className);
+          newrc.connect(configParams);
+          stack.add(newrc);
+        }
+        
+        // Since thread context set can fail, do that before we remove it from the pool.
+        T rc = stack.remove(stack.size()-1);
+        // Set the thread context.  This can throw an exception!!  We need to be sure our bookkeeping
+        // is resilient against that possibility.  Losing a connector instance that was just sitting
+        // in the pool does NOT affect numFree, so no change needed here; we just can't disconnect the
+        // connector instance if this fails.
+        rc.setThreadContext(threadContext);
+        // Verify that the connector is in fact compatible
+        if (!(rc.getClass().getName().equals(className) && rc.getConfiguration().equals(configParams)))
+        {
+          // Looks like parameters have changed, so discard old instance.
+          try
+          {
+            rc.disconnect();
+          }
+          finally
+          {
+            rc.clearThreadContext();
+          }
+          continue;
+        }
+        // About to return a connector instance; decrement numFree accordingly.
+        numFree--;
+        return rc;
+      }
     }
 
     /** Release a connector to the pool.
@@ -467,12 +431,11 @@ public abstract class ConnectorPool<T ex
       while (stack.size() > 0)
       {
         // Disconnect
-        T rc = stack.get(stack.size()-1);
+        T rc = stack.remove(stack.size()-1);
         rc.setThreadContext(threadContext);
         try
         {
           rc.disconnect();
-          stack.remove(stack.size()-1);
         }
         finally
         {

Modified: manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/editjob.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/editjob.jsp?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/editjob.jsp (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/editjob.jsp Fri Dec  6 09:32:29 2013
@@ -416,7 +416,7 @@
 			}
 			finally
 			{
-				outputConnectorPool.release(outputConnector);
+				outputConnectorPool.release(outputConnection,outputConnector);
 			}
 		}
 	}
@@ -434,7 +434,7 @@
 			}
 			finally
 			{
-				repositoryConnectorPool.release(repositoryConnector);
+				repositoryConnectorPool.release(connection,repositoryConnector);
 			}
 		}
 	}
@@ -1282,7 +1282,7 @@
 			}
 			finally
 			{
-				outputConnectorPool.release(outputConnector);
+				outputConnectorPool.release(outputConnection,outputConnector);
 			}
 %>
 		  <input type="hidden" name="outputpresent" value="true"/>
@@ -1301,7 +1301,7 @@
 			}
 			finally
 			{
-				repositoryConnectorPool.release(repositoryConnector);
+				repositoryConnectorPool.release(connection,repositoryConnector);
 			}
 %>
 		  <input type="hidden" name="connectionpresent" value="true"/>

Modified: manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/execute.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/execute.jsp?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/execute.jsp (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/execute.jsp Fri Dec  6 09:32:29 2013
@@ -1048,7 +1048,7 @@
 							}
 							finally
 							{
-								outputConnectorPool.release(outputConnector);
+								outputConnectorPool.release(outputConnection,outputConnector);
 							}
 						}
 					}
@@ -1072,7 +1072,7 @@
 							}
 							finally
 							{
-								repositoryConnectorPool.release(repositoryConnector);
+								repositoryConnectorPool.release(connection,repositoryConnector);
 							}
 						}
 					}

Modified: manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewauthority.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewauthority.jsp?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewauthority.jsp (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewauthority.jsp Fri Dec  6 09:32:29 2013
@@ -115,7 +115,7 @@
 				}
 				finally
 				{
-					authorityConnectorPool.release(c);
+					authorityConnectorPool.release(connection,c);
 				}
 			}
 		}

Modified: manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewconnection.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewconnection.jsp?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewconnection.jsp (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewconnection.jsp Fri Dec  6 09:32:29 2013
@@ -120,7 +120,7 @@
 				}
 				finally
 				{
-					repositoryConnectorPool.release(c);
+					repositoryConnectorPool.release(connection,c);
 				}
 			}
 		}

Modified: manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewjob.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewjob.jsp?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewjob.jsp (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewjob.jsp Fri Dec  6 09:32:29 2013
@@ -644,7 +644,7 @@
 				}
 				finally
 				{
-					outputConnectorPool.release(outputConnector);
+					outputConnectorPool.release(outputConnection,outputConnector);
 				}
 			}
 		}
@@ -668,7 +668,7 @@
 				}
 				finally
 				{
-					repositoryConnectorPool.release(repositoryConnector);
+					repositoryConnectorPool.release(connection,repositoryConnector);
 				}
 			}
 		}

Modified: manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewmapper.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewmapper.jsp?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewmapper.jsp (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewmapper.jsp Fri Dec  6 09:32:29 2013
@@ -105,7 +105,7 @@
 				}
 				finally
 				{
-					mappingConnectorPool.release(c);
+					mappingConnectorPool.release(connection,c);
 				}
 			}
 		}

Modified: manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewoutput.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewoutput.jsp?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewoutput.jsp (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/crawler-ui/src/main/webapp/viewoutput.jsp Fri Dec  6 09:32:29 2013
@@ -116,7 +116,7 @@
 				}
 				finally
 				{
-					outputConnectorPool.release(c);
+					outputConnectorPool.release(connection,c);
 				}
 			}
 		}

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/CheckAll.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/CheckAll.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/CheckAll.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/CheckAll.java Fri Dec  6 09:32:29 2013
@@ -80,7 +80,7 @@ public class CheckAll
             }
             finally
             {
-              authorityConnectorPool.release(c);
+              authorityConnectorPool.release(connection,c);
             }
           }
           else

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authorityconnectorpool/AuthorityConnectorPool.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authorityconnectorpool/AuthorityConnectorPool.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authorityconnectorpool/AuthorityConnectorPool.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authorityconnectorpool/AuthorityConnectorPool.java Fri Dec  6 09:32:29 2013
@@ -59,18 +59,20 @@ public class AuthorityConnectorPool impl
   {
     // For now, use the AuthorityConnectorFactory method.  This will require us to extract info
     // from each authority connection, however.
+    String[] connectionNames = new String[authorityConnections.length];
     String[] classNames = new String[authorityConnections.length];
     ConfigParams[] configInfos = new ConfigParams[authorityConnections.length];
     int[] maxPoolSizes = new int[authorityConnections.length];
     
     for (int i = 0; i < authorityConnections.length; i++)
     {
+      connectionNames[i] = authorityConnections[i].getName();
       classNames[i] = authorityConnections[i].getClassName();
       configInfos[i] = authorityConnections[i].getConfigParams();
       maxPoolSizes[i] = authorityConnections[i].getMaxConnections();
     }
     return localPool.grabMultiple(threadContext,
-      orderingKeys, classNames, configInfos, maxPoolSizes);
+      orderingKeys, connectionNames, classNames, configInfos, maxPoolSizes);
   }
 
   /** Get an authority connector.
@@ -81,28 +83,35 @@ public class AuthorityConnectorPool impl
   public IAuthorityConnector grab(IAuthorityConnection authorityConnection)
     throws ManifoldCFException
   {
-    return localPool.grab(threadContext, authorityConnection.getClassName(),
+    return localPool.grab(threadContext, authorityConnection.getName(), authorityConnection.getClassName(),
       authorityConnection.getConfigParams(), authorityConnection.getMaxConnections());
   }
 
   /** Release multiple authority connectors.
+  *@param connections are the connections describing the instances to release.
   *@param connectors are the connector instances to release.
   */
   @Override
-  public void releaseMultiple(IAuthorityConnector[] connectors)
+  public void releaseMultiple(IAuthorityConnection[] connections, IAuthorityConnector[] connectors)
     throws ManifoldCFException
   {
-    localPool.releaseMultiple(connectors);
+    String[] connectionNames = new String[connections.length];
+    for (int i = 0; i < connections.length; i++)
+    {
+      connectionNames[i] = connections[i].getName();
+    }
+    localPool.releaseMultiple(connectionNames, connectors);
   }
 
-  /** Release an authority connector.
+  /** Release an output connector.
+  *@param connection is the connection describing the instance to release.
   *@param connector is the connector to release.
   */
   @Override
-  public void release(IAuthorityConnector connector)
+  public void release(IAuthorityConnection connection, IAuthorityConnector connector)
     throws ManifoldCFException
   {
-    localPool.release(connector);
+    localPool.release(connection.getName(), connector);
   }
 
   /** Idle notification for inactive authority connector handles.
@@ -150,10 +159,10 @@ public class AuthorityConnectorPool impl
       return connectorManager.isInstalled(className);
     }
 
-    public IAuthorityConnector[] grabMultiple(IThreadContext tc, String[] orderingKeys, String[] classNames, ConfigParams[] configInfos, int[] maxPoolSizes)
+    public IAuthorityConnector[] grabMultiple(IThreadContext tc, String[] orderingKeys, String connectionNames[], String[] classNames, ConfigParams[] configInfos, int[] maxPoolSizes)
       throws ManifoldCFException
     {
-      return grabMultiple(tc,IAuthorityConnector.class,orderingKeys,classNames,configInfos,maxPoolSizes);
+      return grabMultiple(tc,IAuthorityConnector.class,orderingKeys,connectionNames,classNames,configInfos,maxPoolSizes);
     }
 
   }

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/interfaces/IAuthorityConnectorPool.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/interfaces/IAuthorityConnectorPool.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/interfaces/IAuthorityConnectorPool.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/interfaces/IAuthorityConnectorPool.java Fri Dec  6 09:32:29 2013
@@ -47,15 +47,17 @@ public interface IAuthorityConnectorPool
     throws ManifoldCFException;
 
   /** Release multiple authority connectors.
+  *@param connections are the connections describing the instances to release.
   *@param connectors are the connector instances to release.
   */
-  public void releaseMultiple(IAuthorityConnector[] connectors)
+  public void releaseMultiple(IAuthorityConnection[] connections, IAuthorityConnector[] connectors)
     throws ManifoldCFException;
 
   /** Release an authority connector.
+  *@param connection is the connection describing the instance to release.
   *@param connector is the connector to release.
   */
-  public void release(IAuthorityConnector connector)
+  public void release(IAuthorityConnection connection, IAuthorityConnector connector)
     throws ManifoldCFException;
 
   /** Idle notification for inactive authority connector handles.

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/interfaces/IMappingConnectorPool.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/interfaces/IMappingConnectorPool.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/interfaces/IMappingConnectorPool.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/interfaces/IMappingConnectorPool.java Fri Dec  6 09:32:29 2013
@@ -47,15 +47,17 @@ public interface IMappingConnectorPool
     throws ManifoldCFException;
 
   /** Release multiple mapping connectors.
+  *@param connections are the connections describing the instances to release.
   *@param connectors are the connector instances to release.
   */
-  public void releaseMultiple(IMappingConnector[] connectors)
+  public void releaseMultiple(IMappingConnection[] connections, IMappingConnector[] connectors)
     throws ManifoldCFException;
 
   /** Release a mapping connector.
+  *@param connection is the connection describing the instance to release.
   *@param connector is the connector to release.
   */
-  public void release(IMappingConnector connector)
+  public void release(IMappingConnection connection, IMappingConnector connector)
     throws ManifoldCFException;
 
   /** Idle notification for inactive mapping connector handles.

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/mappingconnectorpool/MappingConnectorPool.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/mappingconnectorpool/MappingConnectorPool.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/mappingconnectorpool/MappingConnectorPool.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/mappingconnectorpool/MappingConnectorPool.java Fri Dec  6 09:32:29 2013
@@ -59,18 +59,20 @@ public class MappingConnectorPool implem
   {
     // For now, use the MappingConnectorFactory method.  This will require us to extract info
     // from each mapping connection, however.
+    String[] connectionNames = new String[mappingConnections.length];
     String[] classNames = new String[mappingConnections.length];
     ConfigParams[] configInfos = new ConfigParams[mappingConnections.length];
     int[] maxPoolSizes = new int[mappingConnections.length];
     
     for (int i = 0; i < mappingConnections.length; i++)
     {
+      connectionNames[i] = mappingConnections[i].getName();
       classNames[i] = mappingConnections[i].getClassName();
       configInfos[i] = mappingConnections[i].getConfigParams();
       maxPoolSizes[i] = mappingConnections[i].getMaxConnections();
     }
     return localPool.grabMultiple(threadContext,
-      orderingKeys, classNames, configInfos, maxPoolSizes);
+      orderingKeys, connectionNames, classNames, configInfos, maxPoolSizes);
   }
 
   /** Get a mapping connector.
@@ -81,28 +83,36 @@ public class MappingConnectorPool implem
   public IMappingConnector grab(IMappingConnection mappingConnection)
     throws ManifoldCFException
   {
-    return localPool.grab(threadContext, mappingConnection.getClassName(),
+    return localPool.grab(threadContext, mappingConnection.getName(),
+      mappingConnection.getClassName(),
       mappingConnection.getConfigParams(), mappingConnection.getMaxConnections());
   }
 
   /** Release multiple mapping connectors.
+  *@param connections are the connections describing the instances to release.
   *@param connectors are the connector instances to release.
   */
   @Override
-  public void releaseMultiple(IMappingConnector[] connectors)
+  public void releaseMultiple(IMappingConnection[] connections, IMappingConnector[] connectors)
     throws ManifoldCFException
   {
-    localPool.releaseMultiple(connectors);
+    String[] connectionNames = new String[connections.length];
+    for (int i = 0; i < connections.length; i++)
+    {
+      connectionNames[i] = connections[i].getName();
+    }
+    localPool.releaseMultiple(connectionNames, connectors);
   }
 
   /** Release a mapping connector.
+  *@param connection is the connection describing the instance to release.
   *@param connector is the connector to release.
   */
   @Override
-  public void release(IMappingConnector connector)
+  public void release(IMappingConnection connection, IMappingConnector connector)
     throws ManifoldCFException
   {
-    localPool.release(connector);
+    localPool.release(connection.getName(), connector);
   }
 
   /** Idle notification for inactive mapping connector handles.
@@ -150,10 +160,10 @@ public class MappingConnectorPool implem
       return connectorManager.isInstalled(className);
     }
 
-    public IMappingConnector[] grabMultiple(IThreadContext tc, String[] orderingKeys, String[] classNames, ConfigParams[] configInfos, int[] maxPoolSizes)
+    public IMappingConnector[] grabMultiple(IThreadContext tc, String[] orderingKeys, String[] connectionNames, String[] classNames, ConfigParams[] configInfos, int[] maxPoolSizes)
       throws ManifoldCFException
     {
-      return grabMultiple(tc,IMappingConnector.class,orderingKeys,classNames,configInfos,maxPoolSizes);
+      return grabMultiple(tc,IMappingConnector.class,orderingKeys,connectionNames,classNames,configInfos,maxPoolSizes);
     }
 
   }

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/system/AuthCheckThread.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/system/AuthCheckThread.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/system/AuthCheckThread.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/system/AuthCheckThread.java Fri Dec  6 09:32:29 2013
@@ -107,7 +107,7 @@ public class AuthCheckThread extends Thr
               }
               finally
               {
-                authorityConnectorPool.release(connector);
+                authorityConnectorPool.release(theRequest.getAuthorityConnection(),connector);
               }
             }
             catch (ManifoldCFException e)

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/system/MappingThread.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/system/MappingThread.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/system/MappingThread.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/system/MappingThread.java Fri Dec  6 09:32:29 2013
@@ -101,7 +101,7 @@ public class MappingThread extends Threa
               }
               finally
               {
-                mappingConnectorPool.release(connector);
+                mappingConnectorPool.release(theRequest.getMappingConnection(),connector);
               }
             }
             catch (ManifoldCFException e)

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnectorPool.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnectorPool.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnectorPool.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnectorPool.java Fri Dec  6 09:32:29 2013
@@ -47,15 +47,17 @@ public interface IRepositoryConnectorPoo
     throws ManifoldCFException;
 
   /** Release multiple repository connectors.
+  *@param connections are the connections describing the instances to release.
   *@param connectors are the connector instances to release.
   */
-  public void releaseMultiple(IRepositoryConnector[] connectors)
+  public void releaseMultiple(IRepositoryConnection[] connections, IRepositoryConnector[] connectors)
     throws ManifoldCFException;
 
   /** Release a repository connector.
+  *@param connection is the connection describing the instance to release.
   *@param connector is the connector to release.
   */
-  public void release(IRepositoryConnector connector)
+  public void release(IRepositoryConnection connection, IRepositoryConnector connector)
     throws ManifoldCFException;
 
   /** Idle notification for inactive repository connector handles.

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java Fri Dec  6 09:32:29 2013
@@ -2766,7 +2766,7 @@ public class JobManager implements IJobM
         }
         finally
         {
-          repositoryConnectorPool.releaseMultiple(connectors);
+          repositoryConnectorPool.releaseMultiple(connections,connectors);
         }
       }
       finally

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repositoryconnectorpool/RepositoryConnectorPool.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repositoryconnectorpool/RepositoryConnectorPool.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repositoryconnectorpool/RepositoryConnectorPool.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repositoryconnectorpool/RepositoryConnectorPool.java Fri Dec  6 09:32:29 2013
@@ -59,18 +59,20 @@ public class RepositoryConnectorPool imp
   {
     // For now, use the RepositoryConnectorFactory method.  This will require us to extract info
     // from each repository connection, however.
+    String[] connectionNames = new String[repositoryConnections.length];
     String[] classNames = new String[repositoryConnections.length];
     ConfigParams[] configInfos = new ConfigParams[repositoryConnections.length];
     int[] maxPoolSizes = new int[repositoryConnections.length];
     
     for (int i = 0; i < repositoryConnections.length; i++)
     {
+      connectionNames[i] = repositoryConnections[i].getName();
       classNames[i] = repositoryConnections[i].getClassName();
       configInfos[i] = repositoryConnections[i].getConfigParams();
       maxPoolSizes[i] = repositoryConnections[i].getMaxConnections();
     }
     return localPool.grabMultiple(threadContext,
-      orderingKeys, classNames, configInfos, maxPoolSizes);
+      orderingKeys, connectionNames, classNames, configInfos, maxPoolSizes);
   }
 
   /** Get a repository connector.
@@ -81,28 +83,35 @@ public class RepositoryConnectorPool imp
   public IRepositoryConnector grab(IRepositoryConnection repositoryConnection)
     throws ManifoldCFException
   {
-    return localPool.grab(threadContext, repositoryConnection.getClassName(),
+    return localPool.grab(threadContext, repositoryConnection.getName(), repositoryConnection.getClassName(),
       repositoryConnection.getConfigParams(), repositoryConnection.getMaxConnections());
   }
 
   /** Release multiple repository connectors.
+  *@param connections are the connections describing the instances to release.
   *@param connectors are the connector instances to release.
   */
   @Override
-  public void releaseMultiple(IRepositoryConnector[] connectors)
+  public void releaseMultiple(IRepositoryConnection[] connections, IRepositoryConnector[] connectors)
     throws ManifoldCFException
   {
-    localPool.releaseMultiple(connectors);
+    String[] connectionNames = new String[connections.length];
+    for (int i = 0; i < connections.length; i++)
+    {
+      connectionNames[i] = connections[i].getName();
+    }
+    localPool.releaseMultiple(connectionNames, connectors);
   }
 
   /** Release a repository connector.
+  *@param connection is the connection describing the instance to release.
   *@param connector is the connector to release.
   */
   @Override
-  public void release(IRepositoryConnector connector)
+  public void release(IRepositoryConnection connection, IRepositoryConnector connector)
     throws ManifoldCFException
   {
-    localPool.release(connector);
+    localPool.release(connection.getName(), connector);
   }
 
   /** Idle notification for inactive repository connector handles.
@@ -150,10 +159,10 @@ public class RepositoryConnectorPool imp
       return connectorManager.isInstalled(className);
     }
 
-    public IRepositoryConnector[] grabMultiple(IThreadContext tc, String[] orderingKeys, String[] classNames, ConfigParams[] configInfos, int[] maxPoolSizes)
+    public IRepositoryConnector[] grabMultiple(IThreadContext tc, String[] orderingKeys, String[] connectionNames, String[] classNames, ConfigParams[] configInfos, int[] maxPoolSizes)
       throws ManifoldCFException
     {
-      return grabMultiple(tc,IRepositoryConnector.class,orderingKeys,classNames,configInfos,maxPoolSizes);
+      return grabMultiple(tc,IRepositoryConnector.class,orderingKeys,connectionNames,classNames,configInfos,maxPoolSizes);
     }
 
   }

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentCleanupThread.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentCleanupThread.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentCleanupThread.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentCleanupThread.java Fri Dec  6 09:32:29 2013
@@ -249,7 +249,7 @@ public class DocumentCleanupThread exten
             finally
             {
               // Free up the reserved connector instance
-              repositoryConnectorPool.release(connector);
+              repositoryConnectorPool.release(connection,connector);
             }
           }
           catch (ManifoldCFException e)

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java Fri Dec  6 09:32:29 2013
@@ -252,7 +252,7 @@ public class ExpireThread extends Thread
             finally
             {
               // Free up the reserved connector instance
-              repositoryConnectorPool.release(connector);
+              repositoryConnectorPool.release(connection,connector);
             }
           }
           catch (ManifoldCFException e)

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobNotificationThread.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobNotificationThread.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobNotificationThread.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/JobNotificationThread.java Fri Dec  6 09:32:29 2013
@@ -140,7 +140,7 @@ public class JobNotificationThread exten
                   }
                   finally
                   {
-                    outputConnectorPool.release(connector);
+                    outputConnectorPool.release(connection,connector);
                   }
                 }
               }

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java Fri Dec  6 09:32:29 2013
@@ -1014,7 +1014,7 @@ public class ManifoldCF extends org.apac
       }
       finally
       {
-        repositoryConnectorPool.release(connector);
+        repositoryConnectorPool.release(connection,connector);
       }
 
       priorities[i] = new PriorityCalculator(rt,connection,binNames);
@@ -1247,7 +1247,7 @@ public class ManifoldCF extends org.apac
       }
       finally
       {
-        outputConnectorPool.release(connector);
+        outputConnectorPool.release(connection,connector);
       }
           
       ConfigurationNode response = new ConfigurationNode(API_CHECKRESULTNODE);
@@ -1289,7 +1289,7 @@ public class ManifoldCF extends org.apac
       }
       finally
       {
-        authorityConnectorPool.release(connector);
+        authorityConnectorPool.release(connection,connector);
       }
           
       ConfigurationNode response = new ConfigurationNode(API_CHECKRESULTNODE);
@@ -1331,7 +1331,7 @@ public class ManifoldCF extends org.apac
       }
       finally
       {
-        mappingConnectorPool.release(connector);
+        mappingConnectorPool.release(connection,connector);
       }
           
       ConfigurationNode response = new ConfigurationNode(API_CHECKRESULTNODE);
@@ -1373,7 +1373,7 @@ public class ManifoldCF extends org.apac
       }
       finally
       {
-        repositoryConnectorPool.release(connector);
+        repositoryConnectorPool.release(connection,connector);
       }
           
       ConfigurationNode response = new ConfigurationNode(API_CHECKRESULTNODE);
@@ -1411,7 +1411,7 @@ public class ManifoldCF extends org.apac
       }
       finally
       {
-        outputConnectorPool.release(connector);
+        outputConnectorPool.release(connection,connector);
       }
     }
     catch (ManifoldCFException e)
@@ -1444,7 +1444,7 @@ public class ManifoldCF extends org.apac
       }
       finally
       {
-        repositoryConnectorPool.release(connector);
+        repositoryConnectorPool.release(connection,connector);
       }
     }
     catch (ManifoldCFException e)

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java Fri Dec  6 09:32:29 2013
@@ -166,7 +166,7 @@ public class SeedingThread extends Threa
                 }
                 finally
                 {
-                  repositoryConnectorPool.release(connector);
+                  repositoryConnectorPool.release(connection,connector);
                 }
 
 

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java Fri Dec  6 09:32:29 2013
@@ -169,7 +169,7 @@ public class StartupThread extends Threa
                 }
                 finally
                 {
-                  repositoryConnectorPool.release(connector);
+                  repositoryConnectorPool.release(connection,connector);
                 }
 
                 // Start this job!

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StufferThread.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StufferThread.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StufferThread.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StufferThread.java Fri Dec  6 09:32:29 2013
@@ -269,7 +269,7 @@ public class StufferThread extends Threa
                 }
                 finally
                 {
-                  repositoryConnectorPool.release(connector);
+                  repositoryConnectorPool.release(connection,connector);
                 }
               }
             }

Modified: manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java?rev=1548462&r1=1548461&r2=1548462&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java (original)
+++ manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java Fri Dec  6 09:32:29 2013
@@ -831,7 +831,7 @@ public class WorkerThread extends Thread
                 }
                 finally
                 {
-                  repositoryConnectorPool.release(connector);
+                  repositoryConnectorPool.release(connection,connector);
                 }
               
               }