incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r911029 [9/19] - in /incubator/lcf/trunk: modules/connectors/documentum/connector/org/apache/lcf/crawler/authorities/DCTM/ modules/connectors/documentum/connector/org/apache/lcf/crawler/connectors/DCTM/ modules/connectors/documentum/crawler...
Date Wed, 17 Feb 2010 15:57:35 GMT
Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/OutputConnectorFactory.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/OutputConnectorFactory.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/OutputConnectorFactory.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/OutputConnectorFactory.java Wed Feb 17 15:57:27 2010
@@ -43,7 +43,7 @@
         *@param className is the class name.
         */
         public static void install(IThreadContext threadContext, String className)
-                throws MetacartaException
+                throws LCFException
         {
                 IOutputConnector connector = getConnectorNoCheck(className);
                 connector.install(threadContext);
@@ -53,7 +53,7 @@
         *@param className is the class name.
         */
         public static void deinstall(IThreadContext threadContext, String className)
-                throws MetacartaException
+                throws LCFException
         {
                 IOutputConnector connector = getConnectorNoCheck(className);
                 connector.deinstall(threadContext);
@@ -64,7 +64,7 @@
         *@return the list of activities.
         */
         public static String[] getActivitiesList(IThreadContext threadContext, String className)
-                throws MetacartaException
+                throws LCFException
         {
                 IOutputConnector connector = getConnector(threadContext, className);
                 if (connector == null)
@@ -79,7 +79,7 @@
         *@return the folder string.
         */
         public static String getJSPFolder(IThreadContext threadContext, String className)
-                throws MetacartaException
+                throws LCFException
         {
                 IOutputConnector connector = getConnector(threadContext, className);
                 if (connector == null)
@@ -92,7 +92,7 @@
         *@return the instance.
         */
         public static IOutputConnector getConnectorNoCheck(String className)
-                throws MetacartaException
+                throws LCFException
         {
                 try
                 {
@@ -103,7 +103,7 @@
                         Object[] arguments = new Object[0];
                         Object o = c.newInstance(arguments);
                         if (!(o instanceof IOutputConnector))
-                                throw new MetacartaException("Class '"+className+"' does not implement IOutputConnector.");
+                                throw new LCFException("Class '"+className+"' does not implement IOutputConnector.");
                         return (IOutputConnector)o;
                 }
                 catch (InvocationTargetException e)
@@ -112,42 +112,42 @@
                         if (z instanceof Error)
                                 throw (Error)z;
                         else
-                                throw (MetacartaException)z;
+                                throw (LCFException)z;
                 }
                 catch (ClassNotFoundException e)
                 {
-                        throw new MetacartaException("No class implementing IOutputConnector called '"+
+                        throw new LCFException("No class implementing IOutputConnector called '"+
                                 className+"'.",
                                 e);
                 }
                 catch (NoSuchMethodException e)
                 {
-                        throw new MetacartaException("No appropriate constructor for IOutputConnector implementation '"+
+                        throw new LCFException("No appropriate constructor for IOutputConnector implementation '"+
                                 className+"'.  Need xxx(ConfigParams).",
                                 e);
                 }
                 catch (SecurityException e)
                 {
-                        throw new MetacartaException("Protected constructor for IOutputConnector implementation '"+className+"'",
+                        throw new LCFException("Protected constructor for IOutputConnector implementation '"+className+"'",
                                 e);
                 }
                 catch (IllegalAccessException e)
                 {
-                        throw new MetacartaException("Unavailable constructor for IOutputConnector implementation '"+className+"'",
+                        throw new LCFException("Unavailable constructor for IOutputConnector implementation '"+className+"'",
                                 e);
                 }
                 catch (IllegalArgumentException e)
                 {
-                        throw new MetacartaException("Shouldn't happen!!!",e);
+                        throw new LCFException("Shouldn't happen!!!",e);
                 }
                 catch (InstantiationException e)
                 {
-                        throw new MetacartaException("InstantiationException for IOutputConnector implementation '"+className+"'",
+                        throw new LCFException("InstantiationException for IOutputConnector implementation '"+className+"'",
                                 e);
                 }
                 catch (ExceptionInInitializerError e)
                 {
-                        throw new MetacartaException("ExceptionInInitializerError for IOutputConnector implementation '"+className+"'",
+                        throw new LCFException("ExceptionInInitializerError for IOutputConnector implementation '"+className+"'",
                                 e);
                 }
 
@@ -158,7 +158,7 @@
         *@return the instance.
         */
         protected static IOutputConnector getConnector(IThreadContext threadContext, String className)
-                throws MetacartaException
+                throws LCFException
         {
                 IOutputConnectorManager connMgr = OutputConnectorManagerFactory.make(threadContext);
                 if (connMgr.isInstalled(className) == false)
@@ -173,7 +173,7 @@
                         Object[] arguments = new Object[0];
                         Object o = c.newInstance(arguments);
                         if (!(o instanceof IOutputConnector))
-                                throw new MetacartaException("Class '"+className+"' does not implement IOutputConnector.");
+                                throw new LCFException("Class '"+className+"' does not implement IOutputConnector.");
                         return (IOutputConnector)o;
                 }
                 catch (InvocationTargetException e)
@@ -182,7 +182,7 @@
                         if (z instanceof Error)
                                 throw (Error)z;
                         else
-                                throw (MetacartaException)z;
+                                throw (LCFException)z;
                 }
                 catch (ClassNotFoundException e)
                 {
@@ -191,38 +191,38 @@
                         if (connMgr.isInstalled(className) == false)
                                 return null;
 
-                        throw new MetacartaException("No class implementing IOutputConnector called '"+
+                        throw new LCFException("No class implementing IOutputConnector called '"+
                                 className+"'.",
                                 e);
                 }
                 catch (NoSuchMethodException e)
                 {
-                        throw new MetacartaException("No appropriate constructor for IOutputConnector implementation '"+
+                        throw new LCFException("No appropriate constructor for IOutputConnector implementation '"+
                                 className+"'.  Need xxx(ConfigParams).",
                                 e);
                 }
                 catch (SecurityException e)
                 {
-                        throw new MetacartaException("Protected constructor for IOutputConnector implementation '"+className+"'",
+                        throw new LCFException("Protected constructor for IOutputConnector implementation '"+className+"'",
                                 e);
                 }
                 catch (IllegalAccessException e)
                 {
-                        throw new MetacartaException("Unavailable constructor for IOutputConnector implementation '"+className+"'",
+                        throw new LCFException("Unavailable constructor for IOutputConnector implementation '"+className+"'",
                                 e);
                 }
                 catch (IllegalArgumentException e)
                 {
-                        throw new MetacartaException("Shouldn't happen!!!",e);
+                        throw new LCFException("Shouldn't happen!!!",e);
                 }
                 catch (InstantiationException e)
                 {
-                        throw new MetacartaException("InstantiationException for IOutputConnector implementation '"+className+"'",
+                        throw new LCFException("InstantiationException for IOutputConnector implementation '"+className+"'",
                                 e);
                 }
                 catch (ExceptionInInitializerError e)
                 {
-                        throw new MetacartaException("ExceptionInInitializerError for IOutputConnector implementation '"+className+"'",
+                        throw new LCFException("ExceptionInInitializerError for IOutputConnector implementation '"+className+"'",
                                 e);
                 }
 
@@ -233,7 +233,7 @@
         */
         public static IOutputConnector[] grabMultiple(IThreadContext threadContext,
                 String[] orderingKeys, String[] classNames, ConfigParams[] configInfos, int[] maxPoolSizes)
-                throws MetacartaException
+                throws LCFException
         {
                 IOutputConnector[] rval = new IOutputConnector[classNames.length];
                 HashMap orderMap = new HashMap();
@@ -241,7 +241,7 @@
                 while (i < orderingKeys.length)
                 {
                         if (orderMap.get(orderingKeys[i]) != null)
-                            throw new MetacartaException("Found duplicate order key");
+                            throw new LCFException("Found duplicate order key");
                         orderMap.put(orderingKeys[i],new Integer(i));
                         i++;
                 }
@@ -270,13 +270,13 @@
                                         {
                                                 release(rval[index]);
                                         }
-                                        catch (MetacartaException e2)
+                                        catch (LCFException e2)
                                         {
                                         }
                                 }
-                                if (e instanceof MetacartaException)
+                                if (e instanceof LCFException)
                                 {
-                                        throw (MetacartaException)e;
+                                        throw (LCFException)e;
                                 }
                                 throw (Error)e;
                         }
@@ -294,7 +294,7 @@
         */
         public static IOutputConnector grab(IThreadContext threadContext,
                 String className, ConfigParams configInfo, int maxPoolSize)
-                throws MetacartaException
+                throws LCFException
         {
                 // We want to get handles off the pool and use them.  But the
                 // handles we fetch have to have the right config information.
@@ -324,10 +324,10 @@
         /** Release multiple output connectors.
         */
         public static void releaseMultiple(IOutputConnector[] connectors)
-                throws MetacartaException
+                throws LCFException
         {
                 int i = 0;
-                MetacartaException currentException = null;
+                LCFException currentException = null;
                 while (i < connectors.length)
                 {
                         IOutputConnector c = connectors[i++];
@@ -335,7 +335,7 @@
                         {
                                 release(c);
                         }
-                        catch (MetacartaException e)
+                        catch (LCFException e)
                         {
                                 if (currentException == null)
                                         currentException = e;
@@ -349,7 +349,7 @@
         *@param connector is the connector to release.
         */
         public static void release(IOutputConnector connector)
-                throws MetacartaException
+                throws LCFException
         {
                 // If the connector is null, skip the release, because we never really got the connector in the first place.
                 if (connector == null)
@@ -376,7 +376,7 @@
         * This method polls all inactive handles.
         */
         public static void pollAllConnectors(IThreadContext threadContext)
-                throws MetacartaException
+                throws LCFException
         {
                 // System.out.println("Pool stats:");
                 
@@ -401,7 +401,7 @@
         *@param threadContext is the local thread context.
         */
         public static void closeAllConnectors(IThreadContext threadContext)
-                throws MetacartaException
+                throws LCFException
         {
                 // Go through the whole pool and clean it out
                 synchronized (poolHash)
@@ -493,7 +493,7 @@
                 *@return the connector, or null if no connector could be connected.
                 */
                 public synchronized IOutputConnector getConnector(IThreadContext threadContext)
-                        throws MetacartaException
+                        throws LCFException
                 {
                         while (numFree == 0)
                         {
@@ -503,7 +503,7 @@
                                 }
                                 catch (InterruptedException e)
                                 {
-                                        throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+                                        throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
                                 }
                         }
 
@@ -526,7 +526,7 @@
                                         Object[] arguments = new Object[0];
                                         Object o = c.newInstance(arguments);
                                         if (!(o instanceof IOutputConnector))
-                                                throw new MetacartaException("Class '"+className+"' does not implement IOutputConnector.");
+                                                throw new LCFException("Class '"+className+"' does not implement IOutputConnector.");
                                         rc = (IOutputConnector)o;
                                         rc.connect(configParams);
                                 }
@@ -536,7 +536,7 @@
                                         if (z instanceof Error)
                                                 throw (Error)z;
                                         else
-                                                throw (MetacartaException)z;
+                                                throw (LCFException)z;
                                 }
                                 catch (ClassNotFoundException e)
                                 {
@@ -546,38 +546,38 @@
                                         if (connMgr.isInstalled(className) == false)
                                                 return null;
                                         
-                                        throw new MetacartaException("No class implementing IOutputConnector called '"+
+                                        throw new LCFException("No class implementing IOutputConnector called '"+
                                                 className+"'.",
                                                 e);
                                 }
                                 catch (NoSuchMethodException e)
                                 {
-                                        throw new MetacartaException("No appropriate constructor for IOutputConnector implementation '"+
+                                        throw new LCFException("No appropriate constructor for IOutputConnector implementation '"+
                                                 className+"'.  Need xxx(ConfigParams).",
                                                 e);
                                 }
                                 catch (SecurityException e)
                                 {
-                                        throw new MetacartaException("Protected constructor for IOutputConnector implementation '"+className+"'",
+                                        throw new LCFException("Protected constructor for IOutputConnector implementation '"+className+"'",
                                                 e);
                                 }
                                 catch (IllegalAccessException e)
                                 {
-                                        throw new MetacartaException("Unavailable constructor for IOutputConnector implementation '"+className+"'",
+                                        throw new LCFException("Unavailable constructor for IOutputConnector implementation '"+className+"'",
                                                 e);
                                 }
                                 catch (IllegalArgumentException e)
                                 {
-                                        throw new MetacartaException("Shouldn't happen!!!",e);
+                                        throw new LCFException("Shouldn't happen!!!",e);
                                 }
                                 catch (InstantiationException e)
                                 {
-                                        throw new MetacartaException("InstantiationException for IOutputConnector implementation '"+className+"'",
+                                        throw new LCFException("InstantiationException for IOutputConnector implementation '"+className+"'",
                                                 e);
                                 }
                                 catch (ExceptionInInitializerError e)
                                 {
-                                        throw new MetacartaException("ExceptionInInitializerError for IOutputConnector implementation '"+className+"'",
+                                        throw new LCFException("ExceptionInInitializerError for IOutputConnector implementation '"+className+"'",
                                                 e);
                                 }
                         }
@@ -594,7 +594,7 @@
                 *@param connector is the connector.
                 */
                 public synchronized void releaseConnector(IOutputConnector connector)
-                        throws MetacartaException
+                        throws LCFException
                 {
                         if (connector == null)
                                 return;
@@ -610,7 +610,7 @@
                 /** Notify all free connectors.
                 */
                 public synchronized void pollAll(IThreadContext threadContext)
-                        throws MetacartaException
+                        throws LCFException
                 {
                         int i = 0;
                         while (i < stack.size())
@@ -626,7 +626,7 @@
                 /** Release all free connectors.
                 */
                 public synchronized void releaseAll(IThreadContext threadContext)
-                        throws MetacartaException
+                        throws LCFException
                 {
                         while (stack.size() > 0)
                         {

Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/OutputConnectorManagerFactory.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/OutputConnectorManagerFactory.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/OutputConnectorManagerFactory.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/OutputConnectorManagerFactory.java Wed Feb 17 15:57:27 2010
@@ -38,16 +38,16 @@
         *@return the output connector manager handle.
         */
         public static IOutputConnectorManager make(IThreadContext tc)
-                throws MetacartaException
+                throws LCFException
         {
                 Object o = tc.get(connMgr);
                 if (o == null || !(o instanceof IOutputConnectorManager))
                 {
 
                         IDBInterface database = DBInterfaceFactory.make(tc,
-                                Metacarta.getMasterDatabaseName(),
-                                Metacarta.getMasterDatabaseUsername(),
-                                Metacarta.getMasterDatabasePassword());
+                                LCF.getMasterDatabaseName(),
+                                LCF.getMasterDatabaseUsername(),
+                                LCF.getMasterDatabasePassword());
 
                         o = new org.apache.lcf.agents.outputconnmgr.OutputConnectorManager(tc,database);
                         tc.save(connMgr,o);

Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/OutputSpecification.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/OutputSpecification.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/OutputSpecification.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/OutputSpecification.java Wed Feb 17 15:57:27 2010
@@ -38,7 +38,7 @@
 	*@param xml is the input XML.
 	*/
 	public OutputSpecification(String xml)
-		throws MetacartaException
+		throws LCFException
 	{
 		super(xml);
 	}

Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/RepositoryDocument.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/RepositoryDocument.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/RepositoryDocument.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/interfaces/RepositoryDocument.java Wed Feb 17 15:57:27 2010
@@ -171,7 +171,7 @@
 	* to remove the entry from the document.
 	*/
 	public void addField(String fieldName, Reader[] fieldData)
-		throws MetacartaException
+		throws LCFException
 	{
 		if (fieldData == null)
 			fields.remove(fieldName);
@@ -184,7 +184,7 @@
 	*@param fieldData is the single-valued data (as a Reader).  Null means "no value".
 	*/
 	public void addField(String fieldName, Reader fieldData)
-		throws MetacartaException
+		throws LCFException
 	{
 		fields.put(fieldName,new Reader[]{fieldData});
 	}
@@ -195,7 +195,7 @@
 	* to remove the entry from the document.
 	*/
 	public void addField(String fieldName, String[] fieldData)
-		throws MetacartaException
+		throws LCFException
 	{
 		if (fieldData == null)
 			fields.remove(fieldName);
@@ -208,7 +208,7 @@
 	*@param fieldData is the single-valued data (as a String).  Null means "no value".
 	*/
 	public void addField(String fieldName, String fieldData)
-		throws MetacartaException
+		throws LCFException
 	{
 		fields.put(fieldName,new String[]{fieldData});
 	}

Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/output/BaseOutputConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/output/BaseOutputConnector.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/output/BaseOutputConnector.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/output/BaseOutputConnector.java Wed Feb 17 15:57:27 2010
@@ -57,7 +57,7 @@
         *@param threadContext is the current thread context.
         */
         public void install(IThreadContext threadContext)
-                throws MetacartaException
+                throws LCFException
         {
                 // Base install does nothing
         }
@@ -68,7 +68,7 @@
         *@param threadContext is the current thread context.
         */
         public void deinstall(IThreadContext threadContext)
-                throws MetacartaException
+                throws LCFException
         {
                 // Base uninstall does nothing
         }
@@ -96,7 +96,7 @@
         *@return the connection's status as a displayable string.
         */
         public String check()
-                throws MetacartaException
+                throws LCFException
         {
                 // Base version returns "OK" status.
                 return "Connection working";
@@ -106,7 +106,7 @@
         * in active use.
         */
         public void poll()
-                throws MetacartaException
+                throws LCFException
         {
                 // Base version does nothing
         }
@@ -114,7 +114,7 @@
         /** Close the connection.  Call this before discarding the repository connector.
         */
         public void disconnect()
-                throws MetacartaException
+                throws LCFException
         {
                 params = null;
         }

Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/outputconnection/OutputConnectionManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/outputconnection/OutputConnectionManager.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/outputconnection/OutputConnectionManager.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/outputconnection/OutputConnectionManager.java Wed Feb 17 15:57:27 2010
@@ -22,7 +22,7 @@
 import org.apache.lcf.core.interfaces.*;
 import org.apache.lcf.agents.interfaces.*;
 import org.apache.lcf.agents.interfaces.CacheKeyFactory;
-import org.apache.lcf.agents.system.Metacarta;
+import org.apache.lcf.agents.system.LCF;
 
 
 /** This class is the manager of the outputconnection description.  Inside, a database table is managed,
@@ -53,7 +53,7 @@
         *@param threadContext is the thread context.
         */
         public OutputConnectionManager(IThreadContext threadContext, IDBInterface database)
-                throws MetacartaException
+                throws LCFException
         {
                 super(database,"outputconnections");
 
@@ -64,7 +64,7 @@
         /** Install the manager.
         */
         public void install()
-                throws MetacartaException
+                throws LCFException
         {
                 beginTransaction();
                 try
@@ -86,7 +86,7 @@
                                 // No upgrade needed yet, since rev 1 of the table is fine.
                         }
                 }
-                catch (MetacartaException e)
+                catch (LCFException e)
                 {
                         signalRollback();
                         throw e;
@@ -105,51 +105,51 @@
         /** Uninstall the manager.
         */
         public void deinstall()
-                throws MetacartaException
+                throws LCFException
         {
                 performDrop(null);
         }
 
         /** Export configuration */
         public void exportConfiguration(java.io.OutputStream os)
-                throws java.io.IOException, MetacartaException
+                throws java.io.IOException, LCFException
         {
                 // Write a version indicator
-                Metacarta.writeDword(os,1);
+                LCF.writeDword(os,1);
                 // Get the authority list
                 IOutputConnection[] list = getAllConnections();
                 // Write the number of authorities
-                Metacarta.writeDword(os,list.length);
+                LCF.writeDword(os,list.length);
                 // Loop through the list and write the individual repository connection info
                 int i = 0;
                 while (i < list.length)
                 {
                         IOutputConnection conn = list[i++];
-                        Metacarta.writeString(os,conn.getName());
-                        Metacarta.writeString(os,conn.getDescription());
-                        Metacarta.writeString(os,conn.getClassName());
-                        Metacarta.writeString(os,conn.getConfigParams().toXML());
-                        Metacarta.writeDword(os,conn.getMaxConnections());
+                        LCF.writeString(os,conn.getName());
+                        LCF.writeString(os,conn.getDescription());
+                        LCF.writeString(os,conn.getClassName());
+                        LCF.writeString(os,conn.getConfigParams().toXML());
+                        LCF.writeDword(os,conn.getMaxConnections());
                 }
         }
         
         /** Import configuration */
         public void importConfiguration(java.io.InputStream is)
-                throws java.io.IOException, MetacartaException
+                throws java.io.IOException, LCFException
         {
-                int version = Metacarta.readDword(is);
+                int version = LCF.readDword(is);
                 if (version != 1)
                         throw new java.io.IOException("Unknown repository connection configuration version: "+Integer.toString(version));
-                int count = Metacarta.readDword(is);
+                int count = LCF.readDword(is);
                 int i = 0;
                 while (i < count)
                 {
                         IOutputConnection conn = create();
-                        conn.setName(Metacarta.readString(is));
-                        conn.setDescription(Metacarta.readString(is));
-                        conn.setClassName(Metacarta.readString(is));
-                        conn.getConfigParams().fromXML(Metacarta.readString(is));
-                        conn.setMaxConnections(Metacarta.readDword(is));
+                        conn.setName(LCF.readString(is));
+                        conn.setDescription(LCF.readString(is));
+                        conn.setClassName(LCF.readString(is));
+                        conn.getConfigParams().fromXML(LCF.readString(is));
+                        conn.setMaxConnections(LCF.readDword(is));
                         // Attempt to save this connection
                         save(conn);
                         i++;
@@ -160,7 +160,7 @@
         *@return an array of connection objects.
         */
         public IOutputConnection[] getAllConnections()
-                throws MetacartaException
+                throws LCFException
         {
                 beginTransaction();
                 try
@@ -181,7 +181,7 @@
                         }
                         return loadMultiple(names);
                 }
-                catch (MetacartaException e)
+                catch (LCFException e)
                 {
                         signalRollback();
                         throw e;
@@ -202,7 +202,7 @@
         *@return the loaded connection object, or null if not found.
         */
         public IOutputConnection load(String name)
-                throws MetacartaException
+                throws LCFException
         {
                 return loadMultiple(new String[]{name})[0];
         }
@@ -212,7 +212,7 @@
         *@return the loaded connection objects.
         */
         public IOutputConnection[] loadMultiple(String[] names)
-                throws MetacartaException
+                throws LCFException
         {
                 // Build description objects
                 OutputConnectionDescription[] objectDescriptions = new OutputConnectionDescription[names.length];
@@ -235,7 +235,7 @@
         *@return the new object.
         */
         public IOutputConnection create()
-                throws MetacartaException
+                throws LCFException
         {
                 OutputConnection rval = new OutputConnection();
                 return rval;
@@ -245,7 +245,7 @@
         *@param object is the object to save.
         */
         public void save(IOutputConnection object)
-                throws MetacartaException
+                throws LCFException
         {
                 StringSetBuffer ssb = new StringSetBuffer();
                 ssb.add(getOutputConnectionsKey());
@@ -259,7 +259,7 @@
                     {
                         performLock();
                         // Notify of a change to the configuration
-                        Metacarta.noteConfigurationChange();
+                        LCF.noteConfigurationChange();
                         // See whether the instance exists
                         ArrayList params = new ArrayList();
                         params.add(object.getName());
@@ -288,7 +288,7 @@
 
                         cacheManager.invalidateKeys(ch);
                     }
-                    catch (MetacartaException e)
+                    catch (LCFException e)
                     {
                         signalRollback();
                         throw e;
@@ -314,7 +314,7 @@
         * name does not exist, no error is returned.
         */
         public void delete(String name)
-                throws MetacartaException
+                throws LCFException
         {
                 StringSetBuffer ssb = new StringSetBuffer();
                 ssb.add(getOutputConnectionsKey());
@@ -328,14 +328,14 @@
                         {
                                 // Check if anything refers to this connection name
                                 if (AgentManagerFactory.isOutputConnectionInUse(threadContext,name))
-                                        throw new MetacartaException("Can't delete output connection '"+name+"': existing entities refer to it");
-                                Metacarta.noteConfigurationChange();
+                                        throw new LCFException("Can't delete output connection '"+name+"': existing entities refer to it");
+                                LCF.noteConfigurationChange();
                                 ArrayList params = new ArrayList();
                                 params.add(name);
                                 performDelete("WHERE "+nameField+"=?",params,null);
                                 cacheManager.invalidateKeys(ch);
                         }
-                        catch (MetacartaException e)
+                        catch (LCFException e)
                         {
                                 signalRollback();
                                 throw e;
@@ -362,7 +362,7 @@
         *@return the repository connections that use that connector.
         */
         public String[] findConnectionsForConnector(String className)
-                throws MetacartaException
+                throws LCFException
         {
                 StringSetBuffer ssb = new StringSetBuffer();
                 ssb.add(getOutputConnectionsKey());
@@ -388,7 +388,7 @@
         *@return true if the underlying connector is registered.
         */
         public boolean checkConnectorExists(String name)
-                throws MetacartaException
+                throws LCFException
         {
                 beginTransaction();
                 try
@@ -401,13 +401,13 @@
                         IResultSet set = performQuery("SELECT "+classNameField+" FROM "+getTableName()+" WHERE "+nameField+"=?",params,
                                 localCacheKeys,null);
                         if (set.getRowCount() == 0)
-                                throw new MetacartaException("No such connection: '"+name+"'");
+                                throw new LCFException("No such connection: '"+name+"'");
                         IResultRow row = set.getRow(0);
                         String className = (String)row.getValue(classNameField);
                         IOutputConnectorManager cm = OutputConnectorManagerFactory.make(threadContext);
                         return cm.isInstalled(className);
                 }
-                catch (MetacartaException e)
+                catch (LCFException e)
                 {
                         signalRollback();
                         throw e;
@@ -459,7 +459,7 @@
         *@return the corresponding output connection objects.
         */
         protected OutputConnection[] getOutputConnectionsMultiple(String[] connectionNames)
-                throws MetacartaException
+                throws LCFException
         {
                 OutputConnection[] rval = new OutputConnection[connectionNames.length];
                 HashMap returnIndex = new HashMap();
@@ -503,7 +503,7 @@
                         signalRollback();
                         throw e;
                 }
-                catch (MetacartaException e)
+                catch (LCFException e)
                 {
                         signalRollback();
                         throw e;
@@ -521,7 +521,7 @@
         *@param params is the set of parameters.
         */
         protected void getOutputConnectionsChunk(OutputConnection[] rval, Map returnIndex, String idList, ArrayList params)
-                throws MetacartaException
+                throws LCFException
         {
                 IResultSet set;
                 set = performQuery("SELECT * FROM "+getTableName()+" WHERE "+
@@ -643,7 +643,7 @@
                 * @return the newly created objects to cache, or null, if any object cannot be created.
                 *  The order of the returned objects must correspond to the order of the object descriptinos.
                 */
-                public Object[] create(ICacheDescription[] objectDescriptions) throws MetacartaException
+                public Object[] create(ICacheDescription[] objectDescriptions) throws LCFException
                 {
                         // Turn the object descriptions into the parameters for the ToolInstance requests
                         String[] connectionNames = new String[objectDescriptions.length];
@@ -666,7 +666,7 @@
                 * @param objectDescription is the unique identifier of the object.
                 * @param cachedObject is the cached object.
                 */
-                public void exists(ICacheDescription objectDescription, Object cachedObject) throws MetacartaException
+                public void exists(ICacheDescription objectDescription, Object cachedObject) throws LCFException
                 {
                         // Cast what came in as what it really is
                         OutputConnectionDescription objectDesc = (OutputConnectionDescription)objectDescription;
@@ -684,7 +684,7 @@
                 /** Perform the desired operation.  This method is called after either createGetObject()
                 * or exists() is called for every requested object.
                 */
-                public void execute() throws MetacartaException
+                public void execute() throws LCFException
                 {
                         // Does nothing; we only want to fetch objects in this cacher.
                 }

Modified: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/outputconnmgr/OutputConnectorManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/outputconnmgr/OutputConnectorManager.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/outputconnmgr/OutputConnectorManager.java (original)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/outputconnmgr/OutputConnectorManager.java Wed Feb 17 15:57:27 2010
@@ -41,7 +41,7 @@
         *@param database is the database handle.
         */
         public OutputConnectorManager(IThreadContext threadContext, IDBInterface database)
-                throws MetacartaException
+                throws LCFException
         {
                 super(database,"outputconnectors");
                 this.threadContext = threadContext;
@@ -51,7 +51,7 @@
         /** Install or upgrade.
         */
         public void install()
-                throws MetacartaException
+                throws LCFException
         {
                 beginTransaction();
                 try
@@ -71,7 +71,7 @@
                                 addTableIndex(true,list);
                         }
                 }
-                catch (MetacartaException e)
+                catch (LCFException e)
                 {
                         signalRollback();
                         throw e;
@@ -91,7 +91,7 @@
         /** Uninstall.  This also unregisters all connectors.
         */
         public void deinstall()
-                throws MetacartaException
+                throws LCFException
         {
                 StringSet invKeys = new StringSet(getCacheKey());
 
@@ -110,7 +110,7 @@
                         }
                         performDrop(invKeys);
                 }
-                catch (MetacartaException e)
+                catch (LCFException e)
                 {
                         signalRollback();
                         throw e;
@@ -132,7 +132,7 @@
         *@param className is the class name.
         */
         public void registerConnector(String description, String className)
-                throws MetacartaException
+                throws LCFException
         {
                 StringSet invKeys = new StringSet(getCacheKey());
                 beginTransaction();
@@ -159,7 +159,7 @@
                         // Either way, we must do the install/upgrade itself.
                         OutputConnectorFactory.install(threadContext,className);
                 }
-                catch (MetacartaException e)
+                catch (LCFException e)
                 {
                         signalRollback();
                         throw e;
@@ -180,7 +180,7 @@
         *@param description is the description to unregister.
         */
         public void unregisterConnector(String className)
-                throws MetacartaException
+                throws LCFException
         {
                 StringSet invKeys = new StringSet(getCacheKey());
                 beginTransaction();
@@ -191,7 +191,7 @@
 
                         removeConnector(className);
                 }
-                catch (MetacartaException e)
+                catch (LCFException e)
                 {
                         signalRollback();
                         throw e;
@@ -213,7 +213,7 @@
         *@param className is the connector class to remove.
         */
         public void removeConnector(String className)
-                throws MetacartaException
+                throws LCFException
         {
                 StringSet invKeys = new StringSet(getCacheKey());
                 ArrayList list = new ArrayList();
@@ -226,7 +226,7 @@
         * These will be ordered by description.
         */
         public IResultSet getConnectors()
-                throws MetacartaException
+                throws LCFException
         {
                 StringSet invKeys = new StringSet(getCacheKey());
 
@@ -239,7 +239,7 @@
         *@return the description, or null if the class is not registered.
         */
         public String getDescription(String className)
-                throws MetacartaException
+                throws LCFException
         {
                 StringSet invKeys = new StringSet(getCacheKey());
 
@@ -258,7 +258,7 @@
         *@return true if installed, false otherwise.
         */
         public boolean isInstalled(String className)
-                throws MetacartaException
+                throws LCFException
         {
                 // Use the global table key; that's good enough because we don't expect stuff to change out from under very often.
                 StringSet invKeys = new StringSet(getCacheKey());

Added: incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/system/LCF.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/system/LCF.java?rev=911029&view=auto
==============================================================================
--- incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/system/LCF.java (added)
+++ incubator/lcf/trunk/modules/framework/agents/org/apache/lcf/agents/system/LCF.java Wed Feb 17 15:57:27 2010
@@ -0,0 +1,147 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+* 
+* http://www.apache.org/licenses/LICENSE-2.0
+* 
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.lcf.agents.system;
+
+import org.apache.lcf.core.interfaces.*;
+import org.apache.lcf.agents.interfaces.*;
+import java.io.*;
+import java.util.*;
+
+public class LCF extends org.apache.lcf.core.system.LCF
+{
+	public static final String _rcsid = "@(#)$Id$";
+
+	protected static boolean initialized = false;
+
+	/** Ingestion buffer size property. */
+	public static String ingestBufferSizeProperty = "org.apache.lcf.ingest.buffersize";
+	public static String ingestCredentialsRealm = "org.apache.lcf.ingest.credentialrealm";
+	public static String ingestResponseRetryCount = "org.apache.lcf.ingest.responseretrycount";
+	public static String ingestResponseRetryInterval = "org.apache.lcf.ingest.retryinterval";
+	public static String ingestRescheduleInterval = "org.apache.lcf.ingest.rescheduleinterval";
+	public static String ingestURIProperty = "org.apache.lcf.ingest.uri";
+	public static String ingestUserProperty = "org.apache.lcf.ingest.user";
+	public static String ingestPasswordProperty = "org.apache.lcf.ingest.password";
+	public static String ingestMaxConnectionsProperty = "org.apache.lcf.ingest.maxconnections";
+
+	/** This is the place we keep track of the agents we've started. */
+	protected static HashMap runningHash = new HashMap();
+
+	/** Initialize environment.
+	*/
+	public static synchronized void initializeEnvironment()
+	{
+		// System.out.println(" In agents initializeEnvironment");
+		if (initialized)
+			return;
+
+		// System.out.println("Initializing");
+		org.apache.lcf.core.system.LCF.initializeEnvironment();
+		Logging.initializeLoggers();
+		Logging.setLogLevels();
+		initialized = true;
+	}
+
+
+	/** Install the agent tables.  This is also responsible for upgrading the existing
+	* tables!!!
+	*@param threadcontext is the thread context.
+	*/
+	public static void installTables(IThreadContext threadcontext)
+		throws LCFException
+	{
+		IAgentManager mgr = AgentManagerFactory.make(threadcontext);
+		IIncrementalIngester igstmgr = IncrementalIngesterFactory.make(threadcontext);
+		IOutputConnectorManager outputConnMgr = OutputConnectorManagerFactory.make(threadcontext);
+		IOutputConnectionManager outputConnectionManager = OutputConnectionManagerFactory.make(threadcontext);
+                mgr.install();
+		outputConnMgr.install();
+		outputConnectionManager.install();
+                igstmgr.install();
+	}
+
+	/** Uninstall all the crawler system tables.
+	*@param threadcontext is the thread context.
+	*/
+	public static void deinstallTables(IThreadContext threadcontext)
+		throws LCFException
+	{
+		IAgentManager mgr = AgentManagerFactory.make(threadcontext);
+		IIncrementalIngester igstmgr = IncrementalIngesterFactory.make(threadcontext);
+		IOutputConnectorManager outputConnMgr = OutputConnectorManagerFactory.make(threadcontext);
+		IOutputConnectionManager outputConnectionManager = OutputConnectionManagerFactory.make(threadcontext);
+                igstmgr.deinstall();
+		outputConnectionManager.deinstall();
+		outputConnMgr.deinstall();
+                mgr.deinstall();
+	}
+
+
+	/** Start agents.
+	*@param threadContext is the thread context.
+	*/
+	public static void startAgents(IThreadContext threadContext)
+		throws LCFException
+	{
+		// Get agent manager
+		IAgentManager manager = AgentManagerFactory.make(threadContext);
+		String[] classes = manager.getAllAgents();
+		int i = 0;
+		while (i < classes.length)
+		{
+			String className = classes[i++];
+			synchronized (runningHash)
+			{
+				if (runningHash.get(className) == null)
+				{
+					// Start this agent
+					IAgent agent = AgentFactory.make(threadContext,className);
+					// Start it
+					agent.startAgent();
+					// Successful
+					runningHash.put(className,agent);
+				}
+			}
+		}
+		// Done.
+	}
+
+	/** Stop agents.
+	*@param threadContext is the thread context
+	*/
+	public static void stopAgents(IThreadContext threadContext)
+		throws LCFException
+	{
+		synchronized (runningHash)
+		{
+			HashMap iterHash = (HashMap)runningHash.clone();
+			Iterator iter = iterHash.keySet().iterator();
+			while (iter.hasNext())
+			{
+				String className = (String)iter.next();
+				IAgent agent = (IAgent)runningHash.get(className);
+				// Stop it
+				agent.stopAgent();
+				runningHash.remove(className);
+			}
+		}
+		// Done.
+	}
+}
+

Modified: incubator/lcf/trunk/modules/framework/authority-webapp/org/apache/lcf/authorityservice/servlet/UserACLServlet.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/authority-webapp/org/apache/lcf/authorityservice/servlet/UserACLServlet.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/authority-webapp/org/apache/lcf/authorityservice/servlet/UserACLServlet.java (original)
+++ incubator/lcf/trunk/modules/framework/authority-webapp/org/apache/lcf/authorityservice/servlet/UserACLServlet.java Wed Feb 17 15:57:27 2010
@@ -20,7 +20,7 @@
 
 import org.apache.lcf.core.interfaces.*;
 import org.apache.lcf.authorities.interfaces.*;
-import org.apache.lcf.authorities.system.Metacarta;
+import org.apache.lcf.authorities.system.LCF;
 import org.apache.lcf.authorities.system.Logging;
 import org.apache.lcf.authorities.system.RequestQueue;
 import org.apache.lcf.authorities.system.AuthRequest;
@@ -63,11 +63,11 @@
 		try
 		{
 			// Set up the environment
-			Metacarta.initializeEnvironment();
+			LCF.initializeEnvironment();
 			IThreadContext itc = ThreadContextFactory.make();
-			Metacarta.startSystem(itc);
+			LCF.startSystem(itc);
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			Logging.misc.error("Error starting authority service: "+e.getMessage(),e);
 			throw new ServletException("Error starting authority service: "+e.getMessage(),e);
@@ -82,11 +82,11 @@
 		try
 		{
 			// Set up the environment
-			Metacarta.initializeEnvironment();
+			LCF.initializeEnvironment();
 			IThreadContext itc = ThreadContextFactory.make();
-			Metacarta.stopSystem(itc);
+			LCF.stopSystem(itc);
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			Logging.misc.error("Error shutting down authority service: "+e.getMessage(),e);
 		}
@@ -99,7 +99,7 @@
 		throws ServletException, IOException
 	{
 		// Set up the environment
-		Metacarta.initializeEnvironment();
+		LCF.initializeEnvironment();
 
 		Logging.authorityService.debug("Received request");
 
@@ -137,11 +137,11 @@
 
 		try
 		{
-			RequestQueue queue = Metacarta.getRequestQueue();
+			RequestQueue queue = LCF.getRequestQueue();
 			if (queue == null)
 			{
 				// System wasn't started; return unauthorized
-				throw new MetacartaException("System improperly initialized");
+				throw new LCFException("System improperly initialized");
 			}
 			
 			IThreadContext itc = ThreadContextFactory.make();
@@ -195,8 +195,8 @@
 				if (exception != null)
 				{
 					// Exceptions are always bad now
-					// The MetacartaException here must disable access to the UI without causing a generic badness thing to happen, so use 403.
-					if (exception instanceof MetacartaException)
+					// The LCFException here must disable access to the UI without causing a generic badness thing to happen, so use 403.
+					if (exception instanceof LCFException)
 						response.sendError(response.SC_FORBIDDEN,"From "+ar.getIdentifyingString()+": "+exception.getMessage());
 					else
 						response.sendError(response.SC_INTERNAL_SERVER_ERROR,"From "+ar.getIdentifyingString()+": "+exception.getMessage());
@@ -265,7 +265,7 @@
 			Logging.authorityService.error("Unsupported encoding: "+e.getMessage(),e);
 			throw new ServletException("Fatal error occurred: "+e.getMessage(),e);
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			Logging.authorityService.error("User ACL servlet error: "+e.getMessage(),e);
 			response.sendError(response.SC_INTERNAL_SERVER_ERROR,e.getMessage());

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/DBCreate.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/DBCreate.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/DBCreate.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/DBCreate.java Wed Feb 17 15:57:27 2010
@@ -45,12 +45,12 @@
 			password = args[1];
 		try
 		{
-			Metacarta.initializeEnvironment();
+			LCF.initializeEnvironment();
 			IThreadContext tc = ThreadContextFactory.make();
-			Metacarta.createSystemDatabase(tc,null,userName,password);
-			System.err.println("Metacarta database created");
+			LCF.createSystemDatabase(tc,null,userName,password);
+			System.err.println("LCF database created");
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			e.printStackTrace();
 			System.exit(1);

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/DBDrop.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/DBDrop.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/DBDrop.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/DBDrop.java Wed Feb 17 15:57:27 2010
@@ -46,12 +46,12 @@
 
 		try
 		{
-			Metacarta.initializeEnvironment();
+			LCF.initializeEnvironment();
 			IThreadContext tc = ThreadContextFactory.make();
-			Metacarta.dropSystemDatabase(tc,null,userName,password);
-			System.err.println("Metacarta database dropped");
+			LCF.dropSystemDatabase(tc,null,userName,password);
+			System.err.println("LCF database dropped");
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			e.printStackTrace();
 			System.exit(1);

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/LockClean.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/LockClean.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/LockClean.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/LockClean.java Wed Feb 17 15:57:27 2010
@@ -38,8 +38,8 @@
 			System.exit(1);
 		}
 
-		Metacarta.initializeEnvironment();
-		String synchDir = Metacarta.getProperty(Metacarta.synchDirectoryProperty);
+		LCF.initializeEnvironment();
+		String synchDir = LCF.getProperty(LCF.synchDirectoryProperty);
 		if (synchDir != null)
 		{
 			// Recursively clean up the contents of the synch directory.

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/Obfuscate.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/Obfuscate.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/Obfuscate.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/Obfuscate.java Wed Feb 17 15:57:27 2010
@@ -42,9 +42,9 @@
 		String string = args[0];
 		try
 		{
-			UTF8Stdout.println(Metacarta.obfuscate(string));
+			UTF8Stdout.println(LCF.obfuscate(string));
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			e.printStackTrace();
 			System.exit(1);

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/cachemanager/CacheManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/cachemanager/CacheManager.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/cachemanager/CacheManager.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/cachemanager/CacheManager.java Wed Feb 17 15:57:27 2010
@@ -21,7 +21,7 @@
 import org.apache.lcf.core.interfaces.*;
 import java.util.*;
 import org.apache.lcf.core.system.Logging;
-import org.apache.lcf.core.system.Metacarta;
+import org.apache.lcf.core.system.LCF;
 import java.io.*;
 
 /** This class implements the cache manager interface, and provides generic cache management
@@ -46,10 +46,10 @@
 	protected HashMap transactionHash = new HashMap();
 
 	public CacheManager(IThreadContext context)
-		throws MetacartaException
+		throws LCFException
 	{
 		lockManager = LockManagerFactory.make(context);
-		synchDirectory = Metacarta.getProperty(Metacarta.synchDirectoryProperty);
+		synchDirectory = LCF.getProperty(LCF.synchDirectoryProperty);
 	}
 
 	/** Locate or create a set of objects in the cached object pool, and/or destroy and invalidate
@@ -80,7 +80,7 @@
 	*/
 	public void findObjectsAndExecute(ICacheDescription[] locateObjectDescriptions, StringSet invalidateKeys,
 		ICacheExecutor execObject, String transactionID)
-		throws MetacartaException
+		throws LCFException
 	{
 		// There is some clever engineering involved here.  The lock manager is used to control synchronization
 		// around usage and invalidation of objects.  However, there is ANOTHER lock condition that needs to be
@@ -202,7 +202,7 @@
 	*/
 	public ICacheHandle enterCache(ICacheDescription[] locateObjectDescriptions, StringSet invalidateKeys,
 		String transactionID)
-		throws MetacartaException
+		throws LCFException
 	{
 		if (Logging.cache.isDebugEnabled())
 		{
@@ -287,7 +287,7 @@
 			CacheTransactionHandle handle = (CacheTransactionHandle)transactionHash.get(transactionID);
 			if (handle == null)
 			{
-				MetacartaException ex = new MetacartaException("Illegal transaction ID: '"+transactionID+"'",MetacartaException.GENERAL_ERROR);
+				LCFException ex = new LCFException("Illegal transaction ID: '"+transactionID+"'",LCFException.GENERAL_ERROR);
 				Logging.cache.error(Thread.currentThread().toString()+": enterCache: "+transactionID+": "+this.toString()+": Transaction hash = "+transactionHash.toString(),ex);
 				throw ex;
 			}
@@ -317,7 +317,7 @@
 	*@param handle is the cache handle.
 	*/
 	public ICacheCreateHandle enterCreateSection(ICacheHandle handle)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.cache.isDebugEnabled())
@@ -332,8 +332,8 @@
 		// stop multiple creation.
 		ICacheDescription[] locateObjectDescriptions = handle.getObjectDescriptions();
 		if (locateObjectDescriptions == null)
-			throw new MetacartaException("Can't enter create section without objects to create",
-				MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Can't enter create section without objects to create",
+				LCFException.GENERAL_ERROR);
 		int i = 0;
 		ArrayList writeCriticalSectionArray = new ArrayList();
 		while (i < locateObjectDescriptions.length)
@@ -376,11 +376,11 @@
 	*@return the object, or null if not found.
 	*/
 	public Object lookupObject(ICacheCreateHandle handle, ICacheDescription objectDescription)
-		throws MetacartaException
+		throws LCFException
 	{
 		if (handle == null)
-			throw new MetacartaException("Can't do lookup outside of create section",
-				MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Can't do lookup outside of create section",
+				LCFException.GENERAL_ERROR);
 
 		if (Logging.cache.isDebugEnabled())
 		{
@@ -402,7 +402,7 @@
 			CacheTransactionHandle transactionHandle = (CacheTransactionHandle)transactionHash.get(transactionID);
 			if (transactionHandle == null)
 			{
-				MetacartaException ex = new MetacartaException("Illegal transaction id",MetacartaException.GENERAL_ERROR);
+				LCFException ex = new LCFException("Illegal transaction id",LCFException.GENERAL_ERROR);
 				Logging.cache.error(Thread.currentThread().toString()+": lookupObject: "+transactionID+": "+this.toString()+": Transaction hash = "+transactionHash.toString(),ex);
 				throw ex;
 			}
@@ -461,7 +461,7 @@
 	*@return true if expired, false otherwise.
 	*/
 	protected boolean hasExpired(String key, long createTime)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		File fileDescription = new File(makeFilePath(key),makeFileName(key));
@@ -493,7 +493,7 @@
 	*/
 	protected static String makeFileName(String key)
 	{
-		return "cache-"+Metacarta.safeFileName(key);
+		return "cache-"+LCF.safeFileName(key);
 	}
 
 	/** Set object's expiration and LRU.
@@ -526,11 +526,11 @@
 	*/
 	public void saveObject(ICacheCreateHandle handle, ICacheDescription objectDescription,
 		Object object)
-		throws MetacartaException
+		throws LCFException
 	{
 		if (handle == null)
-			throw new MetacartaException("Can't do save outside of create section",
-				MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Can't do save outside of create section",
+				LCFException.GENERAL_ERROR);
 
 		if (Logging.cache.isDebugEnabled())
 		{
@@ -578,7 +578,7 @@
 				CacheTransactionHandle transactionHandle = (CacheTransactionHandle)transactionHash.get(transactionID);
 				if (transactionHandle == null)
 				{
-					MetacartaException ex = new MetacartaException("Bad transaction handle",MetacartaException.GENERAL_ERROR);
+					LCFException ex = new LCFException("Bad transaction handle",LCFException.GENERAL_ERROR);
 					Logging.cache.error(Thread.currentThread().toString()+": saveObject: "+transactionID+": "+this.toString()+": Transaction hash = "+transactionHash.toString(),ex);
 					throw ex;
 				}
@@ -591,7 +591,7 @@
 	*@param handle is the handle created by the corresponding enterCreateSection() method.
 	*/
 	public void leaveCreateSection(ICacheCreateHandle handle)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.cache.isDebugEnabled())
@@ -606,7 +606,7 @@
 	*@param handle is the cache handle.  Does nothing if a null set of keys was passed in.
 	*/
 	public void invalidateKeys(ICacheHandle handle)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.cache.isDebugEnabled())
@@ -627,7 +627,7 @@
 			CacheTransactionHandle transactionHandle = (CacheTransactionHandle)transactionHash.get(transactionID);
 			if (transactionHandle == null)
 			{
-				MetacartaException ex = new MetacartaException("Bad transaction ID!",MetacartaException.GENERAL_ERROR);
+				LCFException ex = new LCFException("Bad transaction ID!",LCFException.GENERAL_ERROR);
 				Logging.cache.error(Thread.currentThread().toString()+": invalidateKeys: "+transactionID+": "+this.toString()+": Transaction hash = "+transactionHash.toString(),ex);
 				throw ex;
 			}
@@ -641,7 +641,7 @@
 	*@param keys is the set of keys to invalidate.
 	*/
 	protected void performInvalidation(StringSet keys)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		// Finally, perform the invalidation.  When support is added for
@@ -674,7 +674,7 @@
 	*@param handle is the handle of the cache we are leaving.
 	*/
 	public void leaveCache(ICacheHandle handle)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.cache.isDebugEnabled())
@@ -693,7 +693,7 @@
 	*@param enclosingTransactionID is the id of the transaction that is in effect, or null.
 	*/
 	public void startTransaction(String startingTransactionID, String enclosingTransactionID)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.cache.isDebugEnabled())
@@ -709,8 +709,8 @@
 			parent = (CacheTransactionHandle)transactionHash.get(enclosingTransactionID);
 			if (parent == null)
 			{
-				MetacartaException ex = new MetacartaException("Illegal parent transaction ID: "+enclosingTransactionID,
-					MetacartaException.GENERAL_ERROR);
+				LCFException ex = new LCFException("Illegal parent transaction ID: "+enclosingTransactionID,
+					LCFException.GENERAL_ERROR);
 				Logging.cache.error(Thread.currentThread().toString()+": startTransaction: "+this.toString()+": Transaction hash = "+transactionHash.toString(),ex);
 				throw ex;
 			}
@@ -731,7 +731,7 @@
 	* held open will be released.
 	*/
 	public void commitTransaction(String transactionID)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.cache.isDebugEnabled())
@@ -741,7 +741,7 @@
 
 		CacheTransactionHandle handle = (CacheTransactionHandle)transactionHash.get(transactionID);
 		if (handle == null)
-			throw new MetacartaException("Cache manager: commit transaction without start!",MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Cache manager: commit transaction without start!",LCFException.GENERAL_ERROR);
 
 		// First, move all the locally cached entries into the global cache.
 		// This is safe to do because we know that the transaction belongs to a single thread.
@@ -807,7 +807,7 @@
 	* held for the transaction.
 	*/
 	public void rollbackTransaction(String transactionID)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.cache.isDebugEnabled())
@@ -817,7 +817,7 @@
 
 		CacheTransactionHandle handle = (CacheTransactionHandle)transactionHash.get(transactionID);
 		if (handle == null)
-			throw new MetacartaException("Cache manager: rollback transaction without start!",MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Cache manager: rollback transaction without start!",LCFException.GENERAL_ERROR);
 
 		// End all of the locks
 		// We always end the write locks before the read locks.
@@ -844,7 +844,7 @@
 	*@param currentTimestamp is the current time in milliseconds since epoch.
 	*/
 	public void expireObjects(long currentTimestamp)
-		throws MetacartaException
+		throws LCFException
 	{
 		// This is a local JVM operation; we will not need to do any locks.  We just
 		// need to blow expired objects from the cache.
@@ -859,7 +859,7 @@
 	*@return the invalidation time, or 0 if none.
 	*/
 	protected static long readFile(File fileDescriptor)
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -881,7 +881,7 @@
 				}
 				catch (InterruptedIOException e)
 				{
-					throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+					throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 				}
 				catch (IOException e)
 				{
@@ -896,7 +896,7 @@
 			}
 			catch (InterruptedIOException e)
 			{
-				throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 			}
 			catch (IOException e)
 			{
@@ -911,7 +911,7 @@
 		}
 		catch (InterruptedIOException e)
 		{
-			throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+			throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 		}
 		catch (IOException e)
 		{
@@ -925,7 +925,7 @@
 	*@param value is the invalidation timestamp.
 	*/
 	protected static void writeFile(File fileDescriptor, long value)
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -954,12 +954,12 @@
 		}
 		catch (InterruptedIOException e)
 		{
-			throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+			throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 		}
 		catch (IOException e)
 		{
 			// Hard failure is called for
-			throw new MetacartaException("Cache system failure",e);
+			throw new LCFException("Cache system failure",e);
 		}
 	}
 
@@ -1260,7 +1260,7 @@
 		*@return the array of write locks we still need to throw.
 		*/
 		public StringSet getRemainingWriteLocks(StringSet cacheKeys, StringSet keys)
-			throws MetacartaException
+			throws LCFException
 		{
 			// If any of these keys are read locks but not yet write locks, we throw an exception!
 			// (There is currently no ability to promote a read lock to a write lock.)

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/common/Base64.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/common/Base64.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/common/Base64.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/common/Base64.java Wed Feb 17 15:57:27 2010
@@ -79,7 +79,7 @@
     *@return false if end-of-stream encountered, true otherwise
     */
     public boolean decodeNextWord(Reader inputBuffer, OutputStream outputBuffer)
-	throws MetacartaException
+	throws LCFException
     {
 	try
 	{
@@ -91,7 +91,7 @@
 			if (character == -1)
 			{
 				if (bufferIndex != 0)
-					throw new MetacartaException("Unexpected end of base64 input");
+					throw new LCFException("Unexpected end of base64 input");
 				return false;
 			}
 			char ch = (char)character;
@@ -99,7 +99,7 @@
 				characterBuffer[bufferIndex++] = ch;
 
 			// else
-			//	throw new MetacartaException("Illegal Base64 character: '"+ch+"'");
+			//	throw new LCFException("Illegal Base64 character: '"+ch+"'");
 		}
 
 		// We have the data; do the conversion.
@@ -132,7 +132,7 @@
     	}
 	catch (IOException e)
 	{
-		throw new MetacartaException("IO error converting from base 64",e);
+		throw new LCFException("IO error converting from base 64",e);
 	}
     }
 
@@ -141,7 +141,7 @@
     *@param outputBuffer is the binary output stream.
     */
     public void decodeStream(Reader inputBuffer, OutputStream outputBuffer)
-	throws MetacartaException
+	throws LCFException
     {
 	// Just loop until done.
 	// It may be efficient to replace this with a "bulk" method, but probably not much.
@@ -155,7 +155,7 @@
     *@return a corresponding byte array.
     */
     public byte[] decodeString(String inputString)
-	throws MetacartaException
+	throws LCFException
     {
 	try
 	{
@@ -184,7 +184,7 @@
 	}
 	catch (IOException e)
 	{
-		throw new MetacartaException("Error streaming through base64 decoder",e);
+		throw new LCFException("Error streaming through base64 decoder",e);
 	}
     }
 
@@ -194,7 +194,7 @@
     *@return false if end-of-stream encountered, true otherwise.
     */
     public boolean encodeNextWord(InputStream inputStream, Writer outputWriter)
-	throws MetacartaException
+	throws LCFException
     {
 	try
 	{
@@ -206,7 +206,7 @@
 		switch (actualLength)
 		{
 		case 0:
-			throw new MetacartaException("Read 0 bytes!");
+			throw new LCFException("Read 0 bytes!");
 		case 1:
             		i = byteBuffer[0]&0xff;
             		outputWriter.write(base64CharacterArray[i>>2]);
@@ -240,7 +240,7 @@
 	}
 	catch (IOException e)
 	{
-		throw new MetacartaException("IO error encoding in base64",e);
+		throw new LCFException("IO error encoding in base64",e);
 	}
     }
 
@@ -249,7 +249,7 @@
     *@param outputWriter is the output writer.
     */
     public void encodeStream(InputStream inputStream, Writer outputWriter)
-	throws MetacartaException
+	throws LCFException
     {
 	while (encodeNextWord(inputStream,outputWriter))
 	{
@@ -261,7 +261,7 @@
     *@return the encoded string.
     */
     public String encodeByteArray(byte[] inputByteArray)
-	throws MetacartaException
+	throws LCFException
     {
 	try
 	{
@@ -287,7 +287,7 @@
 	}
 	catch (IOException e)
 	{
-		throw new MetacartaException("Error streaming through base64 encoder",e);
+		throw new LCFException("Error streaming through base64 encoder",e);
 	}
     }
 

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/common/XMLDoc.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/common/XMLDoc.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/common/XMLDoc.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/common/XMLDoc.java Wed Feb 17 15:57:27 2010
@@ -228,7 +228,7 @@
 	* @return xml raw text
 	*/
 	public String getXML()
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -236,7 +236,7 @@
 		}
 		catch (UnsupportedEncodingException e)
 		{
-			throw new MetacartaException(e.getMessage(),e);
+			throw new LCFException(e.getMessage(),e);
 		}
 	}
 
@@ -244,7 +244,7 @@
 	* @return xml in byte array
 	*/
 	public byte[] toByteArray()
-		throws MetacartaException
+		throws LCFException
 	{
 		ByteArrayOutputStream os = new ByteArrayOutputStream(_blocksiz);
 		dumpOutput(os);
@@ -255,7 +255,7 @@
 	/** Creates the empty doc
 	*/
 	public XMLDoc()
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -266,7 +266,7 @@
 		}
 		catch (Exception e)
 		{
-			throw new MetacartaException("Error setting up parser: "+e.getMessage(),e);
+			throw new LCFException("Error setting up parser: "+e.getMessage(),e);
 		}
 	}
 
@@ -275,7 +275,7 @@
 	* @param data xml to parse
 	*/
 	public XMLDoc(String data)
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -284,7 +284,7 @@
 		}
 		catch (UnsupportedEncodingException e)
 		{
-			throw new MetacartaException(e.getMessage(),e);
+			throw new LCFException(e.getMessage(),e);
 		}
 	}
 
@@ -293,7 +293,7 @@
 	* @param data xml to parse
 	*/
 	public XMLDoc(StringBuffer data)
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -303,7 +303,7 @@
 		}
 		catch (UnsupportedEncodingException e)
 		{
-			throw new MetacartaException(e.getMessage(),e);
+			throw new LCFException(e.getMessage(),e);
 		}
 	}
 
@@ -312,7 +312,7 @@
 	* @param is InputStream of xml to parse
 	*/
 	public XMLDoc(InputStream is)
-		throws MetacartaException
+		throws LCFException
 	{
 		_doc = init(is);
 	}
@@ -320,7 +320,7 @@
 	/** Construct a document from all the children of an existing element object from another document.
 	*/
 	public XMLDoc(XMLDoc oldDoc, Object parent)
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -346,12 +346,12 @@
 		}
 		catch (Exception e)
 		{
-			throw new MetacartaException("Error setting up parser: "+e.getMessage(),e);
+			throw new LCFException("Error setting up parser: "+e.getMessage(),e);
 		}
 	}
 
 	private Document init(InputStream is)
-		throws MetacartaException
+		throws LCFException
 	{
 		Document doc = null;
 		try {
@@ -366,7 +366,7 @@
 		}
 		catch (Exception e)
 		{
-			throw new MetacartaException("XML parsing error: "+e.getMessage(),e);
+			throw new LCFException("XML parsing error: "+e.getMessage(),e);
 		}
 
 		return doc;
@@ -686,7 +686,7 @@
 
 	// Transform the output for serialization
 	private void dumpOutput(OutputStream os)
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -699,7 +699,7 @@
 		}
 		catch (Exception e)
 		{
-			throw new MetacartaException("Error dumping output: "+e.getMessage(),e);
+			throw new LCFException("Error dumping output: "+e.getMessage(),e);
 		}
 	}
 	

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/database/BaseTable.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/database/BaseTable.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/database/BaseTable.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/database/BaseTable.java Wed Feb 17 15:57:27 2010
@@ -60,7 +60,7 @@
 	/** Perform a table lock operation.
 	*/
 	protected void performLock()
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.performLock(tableName);
 	}
@@ -71,7 +71,7 @@
 	*@param parameterMap is the map of column name/values to write.
 	*/
 	protected void performInsert(Map parameterMap, StringSet invalidateKeys)
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.performInsert(tableName,parameterMap,invalidateKeys);
 	}
@@ -83,7 +83,7 @@
 	*@param whereParameters are the parameters that come with the where clause, if any.
 	*/
 	protected void performUpdate(Map parameterMap, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.performUpdate(tableName,parameterMap,whereClause,whereParameters,invalidateKeys);
 	}
@@ -94,7 +94,7 @@
 	*@param whereParameters are the parameters that come with the where clause, if any.
 	*/
 	protected void performDelete(String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.performDelete(tableName,whereClause,whereParameters,invalidateKeys);
 	}
@@ -106,7 +106,7 @@
 	*@param invalidateKeys are the cache keys that should be invalidated, if any.
 	*/
 	protected void performCreate(Map columnMap, StringSet invalidateKeys)
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.performCreate(tableName,columnMap,invalidateKeys);
 	}
@@ -121,7 +121,7 @@
 	*/
 	public void performAlter(Map columnMap, Map columnModifyMap, ArrayList columnDeleteList,
 		StringSet invalidateKeys)
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.performAlter(tableName,columnMap,columnModifyMap,columnDeleteList,invalidateKeys);
 	}
@@ -132,7 +132,7 @@
 	* in the index, in order.
 	*/
 	protected void addTableIndex(boolean unique, ArrayList columnList)
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.addTableIndex(tableName,unique,columnList);
 	}
@@ -142,7 +142,7 @@
 	*@param description is the index description.
 	*/
 	protected void performAddIndex(String indexName, IndexDescription description)
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.performAddIndex(indexName,tableName,description);
 	}
@@ -151,7 +151,7 @@
 	*@param indexName is the name of the index to remove.
 	*/
 	public void performRemoveIndex(String indexName)
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.performRemoveIndex(indexName);
 	}
@@ -159,7 +159,7 @@
 	/** Analyze this table.
 	*/
 	protected void analyzeTable()
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.analyzeTable(tableName);
 	}
@@ -167,7 +167,7 @@
 	/** Reindex this table.
 	*/
 	protected void reindexTable()
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.reindexTable(tableName);
 	}
@@ -176,7 +176,7 @@
 	*@param invalidateKeys are the cache keys that should be invalidated, if any.
 	*/
 	protected void performDrop(StringSet invalidateKeys)
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.performDrop(tableName,invalidateKeys);
 	}
@@ -188,7 +188,7 @@
 	*@return a map of column names & ColumnDescription's, or null.
 	*/
 	protected Map getTableSchema(StringSet invalidateKeys, String queryClass)
-		throws MetacartaException
+		throws LCFException
 	{
 		return dbInterface.getTableSchema(tableName,invalidateKeys,queryClass);
 	}
@@ -199,7 +199,7 @@
 	*@return a map of index names and IndexDescription objects, describing the indexes.
 	*/
 	protected Map getTableIndexes(StringSet invalidateKeys, String queryClass)
-		throws MetacartaException
+		throws LCFException
 	{
 		return dbInterface.getTableIndexes(tableName,invalidateKeys,queryClass);
 	}
@@ -210,7 +210,7 @@
 	*@param invalidateKeys are the cache keys to invalidate.
 	*/
 	protected void performModification(String query, ArrayList params, StringSet invalidateKeys)
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.performModification(query,params,invalidateKeys);
 	}
@@ -224,7 +224,7 @@
 	*@return a resultset.
 	*/
 	protected IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass)
-		throws MetacartaException
+		throws LCFException
 	{
 		return dbInterface.performQuery(query,params,cacheKeys,queryClass);
 	}
@@ -238,7 +238,7 @@
 	* signalRollback() method, and rethrow the exception.  Then, after that a finally{} block which calls endTransaction().
 	*/
 	protected void beginTransaction()
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.beginTransaction();
 	}
@@ -254,7 +254,7 @@
 	* signalRollback() was called within the transaction).
 	*/
 	protected void endTransaction()
-		throws MetacartaException
+		throws LCFException
 	{
 		dbInterface.endTransaction();
 	}

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/database/ConnectionFactory.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/database/ConnectionFactory.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/database/ConnectionFactory.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/database/ConnectionFactory.java Wed Feb 17 15:57:27 2010
@@ -20,7 +20,7 @@
 
 import org.apache.lcf.core.interfaces.*;
 import org.apache.lcf.core.system.Logging;
-import org.apache.lcf.core.system.Metacarta;
+import org.apache.lcf.core.system.LCF;
 
 import java.util.*;
 import java.sql.*;
@@ -53,7 +53,7 @@
 	}
 
 	public static Connection getConnection(String database, String userName, String password)
-		throws MetacartaException
+		throws LCFException
 	{
 		String dburl = _url + database;
 		if (database.length() == 0)
@@ -74,11 +74,11 @@
 			}
 			if (cp == null)
 			{
-				String handleMax = Metacarta.getProperty(Metacarta.databaseHandleMaxcountProperty);
+				String handleMax = LCF.getProperty(LCF.databaseHandleMaxcountProperty);
 				int maxDBConnections = defaultMaxDBConnections;
 				if (handleMax != null && handleMax.length() > 0)
 					maxDBConnections = Integer.parseInt(handleMax);
-				String timeoutValueString = Metacarta.getProperty(Metacarta.databaseHandleTimeoutProperty);
+				String timeoutValueString = LCF.getProperty(LCF.databaseHandleTimeoutProperty);
 				int timeoutValue = defaultTimeoutValue;
 				if (timeoutValueString != null && timeoutValueString.length() > 0)
 					timeoutValue = Integer.parseInt(timeoutValueString);
@@ -108,12 +108,12 @@
 		}
 		catch (Exception e)
 		{
-			throw new MetacartaException("Error getting connection",e,MetacartaException.DATABASE_ERROR);
+			throw new LCFException("Error getting connection",e,LCFException.DATABASE_ERROR);
 		}
 	}
 
 	public static void releaseConnection(Connection c)
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -125,7 +125,7 @@
 		}
 		catch (Exception e)
 		{
-			throw new MetacartaException("Error releasing connection",e,MetacartaException.DATABASE_ERROR);
+			throw new LCFException("Error releasing connection",e,LCFException.DATABASE_ERROR);
 		}
 	}
 
@@ -161,11 +161,11 @@
 			try
 			{
 				// Ten seconds is a long time
-				Metacarta.sleep(10000L);
+				LCF.sleep(10000L);
 			}
 			catch (InterruptedException e)
 			{
-				throw new MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",LCFException.INTERRUPTED);
 			}
 		}
 
@@ -202,7 +202,7 @@
 		}
 
 		public ConnectionPoolManager ensurePoolExists()
-			throws MetacartaException
+			throws LCFException
 		{
 			synchronized (poolExistenceLock)
 			{
@@ -214,11 +214,11 @@
 				}
 				catch (Exception e)
 				{
-					throw new MetacartaException("Unable to load database driver: "+e.getMessage(),e,MetacartaException.SETUP_ERROR);
+					throw new LCFException("Unable to load database driver: "+e.getMessage(),e,LCFException.SETUP_ERROR);
 				}
 				try
 				{
-					String handleMax = Metacarta.getProperty(Metacarta.databaseHandleMaxcountProperty);
+					String handleMax = LCF.getProperty(LCF.databaseHandleMaxcountProperty);
 					int maxDBConnections = defaultMaxDBConnections;
 					if (handleMax != null && handleMax.length() > 0)
 						maxDBConnections = Integer.parseInt(handleMax);
@@ -227,7 +227,7 @@
 				}
 				catch (Exception e)
 				{
-					throw new MetacartaException("Unable to initialize database handle pool: "+e.getMessage(),e,MetacartaException.SETUP_ERROR);
+					throw new LCFException("Unable to initialize database handle pool: "+e.getMessage(),e,LCFException.SETUP_ERROR);
 				}
 			}
 		}
@@ -296,7 +296,7 @@
 				{
 					try
 					{
-						Metacarta.sleep(1000L);
+						LCF.sleep(1000L);
 						k++;
 						continue;
 					}



Mime
View raw message