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 2010/08/23 20:08:42 UTC

svn commit: r988237 [12/24] - in /incubator/lcf/trunk: modules/connectors/activedirectory/connector/org/apache/acf/authorities/authorities/activedirectory/ modules/connectors/documentum/connector/org/apache/acf/crawler/authorities/DCTM/ modules/connect...

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/connector/BaseConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/connector/BaseConnector.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/connector/BaseConnector.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/connector/BaseConnector.java Mon Aug 23 18:08:32 2010
@@ -40,7 +40,7 @@ public abstract class BaseConnector impl
   *@param threadContext is the current thread context.
   */
   public void install(IThreadContext threadContext)
-    throws LCFException
+    throws ACFException
   {
     // Base install does nothing
   }
@@ -51,7 +51,7 @@ public abstract class BaseConnector impl
   *@param threadContext is the current thread context.
   */
   public void deinstall(IThreadContext threadContext)
-    throws LCFException
+    throws ACFException
   {
     // Base uninstall does nothing
   }
@@ -71,7 +71,7 @@ public abstract class BaseConnector impl
   *@return the connection's status as a displayable string.
   */
   public String check()
-    throws LCFException
+    throws ACFException
   {
     // Base version returns "OK" status.
     return "Connection working";
@@ -81,7 +81,7 @@ public abstract class BaseConnector impl
   * in active use.
   */
   public void poll()
-    throws LCFException
+    throws ACFException
   {
     // Base version does nothing
   }
@@ -89,7 +89,7 @@ public abstract class BaseConnector impl
   /** Close the connection.  Call this before discarding the repository connector.
   */
   public void disconnect()
-    throws LCFException
+    throws ACFException
   {
     params = null;
   }
@@ -127,7 +127,7 @@ public abstract class BaseConnector impl
   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific to the connector.
   */
   public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, ArrayList tabsArray)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
   }
   
@@ -141,7 +141,7 @@ public abstract class BaseConnector impl
   *@param tabName is the current tab name.
   */
   public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, String tabName)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
   }
   
@@ -155,7 +155,7 @@ public abstract class BaseConnector impl
   *@return null if all is well, or a string error message if there is an error that should prevent saving of the connection (and cause a redirection to an error page).
   */
   public String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext, ConfigParams parameters)
-    throws LCFException
+    throws ACFException
   {
     return null;
   }
@@ -168,7 +168,7 @@ public abstract class BaseConnector impl
   *@param parameters are the configuration parameters, as they currently exist, for this connection being configured.
   */
   public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters)
-    throws LCFException, IOException
+    throws ACFException, IOException
   {
   }
 

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

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/ConnectionFactory.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/ConnectionFactory.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/ConnectionFactory.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/ConnectionFactory.java Mon Aug 23 18:08:32 2010
@@ -20,7 +20,7 @@ package org.apache.acf.core.database;
 
 import org.apache.acf.core.interfaces.*;
 import org.apache.acf.core.system.Logging;
-import org.apache.acf.core.system.LCF;
+import org.apache.acf.core.system.ACF;
 
 import java.util.*;
 import java.sql.*;
@@ -49,7 +49,7 @@ public class ConnectionFactory
   }
 
   public static Connection getConnection(String jdbcUrl, String jdbcDriver, String database, String userName, String password)
-    throws LCFException
+    throws ACFException
   {
 
     ConnectionPoolManager _pool = poolManager.ensurePoolExists(jdbcDriver);
@@ -67,11 +67,11 @@ public class ConnectionFactory
       }
       if (cp == null)
       {
-        String handleMax = LCF.getProperty(LCF.databaseHandleMaxcountProperty);
+        String handleMax = ACF.getProperty(ACF.databaseHandleMaxcountProperty);
         int maxDBConnections = defaultMaxDBConnections;
         if (handleMax != null && handleMax.length() > 0)
           maxDBConnections = Integer.parseInt(handleMax);
-        String timeoutValueString = LCF.getProperty(LCF.databaseHandleTimeoutProperty);
+        String timeoutValueString = ACF.getProperty(ACF.databaseHandleTimeoutProperty);
         int timeoutValue = defaultTimeoutValue;
         if (timeoutValueString != null && timeoutValueString.length() > 0)
           timeoutValue = Integer.parseInt(timeoutValueString);
@@ -101,12 +101,12 @@ public class ConnectionFactory
     }
     catch (Exception e)
     {
-      throw new LCFException("Error getting connection",e,LCFException.DATABASE_ERROR);
+      throw new ACFException("Error getting connection",e,ACFException.DATABASE_ERROR);
     }
   }
 
   public static void releaseConnection(Connection c)
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -118,7 +118,7 @@ public class ConnectionFactory
     }
     catch (Exception e)
     {
-      throw new LCFException("Error releasing connection",e,LCFException.DATABASE_ERROR);
+      throw new ACFException("Error releasing connection",e,ACFException.DATABASE_ERROR);
     }
   }
 
@@ -154,11 +154,11 @@ public class ConnectionFactory
       try
       {
         // Ten seconds is a long time
-        LCF.sleep(10000L);
+        ACF.sleep(10000L);
       }
       catch (InterruptedException e)
       {
-        throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+        throw new ACFException("Interrupted",ACFException.INTERRUPTED);
       }
     }
 
@@ -195,7 +195,7 @@ public class ConnectionFactory
     }
 
     public ConnectionPoolManager ensurePoolExists(String jdbcDriver)
-      throws LCFException
+      throws ACFException
     {
       synchronized (poolExistenceLock)
       {
@@ -207,11 +207,11 @@ public class ConnectionFactory
         }
         catch (Exception e)
         {
-          throw new LCFException("Unable to load database driver: "+e.getMessage(),e,LCFException.SETUP_ERROR);
+          throw new ACFException("Unable to load database driver: "+e.getMessage(),e,ACFException.SETUP_ERROR);
         }
         try
         {
-          String handleMax = LCF.getProperty(LCF.databaseHandleMaxcountProperty);
+          String handleMax = ACF.getProperty(ACF.databaseHandleMaxcountProperty);
           int maxDBConnections = defaultMaxDBConnections;
           if (handleMax != null && handleMax.length() > 0)
             maxDBConnections = Integer.parseInt(handleMax);
@@ -220,7 +220,7 @@ public class ConnectionFactory
         }
         catch (Exception e)
         {
-          throw new LCFException("Unable to initialize database handle pool: "+e.getMessage(),e,LCFException.SETUP_ERROR);
+          throw new ACFException("Unable to initialize database handle pool: "+e.getMessage(),e,ACFException.SETUP_ERROR);
         }
       }
     }
@@ -289,7 +289,7 @@ public class ConnectionFactory
         {
           try
           {
-            LCF.sleep(1000L);
+            ACF.sleep(1000L);
             k++;
             continue;
           }

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/DBInterfaceDerby.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/DBInterfaceDerby.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/DBInterfaceDerby.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/DBInterfaceDerby.java Mon Aug 23 18:08:32 2010
@@ -19,7 +19,7 @@
 package org.apache.acf.core.database;
 
 import org.apache.acf.core.interfaces.*;
-import org.apache.acf.core.system.LCF;
+import org.apache.acf.core.system.ACF;
 import org.apache.acf.core.system.Logging;
 import java.util.*;
 import java.io.*;
@@ -44,11 +44,11 @@ public class DBInterfaceDerby extends Da
   protected int serializableDepth = 0;
 
   protected static String getFullDatabasePath(String databaseName)
-    throws LCFException
+    throws ACFException
   {
-    File path = LCF.getFileProperty(databasePathProperty);
+    File path = ACF.getFileProperty(databasePathProperty);
     if (path == null)
-      throw new LCFException("Derby database requires '"+databasePathProperty+"' property, containing a relative path");
+      throw new ACFException("Derby database requires '"+databasePathProperty+"' property, containing a relative path");
     String pathString = path.toString().replace("\\\\","/");
     if (!pathString.endsWith("/"))
       pathString = pathString + "/";
@@ -56,7 +56,7 @@ public class DBInterfaceDerby extends Da
   }
   
   public DBInterfaceDerby(IThreadContext tc, String databaseName, String userName, String password)
-    throws LCFException
+    throws ACFException
   {
     super(tc,_url+getFullDatabasePath(databaseName)+";user="+userName+";password="+password,_driver,getFullDatabasePath(databaseName),userName,password);
     cacheKey = CacheKeyFactory.makeDatabaseKey(this.databaseName);
@@ -68,7 +68,7 @@ public class DBInterfaceDerby extends Da
   * database communication.
   */
   public void openDatabase()
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -78,7 +78,7 @@ public class DBInterfaceDerby extends Da
     }
     catch (Exception e)
     {
-      throw new LCFException(e.getMessage(),e,LCFException.SETUP_ERROR);
+      throw new ACFException(e.getMessage(),e,ACFException.SETUP_ERROR);
     }
   }
   
@@ -86,7 +86,7 @@ public class DBInterfaceDerby extends Da
   * all database communication.
   */
   public void closeDatabase()
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -95,7 +95,7 @@ public class DBInterfaceDerby extends Da
     }
     catch (Exception e)
     {
-      throw new LCFException(e.getMessage(),e);
+      throw new ACFException(e.getMessage(),e);
     }
 
     // For the shutdown itself, eat the exception
@@ -121,7 +121,7 @@ public class DBInterfaceDerby extends Da
   *@param tableName is the name of the table.
   */
   public void performLock(String tableName)
-    throws LCFException
+    throws ACFException
   {
     performModification("LOCK TABLE "+tableName+" IN EXCLUSIVE MODE",null,null);
   }
@@ -133,7 +133,7 @@ public class DBInterfaceDerby extends Da
   *@param parameterMap is the map of column name/values to write.
   */
   public void performInsert(String tableName, Map parameterMap, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     ArrayList paramArray = new ArrayList();
 
@@ -186,7 +186,7 @@ public class DBInterfaceDerby extends Da
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
   public void performUpdate(String tableName, Map parameterMap, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     ArrayList paramArray = new ArrayList();
 
@@ -251,7 +251,7 @@ public class DBInterfaceDerby extends Da
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
   public void performDelete(String tableName, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     StringBuffer bf = new StringBuffer();
     bf.append("DELETE FROM ");
@@ -277,7 +277,7 @@ public class DBInterfaceDerby extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void performCreate(String tableName, Map columnMap, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     int constraintNumber = 0;
     StringBuffer queryBuffer = new StringBuffer("CREATE TABLE ");
@@ -302,7 +302,7 @@ public class DBInterfaceDerby extends Da
   }
 
   protected void appendDescription(StringBuffer queryBuffer, String columnName, ColumnDescription cd, boolean forceNull)
-    throws LCFException
+    throws ACFException
   {
     queryBuffer.append(columnName);
     queryBuffer.append(' ');
@@ -341,7 +341,7 @@ public class DBInterfaceDerby extends Da
   */
   public void performAlter(String tableName, Map columnMap, Map columnModifyMap, ArrayList columnDeleteList,
     StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     beginTransaction(TRANSACTION_ENCLOSING);
     try
@@ -395,7 +395,7 @@ public class DBInterfaceDerby extends Da
         }
       }
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       signalRollback();
       throw e;
@@ -431,7 +431,7 @@ public class DBInterfaceDerby extends Da
   * in the index, in order.
   */
   public void addTableIndex(String tableName, boolean unique, ArrayList columnList)
-    throws LCFException
+    throws ACFException
   {
     String[] columns = new String[columnList.size()];
     int i = 0;
@@ -449,7 +449,7 @@ public class DBInterfaceDerby extends Da
   *@param description is the index description.
   */
   public void performAddIndex(String indexName, String tableName, IndexDescription description)
-    throws LCFException
+    throws ACFException
   {
     String[] columnNames = description.getColumnNames();
     if (columnNames.length == 0)
@@ -484,7 +484,7 @@ public class DBInterfaceDerby extends Da
   *@param indexName is the name of the index to remove.
   */
   public void performRemoveIndex(String indexName)
-    throws LCFException
+    throws ACFException
   {
     performModification("DROP INDEX "+indexName,null,null);
   }
@@ -493,7 +493,7 @@ public class DBInterfaceDerby extends Da
   *@param tableName is the name of the table to analyze/calculate statistics for.
   */
   public void analyzeTable(String tableName)
-    throws LCFException
+    throws ACFException
   {
     // Does nothing on Derby
   }
@@ -502,7 +502,7 @@ public class DBInterfaceDerby extends Da
   *@param tableName is the name of the table to rebuild indexes for.
   */
   public void reindexTable(String tableName)
-    throws LCFException
+    throws ACFException
   {
     // Does nothing on Derby
   }
@@ -512,7 +512,7 @@ public class DBInterfaceDerby extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void performDrop(String tableName, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     performModification("DROP TABLE "+tableName,null,invalidateKeys);
   }
@@ -523,7 +523,7 @@ public class DBInterfaceDerby extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void createUserAndDatabase(String adminUserName, String adminPassword, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     Database rootDatabase = new Database(context,_url+databaseName,_driver,databaseName,"","");
     IResultSet set = rootDatabase.executeQuery("VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.user."+userName+"')",null,null,null,null,true,-1,null,null);
@@ -540,7 +540,7 @@ public class DBInterfaceDerby extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void dropUserAndDatabase(String adminUserName, String adminPassword, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     File f = new File(databaseName);
     if (f.exists())
@@ -578,11 +578,11 @@ public class DBInterfaceDerby extends Da
   *@param theException is the exception to reinterpret
   *@return the reinterpreted exception to throw.
   */
-  protected LCFException reinterpretException(LCFException theException)
+  protected ACFException reinterpretException(ACFException theException)
   {
     if (Logging.db.isDebugEnabled())
       Logging.db.debug("Reinterpreting exception '"+theException.getMessage()+"'.  The exception type is "+Integer.toString(theException.getErrorCode()));
-    if (theException.getErrorCode() != LCFException.DATABASE_CONNECTION_ERROR)
+    if (theException.getErrorCode() != ACFException.DATABASE_CONNECTION_ERROR)
       return theException;
     Throwable e = theException.getCause();
     if (!(e instanceof java.sql.SQLException))
@@ -596,10 +596,10 @@ public class DBInterfaceDerby extends Da
     // insert the same row.  (Everything only works, then, as long as there is a unique constraint corresponding to every bad insert that
     // one could make.)
     if (sqlState != null && sqlState.equals("23505"))
-      return new LCFException(message,e,LCFException.DATABASE_TRANSACTION_ABORT);
+      return new ACFException(message,e,ACFException.DATABASE_TRANSACTION_ABORT);
     // Deadlock also aborts.
     if (sqlState != null && sqlState.equals("40001"))
-      return new LCFException(message,e,LCFException.DATABASE_TRANSACTION_ABORT);
+      return new ACFException(message,e,ACFException.DATABASE_TRANSACTION_ABORT);
     if (Logging.db.isDebugEnabled())
       Logging.db.debug("Exception "+theException.getMessage()+" is NOT a transaction abort signal");
     return theException;
@@ -611,13 +611,13 @@ public class DBInterfaceDerby extends Da
   *@param invalidateKeys are the cache keys to invalidate.
   */
   public void performModification(String query, ArrayList params, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     try
     {
       executeQuery(query,params,null,invalidateKeys,null,false,0,null,null);
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       throw reinterpretException(e);
     }
@@ -631,7 +631,7 @@ public class DBInterfaceDerby extends Da
   * table doesn't exist.
   */
   public Map getTableSchema(String tableName, StringSet cacheKeys, String queryClass)
-    throws LCFException
+    throws ACFException
   {
     String query = "SELECT CAST(t0.columnname AS VARCHAR(128)) AS columnname,CAST(t0.columndatatype AS VARCHAR(128)) AS columndatatype FROM sys.syscolumns t0, sys.systables t1 WHERE t0.referenceid=t1.tableid AND CAST(t1.tablename AS VARCHAR(128))=? ORDER BY t0.columnnumber ASC";
     ArrayList list = new ArrayList();
@@ -663,7 +663,7 @@ public class DBInterfaceDerby extends Da
   *@return a map of index names and IndexDescription objects, describing the indexes.
   */
   public Map getTableIndexes(String tableName, StringSet cacheKeys, String queryClass)
-    throws LCFException
+    throws ACFException
   {
     Map rval = new HashMap();
 
@@ -695,7 +695,7 @@ public class DBInterfaceDerby extends Da
   *@return the set of tables.
   */
   public StringSet getAllTables(StringSet cacheKeys, String queryClass)
-    throws LCFException
+    throws ACFException
   {
     IResultSet set = performQuery("SELECT CAST(tablename AS VARCHAR(128)) FROM sys.systables WHERE table_type='T'",null,cacheKeys,queryClass);
     StringSetBuffer ssb = new StringSetBuffer();
@@ -720,13 +720,13 @@ public class DBInterfaceDerby extends Da
   *@return a resultset.
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass)
-    throws LCFException
+    throws ACFException
   {
     try
     {
       return executeQuery(query,params,cacheKeys,null,queryClass,true,-1,null,null);
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       throw reinterpretException(e);
     }
@@ -744,13 +744,13 @@ public class DBInterfaceDerby extends Da
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
     int maxResults, ILimitChecker returnLimit)
-    throws LCFException
+    throws ACFException
   {
     try
     {
       return executeQuery(query,params,cacheKeys,null,queryClass,true,maxResults,null,returnLimit);
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       throw reinterpretException(e);
     }
@@ -769,13 +769,13 @@ public class DBInterfaceDerby extends Da
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
     int maxResults, ResultSpecification resultSpec, ILimitChecker returnLimit)
-    throws LCFException
+    throws ACFException
   {
     try
     {
       return executeQuery(query,params,cacheKeys,null,queryClass,true,maxResults,resultSpec,returnLimit);
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       throw reinterpretException(e);
     }
@@ -868,7 +868,7 @@ public class DBInterfaceDerby extends Da
   * signalRollback() method, and rethrow the exception.  Then, after that a finally{} block which calls endTransaction().
   */
   public void beginTransaction()
-    throws LCFException
+    throws ACFException
   {
     beginTransaction(TRANSACTION_ENCLOSING);
   }
@@ -883,7 +883,7 @@ public class DBInterfaceDerby extends Da
   *@param transactionType is the kind of transaction desired.
   */
   public void beginTransaction(int transactionType)
-    throws LCFException
+    throws ACFException
   {
     if (getCurrentTransactionType() == TRANSACTION_SERIALIZED)
     {
@@ -909,7 +909,7 @@ public class DBInterfaceDerby extends Da
         super.endTransaction();
         throw e;
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
         super.signalRollback();
         super.endTransaction();
@@ -928,7 +928,7 @@ public class DBInterfaceDerby extends Da
         super.endTransaction();
         throw e;
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
         super.signalRollback();
         super.endTransaction();
@@ -937,7 +937,7 @@ public class DBInterfaceDerby extends Da
       super.beginTransaction(TRANSACTION_SERIALIZED);
       break;
     default:
-      throw new LCFException("Bad transaction type");
+      throw new ACFException("Bad transaction type");
     }
   }
 
@@ -953,7 +953,7 @@ public class DBInterfaceDerby extends Da
   * signalRollback() was called within the transaction).
   */
   public void endTransaction()
-    throws LCFException
+    throws ACFException
   {
     if (serializableDepth > 0)
     {
@@ -969,7 +969,7 @@ public class DBInterfaceDerby extends Da
   
   /** Abstract method to start a transaction */
   protected void startATransaction()
-    throws LCFException
+    throws ACFException
   {
     if (!inTransaction)
     {
@@ -979,7 +979,7 @@ public class DBInterfaceDerby extends Da
       }
       catch (java.sql.SQLException e)
       {
-        throw new LCFException(e.getMessage(),e);
+        throw new ACFException(e.getMessage(),e);
       }
       inTransaction = true;
     }
@@ -988,7 +988,7 @@ public class DBInterfaceDerby extends Da
 
   /** Abstract method to commit a transaction */
   protected void commitCurrentTransaction()
-    throws LCFException
+    throws ACFException
   {
     if (inTransaction)
     {
@@ -1005,18 +1005,18 @@ public class DBInterfaceDerby extends Da
         }
         catch (java.sql.SQLException e)
         {
-          throw new LCFException(e.getMessage(),e);
+          throw new ACFException(e.getMessage(),e);
         }
         inTransaction = false;
       }
     }
     else
-      throw new LCFException("Transaction nesting error!");
+      throw new ACFException("Transaction nesting error!");
   }
   
   /** Abstract method to roll back a transaction */
   protected void rollbackCurrentTransaction()
-    throws LCFException
+    throws ACFException
   {
     if (inTransaction)
     {
@@ -1033,13 +1033,13 @@ public class DBInterfaceDerby extends Da
         }
         catch (java.sql.SQLException e)
         {
-          throw new LCFException(e.getMessage(),e);
+          throw new ACFException(e.getMessage(),e);
         }
         inTransaction = false;
       }
     }
     else
-      throw new LCFException("Transaction nesting error!");
+      throw new ACFException("Transaction nesting error!");
   }
 
   /** Abstract method for mapping a column name from resultset */

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/DBInterfaceMySQL.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/DBInterfaceMySQL.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/DBInterfaceMySQL.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/DBInterfaceMySQL.java Mon Aug 23 18:08:32 2010
@@ -32,7 +32,7 @@ public class DBInterfaceMySQL extends Da
   protected String cacheKey;
 
   public DBInterfaceMySQL(IThreadContext tc, String databaseName, String userName, String password)
-    throws LCFException
+    throws ACFException
   {
     super(tc,_url+databaseName,_driver,databaseName,userName,password);
     cacheKey = CacheKeyFactory.makeDatabaseKey(this.databaseName);
@@ -42,7 +42,7 @@ public class DBInterfaceMySQL extends Da
   * database communication.
   */
   public void openDatabase()
-    throws LCFException
+    throws ACFException
   {
     // Nothing to do.
   }
@@ -51,7 +51,7 @@ public class DBInterfaceMySQL extends Da
   * all database communication.
   */
   public void closeDatabase()
-    throws LCFException
+    throws ACFException
   {
     // Nothing to do.
   }
@@ -68,7 +68,7 @@ public class DBInterfaceMySQL extends Da
   *@param tableName is the name of the table.
   */
   public void performLock(String tableName)
-    throws LCFException
+    throws ACFException
   {
     performModification("LOCK TABLE "+tableName+" IN EXCLUSIVE MODE",null,null);
   }
@@ -80,7 +80,7 @@ public class DBInterfaceMySQL extends Da
   *@param parameterMap is the map of column name/values to write.
   */
   public void performInsert(String tableName, Map parameterMap, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     ArrayList paramArray = new ArrayList();
 
@@ -133,7 +133,7 @@ public class DBInterfaceMySQL extends Da
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
   public void performUpdate(String tableName, Map parameterMap, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     ArrayList paramArray = new ArrayList();
 
@@ -198,7 +198,7 @@ public class DBInterfaceMySQL extends Da
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
   public void performDelete(String tableName, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     StringBuffer bf = new StringBuffer();
     bf.append("DELETE FROM ");
@@ -224,7 +224,7 @@ public class DBInterfaceMySQL extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void performCreate(String tableName, Map columnMap, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     StringBuffer queryBuffer = new StringBuffer("CREATE TABLE ");
     queryBuffer.append(tableName);
@@ -279,7 +279,7 @@ public class DBInterfaceMySQL extends Da
   */
   public void performAlter(String tableName, Map columnMap, Map columnModifyMap, ArrayList columnDeleteList,
     StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     // MHL
   }
@@ -291,7 +291,7 @@ public class DBInterfaceMySQL extends Da
   * in the index, in order.
   */
   public void addTableIndex(String tableName, boolean unique, ArrayList columnList)
-    throws LCFException
+    throws ACFException
   {
     String[] columns = new String[columnList.size()];
     int i = 0;
@@ -309,7 +309,7 @@ public class DBInterfaceMySQL extends Da
   *@param description is the index description.
   */
   public void performAddIndex(String indexName, String tableName, IndexDescription description)
-    throws LCFException
+    throws ACFException
   {
     String[] columnNames = description.getColumnNames();
     if (columnNames.length == 0)
@@ -344,7 +344,7 @@ public class DBInterfaceMySQL extends Da
   *@param indexName is the name of the index to remove.
   */
   public void performRemoveIndex(String indexName)
-    throws LCFException
+    throws ACFException
   {
     performModification("DROP INDEX "+indexName,null,null);
   }
@@ -353,7 +353,7 @@ public class DBInterfaceMySQL extends Da
   *@param tableName is the name of the table to analyze/calculate statistics for.
   */
   public void analyzeTable(String tableName)
-    throws LCFException
+    throws ACFException
   {
     // Does nothing
   }
@@ -362,7 +362,7 @@ public class DBInterfaceMySQL extends Da
   *@param tableName is the name of the table to rebuild indexes for.
   */
   public void reindexTable(String tableName)
-    throws LCFException
+    throws ACFException
   {
     // Does nothing
   }
@@ -372,7 +372,7 @@ public class DBInterfaceMySQL extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void performDrop(String tableName, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     performModification("DROP TABLE "+tableName,null,invalidateKeys);
   }
@@ -383,7 +383,7 @@ public class DBInterfaceMySQL extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void createUserAndDatabase(String adminUserName, String adminPassword, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     // Connect to super database
     Database masterDatabase = new Database(context,_url+"mysql",_driver,"mysql",adminUserName,adminPassword);
@@ -404,7 +404,7 @@ public class DBInterfaceMySQL extends Da
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void dropUserAndDatabase(String adminUserName, String adminPassword, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     // Connect to super database
     Database masterDatabase = new Database(context,_url+"mysql",_driver,"mysql",adminUserName,adminPassword);
@@ -417,7 +417,7 @@ public class DBInterfaceMySQL extends Da
   *@param invalidateKeys are the cache keys to invalidate.
   */
   public void performModification(String query, ArrayList params, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     executeQuery(query,params,null,invalidateKeys,null,false,0,null,null);
   }
@@ -429,7 +429,7 @@ public class DBInterfaceMySQL extends Da
   *@return a map of column names and ColumnDescription objects, describing the schema.
   */
   public Map getTableSchema(String tableName, StringSet cacheKeys, String queryClass)
-    throws LCFException
+    throws ACFException
   {
     IResultSet set = performQuery("DESCRIBE "+tableName,null,cacheKeys,queryClass);
     // Digest the result
@@ -455,7 +455,7 @@ public class DBInterfaceMySQL extends Da
   *@return a map of index names and IndexDescription objects, describing the indexes.
   */
   public Map getTableIndexes(String tableName, StringSet cacheKeys, String queryClass)
-    throws LCFException
+    throws ACFException
   {
     // MHL
     return null;
@@ -467,7 +467,7 @@ public class DBInterfaceMySQL extends Da
   *@return the set of tables.
   */
   public StringSet getAllTables(StringSet cacheKeys, String queryClass)
-    throws LCFException
+    throws ACFException
   {
     IResultSet set = performQuery("SHOW TABLES",null,cacheKeys,queryClass);
     StringSetBuffer ssb = new StringSetBuffer();
@@ -496,7 +496,7 @@ public class DBInterfaceMySQL extends Da
   *@return a resultset.
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass)
-    throws LCFException
+    throws ACFException
   {
     return executeQuery(query,params,cacheKeys,null,queryClass,true,-1,null,null);
   }
@@ -513,7 +513,7 @@ public class DBInterfaceMySQL extends Da
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
     int maxResults, ILimitChecker returnLimit)
-    throws LCFException
+    throws ACFException
   {
     return executeQuery(query,params,cacheKeys,null,queryClass,true,maxResults,null,returnLimit);
   }
@@ -531,7 +531,7 @@ public class DBInterfaceMySQL extends Da
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
     int maxResults, ResultSpecification resultSpec, ILimitChecker returnLimit)
-    throws LCFException
+    throws ACFException
   {
     return executeQuery(query,params,cacheKeys,null,queryClass,true,maxResults,resultSpec,returnLimit);
   }
@@ -623,7 +623,7 @@ public class DBInterfaceMySQL extends Da
   * signalRollback() method, and rethrow the exception.  Then, after that a finally{} block which calls endTransaction().
   */
   public void beginTransaction()
-    throws LCFException
+    throws ACFException
   {
     super.beginTransaction(TRANSACTION_READCOMMITTED);
   }
@@ -638,28 +638,28 @@ public class DBInterfaceMySQL extends Da
   *@param transactionType is the kind of transaction desired.
   */
   public void beginTransaction(int transactionType)
-    throws LCFException
+    throws ACFException
   {
     super.beginTransaction(TRANSACTION_READCOMMITTED);
   }
 
   /** Abstract method to start a transaction */
   protected void startATransaction()
-    throws LCFException
+    throws ACFException
   {
     executeViaThread(connection,"START TRANSACTION",null,false,0,null,null);
   }
 
   /** Abstract method to commit a transaction */
   protected void commitCurrentTransaction()
-    throws LCFException
+    throws ACFException
   {
     executeViaThread(connection,"COMMIT",null,false,0,null,null);
   }
   
   /** Abstract method to roll back a transaction */
   protected void rollbackCurrentTransaction()
-    throws LCFException
+    throws ACFException
   {
     executeViaThread(connection,"ROLLBACK",null,false,0,null,null);
   }

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/DBInterfacePostgreSQL.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/DBInterfacePostgreSQL.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/DBInterfacePostgreSQL.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/DBInterfacePostgreSQL.java Mon Aug 23 18:08:32 2010
@@ -41,7 +41,7 @@ public class DBInterfacePostgreSQL exten
   protected ArrayList tablesToReindex = new ArrayList();
 
   public DBInterfacePostgreSQL(IThreadContext tc, String databaseName, String userName, String password)
-    throws LCFException
+    throws ACFException
   {
     super(tc,_url+databaseName,_driver,databaseName,userName,password);
     cacheKey = CacheKeyFactory.makeDatabaseKey(this.databaseName);
@@ -51,7 +51,7 @@ public class DBInterfacePostgreSQL exten
   * database communication.
   */
   public void openDatabase()
-    throws LCFException
+    throws ACFException
   {
     // Nothing to do
   }
@@ -60,7 +60,7 @@ public class DBInterfacePostgreSQL exten
   * all database communication.
   */
   public void closeDatabase()
-    throws LCFException
+    throws ACFException
   {
     // Nothing to do
   }
@@ -77,7 +77,7 @@ public class DBInterfacePostgreSQL exten
   *@param tableName is the name of the table.
   */
   public void performLock(String tableName)
-    throws LCFException
+    throws ACFException
   {
     performModification("LOCK TABLE "+tableName+" IN EXCLUSIVE MODE",null,null);
   }
@@ -89,7 +89,7 @@ public class DBInterfacePostgreSQL exten
   *@param parameterMap is the map of column name/values to write.
   */
   public void performInsert(String tableName, Map parameterMap, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     ArrayList paramArray = new ArrayList();
 
@@ -142,7 +142,7 @@ public class DBInterfacePostgreSQL exten
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
   public void performUpdate(String tableName, Map parameterMap, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     ArrayList paramArray = new ArrayList();
 
@@ -207,7 +207,7 @@ public class DBInterfacePostgreSQL exten
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
   public void performDelete(String tableName, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     StringBuffer bf = new StringBuffer();
     bf.append("DELETE FROM ");
@@ -233,7 +233,7 @@ public class DBInterfacePostgreSQL exten
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void performCreate(String tableName, Map columnMap, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     StringBuffer queryBuffer = new StringBuffer("CREATE TABLE ");
     queryBuffer.append(tableName);
@@ -293,7 +293,7 @@ public class DBInterfacePostgreSQL exten
   */
   public void performAlter(String tableName, Map columnMap, Map columnModifyMap, ArrayList columnDeleteList,
     StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     beginTransaction(TRANSACTION_ENCLOSING);
     try
@@ -347,7 +347,7 @@ public class DBInterfacePostgreSQL exten
         }
       }
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       signalRollback();
       throw e;
@@ -385,7 +385,7 @@ public class DBInterfacePostgreSQL exten
   * in the index, in order.
   */
   public void addTableIndex(String tableName, boolean unique, ArrayList columnList)
-    throws LCFException
+    throws ACFException
   {
     String[] columns = new String[columnList.size()];
     int i = 0;
@@ -403,7 +403,7 @@ public class DBInterfacePostgreSQL exten
   *@param description is the index description.
   */
   public void performAddIndex(String indexName, String tableName, IndexDescription description)
-    throws LCFException
+    throws ACFException
   {
     String[] columnNames = description.getColumnNames();
     if (columnNames.length == 0)
@@ -438,7 +438,7 @@ public class DBInterfacePostgreSQL exten
   *@param indexName is the name of the index to remove.
   */
   public void performRemoveIndex(String indexName)
-    throws LCFException
+    throws ACFException
   {
     performModification("DROP INDEX "+indexName,null,null);
   }
@@ -447,7 +447,7 @@ public class DBInterfacePostgreSQL exten
   *@param tableName is the name of the table to analyze/calculate statistics for.
   */
   public void analyzeTable(String tableName)
-    throws LCFException
+    throws ACFException
   {
     if (getTransactionID() == null)
       performModification("ANALYZE "+tableName,null,null);
@@ -459,7 +459,7 @@ public class DBInterfacePostgreSQL exten
   *@param tableName is the name of the table to rebuild indexes for.
   */
   public void reindexTable(String tableName)
-    throws LCFException
+    throws ACFException
   {
     if (getTransactionID() == null)
       performModification("REINDEX TABLE "+tableName,null,null);
@@ -472,7 +472,7 @@ public class DBInterfacePostgreSQL exten
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void performDrop(String tableName, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     performModification("DROP TABLE "+tableName,null,invalidateKeys);
   }
@@ -483,7 +483,7 @@ public class DBInterfacePostgreSQL exten
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void createUserAndDatabase(String adminUserName, String adminPassword, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     // Create a connection to the master database, using the credentials supplied
     Database masterDatabase = new Database(context,_url+"template1",_driver,"template1",adminUserName,adminPassword);
@@ -509,7 +509,7 @@ public class DBInterfacePostgreSQL exten
 	  userName+" ENCODING="+quoteSQLString("utf8"),null,null,invalidateKeys,null,false,0,null,null);
       }
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       throw reinterpretException(e);
     }
@@ -521,7 +521,7 @@ public class DBInterfacePostgreSQL exten
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
   public void dropUserAndDatabase(String adminUserName, String adminPassword, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     // Create a connection to the master database, using the credentials supplied
     Database masterDatabase = new Database(context,_url+"template1",_driver,"template1",adminUserName,adminPassword);
@@ -532,7 +532,7 @@ public class DBInterfacePostgreSQL exten
       // Drop user
       masterDatabase.executeQuery("DROP USER "+userName,null,null,invalidateKeys,null,false,0,null,null);
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       throw reinterpretException(e);
     }
@@ -543,11 +543,11 @@ public class DBInterfacePostgreSQL exten
   *@param theException is the exception to reinterpret
   *@return the reinterpreted exception to throw.
   */
-  protected LCFException reinterpretException(LCFException theException)
+  protected ACFException reinterpretException(ACFException theException)
   {
     if (Logging.db.isDebugEnabled())
       Logging.db.debug("Reinterpreting exception '"+theException.getMessage()+"'.  The exception type is "+Integer.toString(theException.getErrorCode()));
-    if (theException.getErrorCode() != LCFException.DATABASE_CONNECTION_ERROR)
+    if (theException.getErrorCode() != ACFException.DATABASE_CONNECTION_ERROR)
       return theException;
     Throwable e = theException.getCause();
     if (!(e instanceof java.sql.SQLException))
@@ -559,15 +559,15 @@ public class DBInterfacePostgreSQL exten
     String sqlState = sqlException.getSQLState();
     // Could not serialize
     if (sqlState != null && sqlState.equals("40001"))
-      return new LCFException(message,e,LCFException.DATABASE_TRANSACTION_ABORT);
+      return new ACFException(message,e,ACFException.DATABASE_TRANSACTION_ABORT);
     // Deadlock detected
     if (sqlState != null && sqlState.equals("40P01"))
-      return new LCFException(message,e,LCFException.DATABASE_TRANSACTION_ABORT);
+      return new ACFException(message,e,ACFException.DATABASE_TRANSACTION_ABORT);
     // Note well: We also have to treat 'duplicate key' as a transaction abort, since this is what you get when two threads attempt to
     // insert the same row.  (Everything only works, then, as long as there is a unique constraint corresponding to every bad insert that
     // one could make.)
     if (sqlState != null && sqlState.equals("23505"))
-      return new LCFException(message,e,LCFException.DATABASE_TRANSACTION_ABORT);
+      return new ACFException(message,e,ACFException.DATABASE_TRANSACTION_ABORT);
     if (Logging.db.isDebugEnabled())
       Logging.db.debug("Exception "+theException.getMessage()+" is NOT a transaction abort signal");
     return theException;
@@ -579,13 +579,13 @@ public class DBInterfacePostgreSQL exten
   *@param invalidateKeys are the cache keys to invalidate.
   */
   public void performModification(String query, ArrayList params, StringSet invalidateKeys)
-    throws LCFException
+    throws ACFException
   {
     try
     {
       executeQuery(query,params,null,invalidateKeys,null,false,0,null,null);
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       throw reinterpretException(e);
     }
@@ -599,7 +599,7 @@ public class DBInterfacePostgreSQL exten
   * table doesn't exist.
   */
   public Map getTableSchema(String tableName, StringSet cacheKeys, String queryClass)
-    throws LCFException
+    throws ACFException
   {
     StringBuffer query = new StringBuffer();
     query.append("SELECT pg_attribute.attname AS \"Field\",");
@@ -641,7 +641,7 @@ public class DBInterfacePostgreSQL exten
   *@return a map of index names and IndexDescription objects, describing the indexes.
   */
   public Map getTableIndexes(String tableName, StringSet cacheKeys, String queryClass)
-    throws LCFException
+    throws ACFException
   {
     Map rval = new HashMap();
 
@@ -664,7 +664,7 @@ public class DBInterfacePostgreSQL exten
       {
         beforeMatch = indexdef.indexOf("CREATE INDEX ",parsePosition);
         if (beforeMatch == -1)
-          throw new LCFException("Cannot parse index description: '"+indexdef+"'");
+          throw new ACFException("Cannot parse index description: '"+indexdef+"'");
         isUnique = false;
         parsePosition += "CREATE INDEX ".length();
       }
@@ -676,12 +676,12 @@ public class DBInterfacePostgreSQL exten
 
       int afterMatch = indexdef.indexOf(" ON",parsePosition);
       if (afterMatch == -1)
-        throw new LCFException("Cannot parse index description: '"+indexdef+"'");
+        throw new ACFException("Cannot parse index description: '"+indexdef+"'");
       String indexName = indexdef.substring(parsePosition,afterMatch);
       parsePosition = afterMatch + " ON".length();
       int parenPosition = indexdef.indexOf("(",parsePosition);
       if (parenPosition == -1)
-        throw new LCFException("Cannot parse index description: '"+indexdef+"'");
+        throw new ACFException("Cannot parse index description: '"+indexdef+"'");
       parsePosition = parenPosition + 1;
       ArrayList columns = new ArrayList();
       while (true)
@@ -691,7 +691,7 @@ public class DBInterfacePostgreSQL exten
         if (nextIndex == -1)
           nextIndex = nextParenIndex;
         if (nextIndex == -1)
-          throw new LCFException("Cannot parse index description: '"+indexdef+"'");
+          throw new ACFException("Cannot parse index description: '"+indexdef+"'");
         if (nextParenIndex != -1 && nextParenIndex < nextIndex)
           nextIndex = nextParenIndex;
 
@@ -722,7 +722,7 @@ public class DBInterfacePostgreSQL exten
   *@return the set of tables.
   */
   public StringSet getAllTables(StringSet cacheKeys, String queryClass)
-    throws LCFException
+    throws ACFException
   {
     IResultSet set = performQuery("SELECT relname FROM pg_class",null,cacheKeys,queryClass);
     StringSetBuffer ssb = new StringSetBuffer();
@@ -747,13 +747,13 @@ public class DBInterfacePostgreSQL exten
   *@return a resultset.
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass)
-    throws LCFException
+    throws ACFException
   {
     try
     {
       return executeQuery(query,params,cacheKeys,null,queryClass,true,-1,null,null);
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       throw reinterpretException(e);
     }
@@ -771,13 +771,13 @@ public class DBInterfacePostgreSQL exten
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
     int maxResults, ILimitChecker returnLimit)
-    throws LCFException
+    throws ACFException
   {
     try
     {
       return executeQuery(query,params,cacheKeys,null,queryClass,true,maxResults,null,returnLimit);
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       throw reinterpretException(e);
     }
@@ -796,13 +796,13 @@ public class DBInterfacePostgreSQL exten
   */
   public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
     int maxResults, ResultSpecification resultSpec, ILimitChecker returnLimit)
-    throws LCFException
+    throws ACFException
   {
     try
     {
       return executeQuery(query,params,cacheKeys,null,queryClass,true,maxResults,resultSpec,returnLimit);
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       throw reinterpretException(e);
     }
@@ -894,7 +894,7 @@ public class DBInterfacePostgreSQL exten
   * signalRollback() method, and rethrow the exception.  Then, after that a finally{} block which calls endTransaction().
   */
   public void beginTransaction()
-    throws LCFException
+    throws ACFException
   {
     beginTransaction(TRANSACTION_ENCLOSING);
   }
@@ -909,7 +909,7 @@ public class DBInterfacePostgreSQL exten
   *@param transactionType is the kind of transaction desired.
   */
   public void beginTransaction(int transactionType)
-    throws LCFException
+    throws ACFException
   {
     if (getCurrentTransactionType() == TRANSACTION_SERIALIZED)
     {
@@ -939,7 +939,7 @@ public class DBInterfacePostgreSQL exten
         super.endTransaction();
         throw e;
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
         super.signalRollback();
         super.endTransaction();
@@ -947,7 +947,7 @@ public class DBInterfacePostgreSQL exten
       }
       break;
     default:
-      throw new LCFException("Bad transaction type: "+Integer.toString(transactionType));
+      throw new ACFException("Bad transaction type: "+Integer.toString(transactionType));
     }
   }
 
@@ -963,7 +963,7 @@ public class DBInterfacePostgreSQL exten
   * signalRollback() was called within the transaction).
   */
   public void endTransaction()
-    throws LCFException
+    throws ACFException
   {
     if (serializableDepth > 0)
     {
@@ -991,28 +991,28 @@ public class DBInterfacePostgreSQL exten
 
   /** Abstract method to start a transaction */
   protected void startATransaction()
-    throws LCFException
+    throws ACFException
   {
     executeViaThread(connection,"START TRANSACTION",null,false,0,null,null);
   }
 
   /** Abstract method to commit a transaction */
   protected void commitCurrentTransaction()
-    throws LCFException
+    throws ACFException
   {
     executeViaThread(connection,"COMMIT",null,false,0,null,null);
   }
   
   /** Abstract method to roll back a transaction */
   protected void rollbackCurrentTransaction()
-    throws LCFException
+    throws ACFException
   {
     executeViaThread(connection,"ROLLBACK",null,false,0,null,null);
   }
   
   /** Abstract method for explaining a query */
   protected void explainQuery(String query, ArrayList params)
-    throws LCFException
+    throws ACFException
   {
     IResultSet x = executeUncachedQuery("EXPLAIN "+query,params,true,
       -1,null,null);

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/Database.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/Database.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/Database.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/Database.java Mon Aug 23 18:08:32 2010
@@ -51,7 +51,7 @@ public class Database
   protected final static String _TRANSACTION_ = "_TRANSACTION_";
 
   public Database(IThreadContext context, String jdbcUrl, String jdbcDriverClass, String databaseName, String userName, String password)
-    throws LCFException
+    throws ACFException
   {
     this.context = context;
     this.jdbcUrl = jdbcUrl;
@@ -82,25 +82,25 @@ public class Database
 
   /** Abstract method to start a transaction */
   protected void startATransaction()
-    throws LCFException
+    throws ACFException
   {
   }
 
   /** Abstract method to commit a transaction */
   protected void commitCurrentTransaction()
-    throws LCFException
+    throws ACFException
   {
   }
   
   /** Abstract method to roll back a transaction */
   protected void rollbackCurrentTransaction()
-    throws LCFException
+    throws ACFException
   {
   }
   
   /** Abstract method for explaining a query */
   protected void explainQuery(String query, ArrayList params)
-    throws LCFException
+    throws ACFException
   {
   }
   
@@ -138,7 +138,7 @@ public class Database
   */
   public IResultSet executeQuery(String query, ArrayList params, StringSet cacheKeys, StringSet invalidateKeys,
     String queryClass, boolean needResult, int maxReturn, ResultSpecification spec, ILimitChecker returnLimits)
-    throws LCFException
+    throws ACFException
   {
     // System.out.println("Query: "+query);
     if (Logging.db.isDebugEnabled())
@@ -189,7 +189,7 @@ public class Database
   *@param transactionType describes the type of the transaction.
   */
   public void beginTransaction(int transactionType)
-    throws LCFException
+    throws ACFException
   {
     if (Logging.db.isDebugEnabled())
       Logging.db.debug("Beginning transaction of type "+Integer.toString(transactionType));
@@ -208,7 +208,7 @@ public class Database
   /** Synchronize internal transactions.
   */
   protected void synchronizeTransactions()
-    throws LCFException
+    throws ACFException
   {
     while (delayedTransactionDepth > 0)
     {
@@ -222,7 +222,7 @@ public class Database
   /** Perform actual transaction begin.
   */
   protected void internalTransactionBegin()
-    throws LCFException
+    throws ACFException
   {
     // Get a semipermanent connection
     if (connection == null)
@@ -233,9 +233,9 @@ public class Database
         // Start a transaction
         startATransaction();
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
-        if (e.getErrorCode() == LCFException.INTERRUPTED)
+        if (e.getErrorCode() == ACFException.INTERRUPTED)
         {
           connection = null;
           throw e;
@@ -257,9 +257,9 @@ public class Database
       {
         startATransaction();
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
-        if (e.getErrorCode() == LCFException.INTERRUPTED)
+        if (e.getErrorCode() == ACFException.INTERRUPTED)
         {
           // Don't do anything else other than drop the connection on the floor
           connection = null;
@@ -281,11 +281,11 @@ public class Database
   * signalRollback() was called within the transaction).
   */
   public void endTransaction()
-    throws LCFException
+    throws ACFException
   {
     Logging.db.debug("Ending transaction");
     if (th == null)
-      throw new LCFException("End transaction without begin!",LCFException.GENERAL_ERROR);
+      throw new ACFException("End transaction without begin!",ACFException.GENERAL_ERROR);
 
     TransactionHandle parentTransaction = th.getParent();
     // If the database throws up on the commit or the rollback, above us there
@@ -313,9 +313,9 @@ public class Database
             commitCurrentTransaction();
           }
         }
-        catch (LCFException e)
+        catch (ACFException e)
         {
-          if (e.getErrorCode() == LCFException.INTERRUPTED)
+          if (e.getErrorCode() == ACFException.INTERRUPTED)
           {
             // Drop the connection on the floor, so it cannot be reused.
             connection = null;
@@ -400,7 +400,7 @@ public class Database
   /** Do query execution via a subthread, so the primary thread can be interrupted */
   protected IResultSet executeViaThread(Connection connection, String query, ArrayList params, boolean bResults, int maxResults,
     ResultSpecification spec, ILimitChecker returnLimit)
-    throws LCFException
+    throws ACFException
   {
     if (connection == null)
       // This probably means that the thread was interrupted and the connection was abandoned.  Just return null.
@@ -414,11 +414,11 @@ public class Database
       Throwable thr = t.getException();
       if (thr != null)
       {
-        if (thr instanceof LCFException)
+        if (thr instanceof ACFException)
         {
           // Nest the exceptions so there is a hope we actually see the context, while preserving the kind of error it is
-          LCFException me = (LCFException)thr;
-          throw new LCFException("Database exception: "+me.getMessage(),me.getCause(),me.getErrorCode());
+          ACFException me = (ACFException)thr;
+          throw new ACFException("Database exception: "+me.getMessage(),me.getCause(),me.getErrorCode());
         }
         else
           throw (Error)thr;
@@ -429,7 +429,7 @@ public class Database
     {
       t.interrupt();
       // We need the caller to abandon any connections left around, so rethrow in a way that forces them to process the event properly.
-      throw new LCFException(e.getMessage(),e,LCFException.INTERRUPTED);
+      throw new ACFException(e.getMessage(),e,ACFException.INTERRUPTED);
     }
 
   }
@@ -439,7 +439,7 @@ public class Database
   */
   protected IResultSet executeUncachedQuery(String query, ArrayList params, boolean bResults, int maxResults,
     ResultSpecification spec, ILimitChecker returnLimit)
-    throws LCFException
+    throws ACFException
   {
 
     if (connection != null)
@@ -448,9 +448,9 @@ public class Database
       {
         return executeViaThread(connection,query,params,bResults,maxResults,spec,returnLimit);
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
-        if (e.getErrorCode() == LCFException.INTERRUPTED)
+        if (e.getErrorCode() == ACFException.INTERRUPTED)
           // drop the connection object on the floor, so it cannot possibly be reused
           connection = null;
         throw e;
@@ -464,9 +464,9 @@ public class Database
       {
         return executeViaThread(tempConnection,query,params,bResults,maxResults,spec,returnLimit);
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
-        if (e.getErrorCode() == LCFException.INTERRUPTED)
+        if (e.getErrorCode() == ACFException.INTERRUPTED)
           // drop the connection object on the floor, so it cannot possibly be reused
           tempConnection = null;
         throw e;
@@ -490,7 +490,7 @@ public class Database
   */
   protected IResultSet execute(Connection connection, String query, ArrayList params, boolean bResults, int maxResults,
     ResultSpecification spec, ILimitChecker returnLimit)
-    throws LCFException
+    throws ACFException
   {
     IResultSet rval = null;
     try
@@ -579,7 +579,7 @@ public class Database
       {
         // There are a lot of different sorts of error that can be embedded here.  Unfortunately, it's database dependent how
         // to interpret the error.  So toss a generic error, and let the caller figure out if it needs to treat it differently.
-        throw new LCFException("Exception doing query: "+e.getMessage(),e,LCFException.DATABASE_CONNECTION_ERROR);
+        throw new ACFException("Exception doing query: "+e.getMessage(),e,ACFException.DATABASE_CONNECTION_ERROR);
       }
     }
     finally
@@ -593,7 +593,7 @@ public class Database
 
   // Read data from a resultset
   protected IResultSet getData(ResultSet rs, boolean bResults, int maxResults, ResultSpecification spec, ILimitChecker returnLimit)
-    throws LCFException
+    throws ACFException
   {
     RSet results = new RSet();  // might be empty but not an error
     try
@@ -628,7 +628,7 @@ public class Database
             {
               // This is an error situation; if a result with no columns is
               // necessary, bResults must be false!!!
-              throw new LCFException("Empty query, no columns returned",LCFException.GENERAL_ERROR);
+              throw new ACFException("Empty query, no columns returned",ACFException.GENERAL_ERROR);
             }
 
             while (rs.next() && (maxResults == -1 || maxResults > 0) && (returnLimit == null || returnLimit.checkContinue()))
@@ -682,7 +682,7 @@ public class Database
       }
       catch (java.sql.SQLException e)
       {
-        throw new LCFException("Resultset error: "+e.getMessage(),e,LCFException.DATABASE_CONNECTION_ERROR);
+        throw new ACFException("Resultset error: "+e.getMessage(),e,ACFException.DATABASE_CONNECTION_ERROR);
       }
     }
     catch (Throwable e)
@@ -704,8 +704,8 @@ public class Database
             ((CharacterInput)o).discard();
         }
       }
-      if (e instanceof LCFException)
-        throw (LCFException)e;
+      if (e instanceof ACFException)
+        throw (ACFException)e;
       if (e instanceof RuntimeException)
         throw (RuntimeException)e;
       if (e instanceof Error)
@@ -717,7 +717,7 @@ public class Database
 
   // pass params to preparedStatement
   protected static void loadPS(PreparedStatement ps, ArrayList data)
-    throws java.sql.SQLException, LCFException
+    throws java.sql.SQLException, ACFException
   {
     if (data!=null)
     {
@@ -776,7 +776,7 @@ public class Database
   /** Clean up parameters after query has been triggered.
   */
   protected static void cleanupParameters(ArrayList data)
-    throws LCFException
+    throws ACFException
   {
     if (data != null)
     {
@@ -798,7 +798,7 @@ public class Database
   }
 
   protected int findColumn(ResultSet rs, String name)
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -810,12 +810,12 @@ public class Database
     }
     catch (Exception e)
     {
-      throw new LCFException("Error finding " + name + " in resultset: "+e.getMessage(),e,LCFException.DATABASE_ERROR);
+      throw new ACFException("Error finding " + name + " in resultset: "+e.getMessage(),e,ACFException.DATABASE_ERROR);
     }
   }
 
   protected Blob getBLOB(ResultSet rs, int col)
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -823,16 +823,16 @@ public class Database
     }
     catch (java.sql.SQLException sqle)
     {
-      throw new LCFException("Error in getBlob",sqle,LCFException.DATABASE_CONNECTION_ERROR);
+      throw new ACFException("Error in getBlob",sqle,ACFException.DATABASE_CONNECTION_ERROR);
     }
     catch (Exception sqle)
     {
-      throw new LCFException("Error in getBlob",sqle,LCFException.DATABASE_ERROR);
+      throw new ACFException("Error in getBlob",sqle,ACFException.DATABASE_ERROR);
     }
   }
 
   protected boolean isBLOB(ResultSetMetaData rsmd, int col)
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -841,16 +841,16 @@ public class Database
     }
     catch (java.sql.SQLException sqle)
     {
-      throw new LCFException("Error in isBlob("+col+"): "+sqle.getMessage(),sqle,LCFException.DATABASE_CONNECTION_ERROR);
+      throw new ACFException("Error in isBlob("+col+"): "+sqle.getMessage(),sqle,ACFException.DATABASE_CONNECTION_ERROR);
     }
     catch (Exception sqle)
     {
-      throw new LCFException("Error in isBlob("+col+"): "+sqle.getMessage(),sqle,LCFException.DATABASE_ERROR);
+      throw new ACFException("Error in isBlob("+col+"): "+sqle.getMessage(),sqle,ACFException.DATABASE_ERROR);
     }
   }
 
   protected boolean isBinary(ResultSetMetaData rsmd, int col)
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -860,16 +860,16 @@ public class Database
     }
     catch (java.sql.SQLException sqle)
     {
-      throw new LCFException("Error in isBinary("+col+"): "+sqle.getMessage(),sqle,LCFException.DATABASE_CONNECTION_ERROR);
+      throw new ACFException("Error in isBinary("+col+"): "+sqle.getMessage(),sqle,ACFException.DATABASE_CONNECTION_ERROR);
     }
     catch (Exception sqle)
     {
-      throw new LCFException("Error in isBinary("+col+"): "+sqle.getMessage(),sqle,LCFException.DATABASE_ERROR);
+      throw new ACFException("Error in isBinary("+col+"): "+sqle.getMessage(),sqle,ACFException.DATABASE_ERROR);
     }
   }
 
   protected Object getObject(ResultSet rs, ResultSetMetaData rsmd, int col, int desiredForm)
-    throws LCFException
+    throws ACFException
   {
     Object result = null;
 
@@ -965,7 +965,7 @@ public class Database
             break;
 
           case java.sql.Types.BLOB:
-            throw new LCFException("BLOB is not a string, column = " + col,LCFException.GENERAL_ERROR);
+            throw new ACFException("BLOB is not a string, column = " + col,ACFException.GENERAL_ERROR);
 
           default :
             switch (desiredForm)
@@ -978,7 +978,7 @@ public class Database
               result = new TempFileCharacterInput(rs.getCharacterStream(col));
               break;
             default:
-              throw new LCFException("Illegal form requested for column "+Integer.toString(col)+": "+Integer.toString(desiredForm));
+              throw new ACFException("Illegal form requested for column "+Integer.toString(col)+": "+Integer.toString(desiredForm));
             }
             break;
           }
@@ -992,7 +992,7 @@ public class Database
       }
       catch (java.sql.SQLException e)
       {
-        throw new LCFException("Exception in getObject(): "+e.getMessage(),e,LCFException.DATABASE_CONNECTION_ERROR);
+        throw new ACFException("Exception in getObject(): "+e.getMessage(),e,ACFException.DATABASE_CONNECTION_ERROR);
       }
     }
     catch (Throwable e)
@@ -1001,8 +1001,8 @@ public class Database
         ((CharacterInput)result).discard();
       else if (result instanceof BinaryInput)
         ((BinaryInput)result).discard();
-      if (e instanceof LCFException)
-        throw (LCFException)e;
+      if (e instanceof ACFException)
+        throw (ACFException)e;
       if (e instanceof RuntimeException)
         throw (RuntimeException)e;
       if (e instanceof Error)
@@ -1049,7 +1049,7 @@ public class Database
     * @param objectDescriptions are the unique identifiers of the objects.
     * @return the newly created objects to cache, or null, if any object cannot be created.
     */
-    public Object[] create(ICacheDescription[] objectDescriptions) throws LCFException
+    public Object[] create(ICacheDescription[] objectDescriptions) throws ACFException
     {
       // Perform the requested query, within the appropriate transaction object.
       // Call the database object to do this
@@ -1090,7 +1090,7 @@ public class Database
           {
             database.explainQuery(description.getQuery(),description.getParameters());
           }
-          catch (LCFException e)
+          catch (ACFException e)
           {
             Logging.db.error("Explain failed with error "+e.getMessage(),e);
           }
@@ -1109,7 +1109,7 @@ public class Database
     * @param objectDescription is the unique identifier of the object.
     * @param cachedObject is the cached object.
     */
-    public void exists(ICacheDescription objectDescription, Object cachedObject) throws LCFException
+    public void exists(ICacheDescription objectDescription, Object cachedObject) throws ACFException
     {
       // System.out.println("Object created or found: "+objectDescription.getCriticalSectionName());
       // Save the resultset for return
@@ -1119,7 +1119,7 @@ public class Database
     /** Perform the desired operation.  This method is called after either createGetObject()
     * or exists() is called for every requested object.
     */
-    public void execute() throws LCFException
+    public void execute() throws ACFException
     {
       // Does nothing at all; the query would already have been done
     }

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/TransactionHandle.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/TransactionHandle.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/TransactionHandle.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/database/TransactionHandle.java Mon Aug 23 18:08:32 2010
@@ -36,7 +36,7 @@ public class TransactionHandle
   protected int transactionType;
 
   public TransactionHandle(IThreadContext tc, TransactionHandle previousTransaction, int transactionType)
-    throws LCFException
+    throws ACFException
   {
     // Grab a unique ID
     transactionID = IDFactory.make(tc);

Added: incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/ACFException.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/ACFException.java?rev=988237&view=auto
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/ACFException.java (added)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/ACFException.java Mon Aug 23 18:08:32 2010
@@ -0,0 +1,78 @@
+/* $Id: ACFException.java 921329 2010-03-10 12:44:20Z kwright $ */
+
+/**
+* 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.acf.core.interfaces;
+
+public class ACFException extends Exception
+{
+  public static final String _rcsid = "@(#)$Id: ACFException.java 921329 2010-03-10 12:44:20Z kwright $";
+
+  public final static int GENERAL_ERROR = 0;
+  public final static int DATABASE_ERROR = 1;
+  public final static int INTERRUPTED = 2;
+  public final static int SETUP_ERROR = 3;
+  public final static int DATABASE_CONNECTION_ERROR = 4;
+  public final static int REPOSITORY_CONNECTION_ERROR = 5;
+  public final static int DATABASE_TRANSACTION_ABORT = 6;
+  // MHL
+
+  protected int errcode;
+
+  public ACFException(String errString)
+  {
+    super(errString);
+    this.errcode = GENERAL_ERROR;
+  }
+
+  public ACFException(String errString, int errcode)
+  {
+    super(errString);
+    this.errcode = errcode;
+  }
+
+  public ACFException(String errString, Throwable cause, int errcode)
+  {
+    super(errString,cause);
+    this.errcode = errcode;
+  }
+
+  public ACFException(String errString, Throwable cause)
+  {
+    super(errString,cause);
+    this.errcode = GENERAL_ERROR;
+  }
+
+  public ACFException(Throwable cause, int errcode)
+  {
+    super(cause);
+    this.errcode = errcode;
+  }
+
+  public ACFException(Throwable cause)
+  {
+    super(cause);
+    this.errcode = GENERAL_ERROR;
+  }
+
+  public int getErrorCode()
+  {
+    return errcode;
+  }
+
+
+}

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/BinaryInput.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/BinaryInput.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/BinaryInput.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/BinaryInput.java Mon Aug 23 18:08:32 2010
@@ -42,7 +42,7 @@ public abstract class BinaryInput
 
   /** Obtain the stream to pass to JDBC */
   public InputStream getStream()
-    throws LCFException
+    throws ACFException
   {
     if (stream == null)
       openStream();
@@ -51,7 +51,7 @@ public abstract class BinaryInput
 
   /** Obtain the length to pass to JDBC */
   public long getLength()
-    throws LCFException
+    throws ACFException
   {
     if (length == -1L)
       calculateLength();
@@ -60,7 +60,7 @@ public abstract class BinaryInput
 
   /** Close the stream we passed to JDBC */
   public void doneWithStream()
-    throws LCFException
+    throws ACFException
   {
     if (stream != null)
       closeStream();
@@ -71,7 +71,7 @@ public abstract class BinaryInput
 
   /** Discard the object */
   public void discard()
-    throws LCFException
+    throws ACFException
   {
     doneWithStream();
   }
@@ -79,14 +79,14 @@ public abstract class BinaryInput
   // Protected methods
 
   protected abstract void openStream()
-    throws LCFException;
+    throws ACFException;
 
   protected abstract void calculateLength()
-    throws LCFException;
+    throws ACFException;
 
   /** Close the stream */
   protected void closeStream()
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -95,11 +95,11 @@ public abstract class BinaryInput
     }
     catch (InterruptedIOException e)
     {
-      throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+      throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
     }
     catch (IOException e)
     {
-      throw new LCFException("IO exception closing stream: "+e.getMessage(),e,LCFException.GENERAL_ERROR);
+      throw new ACFException("IO exception closing stream: "+e.getMessage(),e,ACFException.GENERAL_ERROR);
     }
   }
 

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/CacheManagerFactory.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/CacheManagerFactory.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/CacheManagerFactory.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/CacheManagerFactory.java Mon Aug 23 18:08:32 2010
@@ -35,7 +35,7 @@ public class CacheManagerFactory
   * @return the proper cache manager instance.
   */
   public static ICacheManager make(IThreadContext context)
-    throws LCFException
+    throws ACFException
   {
     Object o = context.get(cacheManager);
     if (o == null || !(o instanceof ICacheManager))

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/CharacterInput.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/CharacterInput.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/CharacterInput.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/CharacterInput.java Mon Aug 23 18:08:32 2010
@@ -42,7 +42,7 @@ public abstract class CharacterInput
   }
 
   public Reader getStream()
-    throws LCFException
+    throws ACFException
   {
     if (stream == null)
       openStream();
@@ -50,14 +50,14 @@ public abstract class CharacterInput
   }
 
   public void doneWithStream()
-    throws LCFException
+    throws ACFException
   {
     if (stream != null)
       closeStream();
   }
 
   public long getCharacterLength()
-    throws LCFException
+    throws ACFException
   {
     if (charLength == -1L)
       calculateLength();
@@ -65,7 +65,7 @@ public abstract class CharacterInput
   }
 
   public String getHashValue()
-    throws LCFException
+    throws ACFException
   {
     if (hashValue == null)
       calculateHashValue();
@@ -74,14 +74,14 @@ public abstract class CharacterInput
 
   /** Open a Utf8 stream directly */
   public abstract InputStream getUtf8Stream()
-    throws LCFException;
+    throws ACFException;
 
   /** Transfer to a new object; this causes the current object to become "already discarded" */
   public abstract CharacterInput transfer();
 
   /** Discard this object permanently */
   public void discard()
-    throws LCFException
+    throws ACFException
   {
     doneWithStream();
   }
@@ -90,11 +90,11 @@ public abstract class CharacterInput
 
   /** Open a reader, for use by a caller, until closeStream is called */
   protected abstract void openStream()
-    throws LCFException;
+    throws ACFException;
 
   /** Close any open reader */
   protected void closeStream()
-    throws LCFException
+    throws ACFException
   {
     try
     {
@@ -103,20 +103,20 @@ public abstract class CharacterInput
     }
     catch (InterruptedIOException e)
     {
-      throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+      throw new ACFException("Interrupted: "+e.getMessage(),e,ACFException.INTERRUPTED);
     }
     catch (IOException e)
     {
-      throw new LCFException("Error closing stream: "+e.getMessage(),e,LCFException.GENERAL_ERROR);
+      throw new ACFException("Error closing stream: "+e.getMessage(),e,ACFException.GENERAL_ERROR);
     }
   }
 
   /** Calculate the datum's length in characters */
   protected abstract void calculateLength()
-    throws LCFException;
+    throws ACFException;
 
   /** Calculate the datum's hash value */
   protected abstract void calculateHashValue()
-    throws LCFException;
+    throws ACFException;
 
 }

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/ConfigParams.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/ConfigParams.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/ConfigParams.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/acf/core/interfaces/ConfigParams.java Mon Aug 23 18:08:32 2010
@@ -21,7 +21,7 @@ package org.apache.acf.core.interfaces;
 import org.apache.acf.core.interfaces.*;
 import java.util.*;
 import java.io.*;
-import org.apache.acf.core.system.LCF;
+import org.apache.acf.core.system.ACF;
 
 /** This class represents a set of configuration parameters, with structure, which is a generalized hierarchy of nodes that
 * can be interpreted by a repository or authority connector in an appropriate way.
@@ -67,7 +67,7 @@ public class ConfigParams extends Config
   *@param xml is the input XML.
   */
   public ConfigParams(String xml)
-    throws LCFException
+    throws ACFException
   {
     super("configuration");
     fromXML(xml);
@@ -77,7 +77,7 @@ public class ConfigParams extends Config
   *@param xmlstream is the input XML stream.  Does NOT close the stream.
   */
   public ConfigParams(InputStream xmlstream)
-    throws LCFException
+    throws ACFException
   {
     super("configuration");
     fromXML(xmlstream);
@@ -151,9 +151,9 @@ public class ConfigParams extends Config
       return rval;
     try
     {
-      return LCF.deobfuscate(rval);
+      return ACF.deobfuscate(rval);
     }
-    catch (LCFException e)
+    catch (ACFException e)
     {
       // Ignore this exception, and return an empty string.
       return "";
@@ -203,9 +203,9 @@ public class ConfigParams extends Config
     {
       try
       {
-        value = LCF.obfuscate(value);
+        value = ACF.obfuscate(value);
       }
-      catch (LCFException e)
+      catch (ACFException e)
       {
         // Ignore this exception, and set "" to be the value
         value = "";