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 [11/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/crawle...
Date Wed, 17 Feb 2010 15:57:35 GMT
Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/interfaces/TempFileCharacterInput.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/interfaces/TempFileCharacterInput.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/interfaces/TempFileCharacterInput.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/interfaces/TempFileCharacterInput.java Wed Feb 17 15:57:27 2010
@@ -19,7 +19,7 @@
 package org.apache.lcf.core.interfaces;
 
 import java.io.*;
-import org.apache.lcf.core.system.Metacarta;
+import org.apache.lcf.core.system.LCF;
 
 /** This class represents a temporary file character input
 * stream.  Call the "done" method to clean up the
@@ -42,7 +42,7 @@
 	*	   and hash value for the data.
 	*/
 	public TempFileCharacterInput(Reader is)
-		throws MetacartaException
+		throws LCFException
 	{
 		super();
 		try
@@ -52,12 +52,12 @@
 			try
 			{
 				// Register the file for autodeletion, using our infrastructure.
-				Metacarta.addFile(outfile);
+				LCF.addFile(outfile);
 				// deleteOnExit() causes memory leakage!
 				// outfile.deleteOnExit();
 				
 				// Set up hash digest and character length counter before we start anything.
-				java.security.MessageDigest md = Metacarta.startHash();
+				java.security.MessageDigest md = LCF.startHash();
 				
 				FileOutputStream outStream = new FileOutputStream(outfile);
 				// Create a Writer corresponding to the file output stream, and encode using utf-8
@@ -74,12 +74,12 @@
 						if (readsize == -1)
 							break;
 						outWriter.write(buffer,0,readsize);
-						Metacarta.addToHash(md,new String(buffer,0,readsize));
+						LCF.addToHash(md,new String(buffer,0,readsize));
 						totalMoved += readsize;
 					}
 					
 					charLength = totalMoved;
-					hashValue = Metacarta.getHashValue(md);
+					hashValue = LCF.getHashValue(md);
 				}
 				finally
 				{
@@ -95,7 +95,7 @@
 			{
 				// Delete the temp file we created on any error condition
 				// outfile.delete();
-				Metacarta.deleteFile(outfile);
+				LCF.deleteFile(outfile);
 				if (e instanceof Error)
 					throw (Error)e;
 				if (e instanceof RuntimeException)
@@ -107,11 +107,11 @@
 		}
 		catch (InterruptedIOException e)
 		{
-			throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+			throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
 		}
 		catch (Exception e)
 		{
-			throw new MetacartaException("Cannot write temporary file: "+e.getMessage(),e,MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Cannot write temporary file: "+e.getMessage(),e,LCFException.GENERAL_ERROR);
 		}
 
 	}
@@ -123,7 +123,7 @@
 	{
 		super();
 		file = tempFile;
-		Metacarta.addFile(file);
+		LCF.addFile(file);
 		// deleteOnExit() causes memory leakage; better to leak files on hard shutdown than memory.
 		// file.deleteOnExit();
 	}
@@ -135,7 +135,7 @@
 
 	/** Open a Utf8 stream directly from the backing file */
 	public InputStream getUtf8Stream()
-		throws MetacartaException
+		throws LCFException
 	{
 		if (file != null)
 		{
@@ -145,14 +145,14 @@
 			}
 			catch (FileNotFoundException e)
 			{
-				throw new MetacartaException("No such file: "+e.getMessage(),e,MetacartaException.GENERAL_ERROR);
+				throw new LCFException("No such file: "+e.getMessage(),e,LCFException.GENERAL_ERROR);
 			}
 		}
 		return null;
 	}
 
 	protected void openStream()
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -162,11 +162,11 @@
 		}
 		catch (FileNotFoundException e)
 		{
-			throw new MetacartaException("Can't create stream: "+e.getMessage(),e,MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Can't create stream: "+e.getMessage(),e,LCFException.GENERAL_ERROR);
 		}
 		catch (UnsupportedEncodingException e)
 		{
-			throw new MetacartaException("Can't create stream: "+e.getMessage(),e,MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Can't create stream: "+e.getMessage(),e,LCFException.GENERAL_ERROR);
 		}
 	}
 
@@ -187,33 +187,33 @@
 	}
 
 	public void discard()
-		throws MetacartaException
+		throws LCFException
 	{
 		super.discard();
 		// Delete the underlying file
 		if (file != null)
 		{
-			Metacarta.deleteFile(file);
+			LCF.deleteFile(file);
 			file = null;
 		}
 	}
 
 	/** Calculate the datum's length in characters */
 	protected void calculateLength()
-		throws MetacartaException
+		throws LCFException
 	{
 		scanFile();
 	}
 	
 	/** Calculate the datum's hash value */
 	protected void calculateHashValue()
-		throws MetacartaException
+		throws LCFException
 	{
 		scanFile();
 	}
 
 	private void scanFile()
-		throws MetacartaException
+		throws LCFException
 	{
 		// Scan the file in order to figure out the hash value and the character length
 		try
@@ -224,7 +224,7 @@
 			try
 			{
 				// Set up hash digest and character length counter before we start anything.
-				java.security.MessageDigest md = Metacarta.startHash();
+				java.security.MessageDigest md = LCF.startHash();
 				char[] buffer = new char[CHUNK_SIZE];
 				long totalMoved = 0;
 				while (true)
@@ -234,12 +234,12 @@
 					int readsize = reader.read(buffer,0,moveAmount);
 					if (readsize == -1)
 						break;
-					Metacarta.addToHash(md,new String(buffer,0,readsize));
+					LCF.addToHash(md,new String(buffer,0,readsize));
 					totalMoved += readsize;
 				}
 					
 				charLength = totalMoved;
-				hashValue = Metacarta.getHashValue(md);
+				hashValue = LCF.getHashValue(md);
 			}
 			finally
 			{
@@ -248,11 +248,11 @@
 		}
 		catch (InterruptedIOException e)
 		{
-			throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+			throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
 		}
 		catch (IOException e)
 		{
-			throw new MetacartaException("Can't scan file: "+e.getMessage(),e,MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Can't scan file: "+e.getMessage(),e,LCFException.GENERAL_ERROR);
 		}
 	}
 	

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/interfaces/TempFileInput.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/interfaces/TempFileInput.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/interfaces/TempFileInput.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/interfaces/TempFileInput.java Wed Feb 17 15:57:27 2010
@@ -19,7 +19,7 @@
 package org.apache.lcf.core.interfaces;
 
 import java.io.*;
-import org.apache.lcf.core.system.Metacarta;
+import org.apache.lcf.core.system.LCF;
 
 /** This class represents a temporary file data input
 * stream.  Call the "done" method to clean up the
@@ -42,7 +42,7 @@
 	*@param is is the input stream to use to construct the temporary file.
 	*/
 	public TempFileInput(InputStream is)
-		throws MetacartaException
+		throws LCFException
 	{
 		this(is,-1L);
 	}
@@ -52,7 +52,7 @@
 	*@param length is the maximum number of bytes to transfer, or -1 if no limit.
 	*/
 	public TempFileInput(InputStream is, long length)
-		throws MetacartaException
+		throws LCFException
 	{
 		super();
 		try
@@ -62,7 +62,7 @@
 			try
 			{
 				// Register the file for autodeletion, using our infrastructure.
-				Metacarta.addFile(outfile);
+				LCF.addFile(outfile);
 				// deleteOnExit() causes memory leakage!
 				// outfile.deleteOnExit();
 				FileOutputStream outStream = new FileOutputStream(outfile);
@@ -103,7 +103,7 @@
 			{
 				// Delete the temp file we created on any error condition
 				// outfile.delete();
-				Metacarta.deleteFile(outfile);
+				LCF.deleteFile(outfile);
 				if (e instanceof Error)
 					throw (Error)e;
 				if (e instanceof RuntimeException)
@@ -115,11 +115,11 @@
 		}
 		catch (InterruptedIOException e)
 		{
-			throw new MetacartaException("Interrupted: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+			throw new LCFException("Interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
 		}
 		catch (Exception e)
 		{
-			throw new MetacartaException("Cannot write temporary file",e,MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Cannot write temporary file",e,LCFException.GENERAL_ERROR);
 		}
 
 	}
@@ -131,7 +131,7 @@
 	{
 		super();
 		file = tempFile;
-		Metacarta.addFile(file);
+		LCF.addFile(file);
 		// deleteOnExit() causes memory leakage; better to leak files on hard shutdown than memory.
 		// file.deleteOnExit();
 	}
@@ -155,18 +155,18 @@
 	}
 
 	public void discard()
-		throws MetacartaException
+		throws LCFException
 	{
 		super.discard();
 		if (file != null)
 		{
-			Metacarta.deleteFile(file);
+			LCF.deleteFile(file);
 			file = null;
 		}
 	}
 
 	protected void openStream()
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -175,12 +175,12 @@
 		}
 		catch (FileNotFoundException e)
 		{
-			throw new MetacartaException("Can't create stream: "+e.getMessage(),e,MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Can't create stream: "+e.getMessage(),e,LCFException.GENERAL_ERROR);
 		}
 	}
 	
 	protected void calculateLength()
-		throws MetacartaException
+		throws LCFException
 	{
 		this.length = file.length();
 	}

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/keystore/KeystoreManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/keystore/KeystoreManager.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/keystore/KeystoreManager.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/keystore/KeystoreManager.java Wed Feb 17 15:57:27 2010
@@ -29,7 +29,7 @@
 
 /** This interface describes a class that manages keys and certificates in a secure manner.
 * It's built on top of the JDK 1.4+ JSSE integration, and provides all the necessary logic
-* to work well within the Metacarta java environment.
+* to work well within the LCF java environment.
 */
 public class KeystoreManager implements IKeystoreManager
 {
@@ -43,7 +43,7 @@
 	/** Create the keystore object.
 	*/
 	public KeystoreManager(String passcode)
-		throws MetacartaException
+		throws LCFException
 	{
 		this.passcode = passcode;
 		try
@@ -53,30 +53,30 @@
 		}
 		catch (KeyStoreException e)
 		{
-			throw new MetacartaException("Keystore exception: "+e.getMessage(),e);
+			throw new LCFException("Keystore exception: "+e.getMessage(),e);
 		}
 		catch (InterruptedIOException e)
 		{
-			throw new MetacartaException("Interrupted IO: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+			throw new LCFException("Interrupted IO: "+e.getMessage(),e,LCFException.INTERRUPTED);
 		}
 		catch (IOException e)
 		{
-			throw new MetacartaException("IO error creating keystore: "+e.getMessage(),e);
+			throw new LCFException("IO error creating keystore: "+e.getMessage(),e);
 		}
 		catch (NoSuchAlgorithmException e)
 		{
-			throw new MetacartaException("Unknown algorithm exception creating keystore: "+e.getMessage(),e);
+			throw new LCFException("Unknown algorithm exception creating keystore: "+e.getMessage(),e);
 		}
 		catch (CertificateException e)
 		{
-			throw new MetacartaException("Unknown certificate exception creating keystore: "+e.getMessage(),e);
+			throw new LCFException("Unknown certificate exception creating keystore: "+e.getMessage(),e);
 		}
 	}
 
 	/** Create the keystore object from an existing base 64 string.
 	*/
 	public KeystoreManager(String passcode, String base64String)
-		throws MetacartaException
+		throws LCFException
 	{
 		this.passcode = passcode;
 		try
@@ -95,23 +95,23 @@
 		}
 		catch (KeyStoreException e)
 		{
-			throw new MetacartaException("Keystore exception: "+e.getMessage(),e);
+			throw new LCFException("Keystore exception: "+e.getMessage(),e);
 		}
 		catch (InterruptedIOException e)
 		{
-			throw new MetacartaException("Interrupted IO: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+			throw new LCFException("Interrupted IO: "+e.getMessage(),e,LCFException.INTERRUPTED);
 		}
 		catch (IOException e)
 		{
-			throw new MetacartaException("IO error creating keystore: "+e.getMessage(),e);
+			throw new LCFException("IO error creating keystore: "+e.getMessage(),e);
 		}
 		catch (NoSuchAlgorithmException e)
 		{
-			throw new MetacartaException("Unknown algorithm exception creating keystore: "+e.getMessage(),e);
+			throw new LCFException("Unknown algorithm exception creating keystore: "+e.getMessage(),e);
 		}
 		catch (CertificateException e)
 		{
-			throw new MetacartaException("Unknown certificate exception creating keystore: "+e.getMessage(),e);
+			throw new LCFException("Unknown certificate exception creating keystore: "+e.getMessage(),e);
 		}
 	}
 
@@ -119,7 +119,7 @@
 	*@return the list, as a string array.
 	*/
 	public String[] getContents()
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -135,7 +135,7 @@
 		}
 		catch (KeyStoreException e)
 		{
-			throw new MetacartaException("Keystore not initialized: "+e.getMessage(),e);
+			throw new LCFException("Keystore not initialized: "+e.getMessage(),e);
 		}
 
 	}
@@ -146,7 +146,7 @@
 	*@return a description of what's in the alias.
 	*/
 	public String getDescription(String alias)
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -157,7 +157,7 @@
 		}
 		catch (KeyStoreException e)
 		{
-			throw new MetacartaException("Keystore not initialized: "+e.getMessage(),e);
+			throw new LCFException("Keystore not initialized: "+e.getMessage(),e);
 		}
 	}
 
@@ -166,7 +166,7 @@
 	*@param certData is the binary data for the certificate.
 	*/
 	public void importCertificate(String alias, InputStream certData)
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -183,18 +183,18 @@
 		}
 		catch (KeyStoreException e)
 		{
-			throw new MetacartaException("Keystore exception: "+e.getMessage(),e);
+			throw new LCFException("Keystore exception: "+e.getMessage(),e);
 		}
 		catch (CertificateException e)
 		{
-			throw new MetacartaException("Certificate error: "+e.getMessage(),e);
+			throw new LCFException("Certificate error: "+e.getMessage(),e);
 		}
 	}
 
 	/** Read a certificate from the keystore.
 	*/
 	public java.security.cert.Certificate getCertificate(String alias)
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -202,14 +202,14 @@
 		}
 		catch (KeyStoreException e)
 		{
-			throw new MetacartaException("Keystore exception: "+e.getMessage(),e);
+			throw new LCFException("Keystore exception: "+e.getMessage(),e);
 		}
 	}
 
 	/** Add a certificate to the keystore.
 	*/
 	public void addCertificate(String alias, java.security.cert.Certificate certificate)
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -224,7 +224,7 @@
 		}
 		catch (KeyStoreException e)
 		{
-			throw new MetacartaException("Keystore exception: "+e.getMessage(),e);
+			throw new LCFException("Keystore exception: "+e.getMessage(),e);
 		}
 	}
 
@@ -232,7 +232,7 @@
 	*@param alias is the name of the certificate to remove.
 	*/
 	public void remove(String alias)
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -240,7 +240,7 @@
 		}
 		catch (KeyStoreException e)
 		{
-			throw new MetacartaException("Error deleting keystore entry",e);
+			throw new LCFException("Error deleting keystore entry",e);
 		}
 	}
 
@@ -248,7 +248,7 @@
 	*@return the base64-encoded string.
 	*/
 	public String getString()
-		throws MetacartaException
+		throws LCFException
 	{
 		try
 		{
@@ -260,23 +260,23 @@
 			}
 			catch (KeyStoreException e)
 			{
-				throw new MetacartaException("Error accessing keystore: "+e.getMessage(),e);
+				throw new LCFException("Error accessing keystore: "+e.getMessage(),e);
 			}
 			catch (InterruptedIOException e)
 			{
-				throw new MetacartaException("Interrupted IO: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted IO: "+e.getMessage(),e,LCFException.INTERRUPTED);
 			}
 			catch (IOException e)
 			{
-				throw new MetacartaException("IO error saving keystore: "+e.getMessage(),e);
+				throw new LCFException("IO error saving keystore: "+e.getMessage(),e);
 			}
 			catch (NoSuchAlgorithmException e)
 			{
-				throw new MetacartaException("Unknown algorithm exception saving keystore: "+e.getMessage(),e);
+				throw new LCFException("Unknown algorithm exception saving keystore: "+e.getMessage(),e);
 			}
 			catch (CertificateException e)
 			{
-				throw new MetacartaException("Certificate exception saving keystore: "+e.getMessage(),e);
+				throw new LCFException("Certificate exception saving keystore: "+e.getMessage(),e);
 			}
 			finally
 			{
@@ -285,18 +285,18 @@
 		}
 		catch (InterruptedIOException e)
 		{
-			throw new MetacartaException("Interrupted IO: "+e.getMessage(),e,MetacartaException.INTERRUPTED);
+			throw new LCFException("Interrupted IO: "+e.getMessage(),e,LCFException.INTERRUPTED);
 		}
 		catch (IOException e)
 		{
-			throw new MetacartaException("IO exception storing keystore: "+e.getMessage(),e);
+			throw new LCFException("IO exception storing keystore: "+e.getMessage(),e);
 		}
 	}
 
 	/** Build a secure socket factory based on this keystore.
 	*/
 	public javax.net.ssl.SSLSocketFactory getSecureSocketFactory()
-		throws MetacartaException
+		throws LCFException
 	{
 	    try
 	    {
@@ -358,15 +358,15 @@
 	    }
 	    catch (java.security.NoSuchAlgorithmException e)
 	    {
-		throw new MetacartaException("No such algorithm: "+e.getMessage(),e);
+		throw new LCFException("No such algorithm: "+e.getMessage(),e);
 	    }
 	    catch (java.security.KeyStoreException e)
 	    {
-		throw new MetacartaException("Keystore exception: "+e.getMessage(),e);
+		throw new LCFException("Keystore exception: "+e.getMessage(),e);
 	    }
 	    catch (java.security.KeyManagementException e)
 	    {
-		throw new MetacartaException("Key management exception: "+e.getMessage(),e);
+		throw new LCFException("Key management exception: "+e.getMessage(),e);
 	    }
 	}
 

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/lockmanager/LockManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/lockmanager/LockManager.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/lockmanager/LockManager.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/lockmanager/LockManager.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.*;
 
 /** The lock manager manages locks across all threads and JVMs and cluster members.  There should be no more than ONE
@@ -47,9 +47,9 @@
 	protected String synchDirectory = null;
 
 	public LockManager()
-		throws MetacartaException
+		throws LCFException
 	{
-		synchDirectory = Metacarta.getProperty(Metacarta.synchDirectoryProperty);
+		synchDirectory = LCF.getProperty(LCF.synchDirectoryProperty);
 	}
 
 	protected LocalLock getLocalLock(String lockKey)
@@ -87,7 +87,7 @@
 	/** Wait for a time before retrying a lock.
 	*/
 	public void timedWait(int time)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.lock.isDebugEnabled())
@@ -97,11 +97,11 @@
 
 		try
 		{
-			Metacarta.sleep(time);
+			LCF.sleep(time);
 		}
 		catch (InterruptedException e)
 		{
-			throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+			throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 		}
 	}
 
@@ -112,7 +112,7 @@
 	* interfere with one another (use of another, standard, write lock per item can guarantee this).
 	*/
 	public void enterNonExWriteLock(String lockKey)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.lock.isDebugEnabled())
@@ -135,7 +135,7 @@
 		// Check for illegalities
 		if (ll.hasReadLock())
 		{
-			throw new MetacartaException("Illegal lock sequence: NonExWrite lock can't be within read lock",MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Illegal lock sequence: NonExWrite lock can't be within read lock",LCFException.GENERAL_ERROR);
 		}
 
 		// We don't own a local non-ex write lock.  Get one.  The global lock will need
@@ -150,7 +150,7 @@
 			}
 			catch (InterruptedException e)
 			{
-				throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 			}
 			catch (ExpiredObjectException e)
 			{
@@ -162,7 +162,7 @@
 	}
 
 	public void enterNonExWriteLockNoWait(String lockKey)
-		throws MetacartaException, LockException
+		throws LCFException, LockException
 	{
 
 		if (Logging.lock.isDebugEnabled())
@@ -185,7 +185,7 @@
 		// Check for illegalities
 		if (ll.hasReadLock())
 		{
-			throw new MetacartaException("Illegal lock sequence: NonExWrite lock can't be within read lock",MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Illegal lock sequence: NonExWrite lock can't be within read lock",LCFException.GENERAL_ERROR);
 		}
 
 		// We don't own a local non-ex write lock.  Get one.  The global lock will need
@@ -214,7 +214,7 @@
 			}
 			catch (InterruptedException e)
 			{
-				throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 			}
 			catch (ExpiredObjectException e)
 			{
@@ -228,7 +228,7 @@
 	/** Leave a non-exclusive write lock.
 	*/
 	public void leaveNonExWriteLock(String lockKey)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.lock.isDebugEnabled())
@@ -258,17 +258,17 @@
 					try
 					{
 						lo.leaveNonExWriteLock();
-						throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 					}
 					catch (InterruptedException e2)
 					{
 						ll.incrementNonExWriteLocks();
-						throw new MetacartaException("Interrupted",e2,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e2,LCFException.INTERRUPTED);
 					}
 					catch (ExpiredObjectException e2)
 					{
 						ll.incrementNonExWriteLocks();
-						throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 					}
 				}
 				catch (ExpiredObjectException e)
@@ -285,7 +285,7 @@
 	* NOTE: Can't enter until all readers have left.
 	*/
 	public void enterWriteLock(String lockKey)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.lock.isDebugEnabled())
@@ -307,7 +307,7 @@
 		// Check for illegalities
 		if (ll.hasReadLock() || ll.hasNonExWriteLock())
 		{
-			throw new MetacartaException("Illegal lock sequence: Write lock can't be within read lock or non-ex write lock",MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Illegal lock sequence: Write lock can't be within read lock or non-ex write lock",LCFException.GENERAL_ERROR);
 		}
 
 		// We don't own a local write lock.  Get one.  The global lock will need
@@ -323,7 +323,7 @@
 			}
 			catch (InterruptedException e)
 			{
-				throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 			}
 			catch (ExpiredObjectException e)
 			{
@@ -335,7 +335,7 @@
 	}
 
 	public void enterWriteLockNoWait(String lockKey)
-		throws MetacartaException, LockException
+		throws LCFException, LockException
 	{
 
 		if (Logging.lock.isDebugEnabled())
@@ -357,7 +357,7 @@
 		// Check for illegalities
 		if (ll.hasReadLock() || ll.hasNonExWriteLock())
 		{
-			throw new MetacartaException("Illegal lock sequence: Write lock can't be within read lock or non-ex write lock",MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Illegal lock sequence: Write lock can't be within read lock or non-ex write lock",LCFException.GENERAL_ERROR);
 		}
 
 		// We don't own a local write lock.  Get one.  The global lock will need
@@ -386,7 +386,7 @@
 			}
 			catch (InterruptedException e)
 			{
-				throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 			}
 			catch (ExpiredObjectException e)
 			{
@@ -399,7 +399,7 @@
 	}
 
 	public void leaveWriteLock(String lockKey)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.lock.isDebugEnabled())
@@ -426,17 +426,17 @@
 					try
 					{
 						lo.leaveWriteLock();
-						throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 					}
 					catch (InterruptedException e2)
 					{
 						ll.incrementWriteLocks();
-						throw new MetacartaException("Interrupted",e2,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e2,LCFException.INTERRUPTED);
 					}
 					catch (ExpiredObjectException e2)
 					{
 						ll.incrementWriteLocks();
-						throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 					}
 				}
 				catch (ExpiredObjectException e)
@@ -452,7 +452,7 @@
 	/** Enter a read-only locked area (i.e., block ONLY if there's a writer)
 	*/
 	public void enterReadLock(String lockKey)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.lock.isDebugEnabled())
@@ -483,7 +483,7 @@
 			}
 			catch (InterruptedException e)
 			{
-				throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 			}
 			catch (ExpiredObjectException e)
 			{
@@ -495,7 +495,7 @@
 	}
 
 	public void enterReadLockNoWait(String lockKey)
-		throws MetacartaException, LockException
+		throws LCFException, LockException
 	{
 
 		if (Logging.lock.isDebugEnabled())
@@ -538,7 +538,7 @@
 			}
 			catch (InterruptedException e)
 			{
-				throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 			}
 			catch (ExpiredObjectException e)
 			{
@@ -551,7 +551,7 @@
 	}
 
 	public void leaveReadLock(String lockKey)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.lock.isDebugEnabled())
@@ -578,17 +578,17 @@
 					try
 					{
 						lo.leaveReadLock();
-						throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 					}
 					catch (InterruptedException e2)
 					{
 						ll.incrementReadLocks();
-						throw new MetacartaException("Interrupted",e2,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e2,LCFException.INTERRUPTED);
 					}
 					catch (ExpiredObjectException e2)
 					{
 						ll.incrementReadLocks();
-						throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 					}
 				}
 				catch (ExpiredObjectException e)
@@ -601,7 +601,7 @@
 	}
 
 	public void clearLocks()
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.lock.isDebugEnabled())
@@ -627,7 +627,7 @@
 	/** Enter multiple locks
 	*/
 	public void enterLocks(String[] readLocks, String[] nonExWriteLocks, String[] writeLocks)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		if (Logging.lock.isDebugEnabled())
@@ -680,7 +680,7 @@
 					// Check for illegalities
 					if ((ll.hasReadLock() || ll.hasNonExWriteLock()) && !ll.hasWriteLock())
 					{
-						throw new MetacartaException("Illegal lock sequence: Write lock can't be within read lock or non-ex write lock",MetacartaException.GENERAL_ERROR);
+						throw new LCFException("Illegal lock sequence: Write lock can't be within read lock or non-ex write lock",LCFException.GENERAL_ERROR);
 					}
 
 					// See if we already own the write lock for the object
@@ -708,7 +708,7 @@
 					// Check for illegalities
 					if (ll.hasReadLock() && !(ll.hasNonExWriteLock() || ll.hasWriteLock()))
 					{
-						throw new MetacartaException("Illegal lock sequence: NonExWrite lock can't be within read lock",MetacartaException.GENERAL_ERROR);
+						throw new LCFException("Illegal lock sequence: NonExWrite lock can't be within read lock",LCFException.GENERAL_ERROR);
 					}
 
 					// See if we already own the write lock for the object
@@ -762,7 +762,7 @@
 		catch (Throwable ex)
 		{
 			// No matter what, undo the locks we've taken
-			MetacartaException ae = null;
+			LCFException ae = null;
 			int errno = 0;
 
 			while (--locksProcessed >= 0)
@@ -785,7 +785,7 @@
 						break;
 					}
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					ae = e;
 				}
@@ -795,14 +795,14 @@
 			{
 				throw ae;
 			}
-			if (ex instanceof MetacartaException)
+			if (ex instanceof LCFException)
 			{
-				throw (MetacartaException)ex;
+				throw (LCFException)ex;
 			}
 			if (ex instanceof InterruptedException)
 			{
 				// It's InterruptedException
-				throw new MetacartaException("Interrupted",ex,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",ex,LCFException.INTERRUPTED);
 			}
 			if (!(ex instanceof Error))
 			{
@@ -813,7 +813,7 @@
 	}
 
 	public void enterLocksNoWait(String[] readLocks, String[] nonExWriteLocks, String[] writeLocks)
-		throws MetacartaException, LockException
+		throws LCFException, LockException
 	{
 
 		if (Logging.lock.isDebugEnabled())
@@ -866,7 +866,7 @@
 					// Check for illegalities
 					if ((ll.hasReadLock() || ll.hasNonExWriteLock()) && !ll.hasWriteLock())
 					{
-						throw new MetacartaException("Illegal lock sequence: Write lock can't be within read lock or non-ex write lock",MetacartaException.GENERAL_ERROR);
+						throw new LCFException("Illegal lock sequence: Write lock can't be within read lock or non-ex write lock",LCFException.GENERAL_ERROR);
 					}
 
 					// See if we already own the write lock for the object
@@ -897,7 +897,7 @@
 					// Check for illegalities
 					if (ll.hasReadLock() && !(ll.hasNonExWriteLock() || ll.hasWriteLock()))
 					{
-						throw new MetacartaException("Illegal lock sequence: NonExWrite lock can't be within read lock",MetacartaException.GENERAL_ERROR);
+						throw new LCFException("Illegal lock sequence: NonExWrite lock can't be within read lock",LCFException.GENERAL_ERROR);
 					}
 
 					// See if we already own the write lock for the object
@@ -957,7 +957,7 @@
 		catch (Throwable ex)
 		{
 			// No matter what, undo the locks we've taken
-			MetacartaException ae = null;
+			LCFException ae = null;
 			int errno = 0;
 
 			while (--locksProcessed >= 0)
@@ -980,7 +980,7 @@
 						break;
 					}
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					ae = e;
 				}
@@ -990,9 +990,9 @@
 			{
 				throw ae;
 			}
-			if (ex instanceof MetacartaException)
+			if (ex instanceof LCFException)
 			{
-				throw (MetacartaException)ex;
+				throw (LCFException)ex;
 			}
 			if (ex instanceof LockException || ex instanceof LocalLockException)
 			{
@@ -1002,7 +1002,7 @@
 			}
 			if (ex instanceof InterruptedException)
 			{
-				throw new MetacartaException("Interrupted",ex,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",ex,LCFException.INTERRUPTED);
 			}
 			if (!(ex instanceof Error))
 			{
@@ -1017,11 +1017,11 @@
 	/** Leave multiple locks
 	*/
 	public void leaveLocks(String[] readLocks, String[] writeNonExLocks, String[] writeLocks)
-		throws MetacartaException
+		throws LCFException
 	{
 		LockDescription[] lds = getSortedUniqueLocks(readLocks,writeNonExLocks,writeLocks);
 		// Free them all... one at a time is fine
-		MetacartaException ae = null;
+		LCFException ae = null;
 		int i = lds.length;
 		while (--i >= 0)
 		{
@@ -1043,7 +1043,7 @@
 					break;
 				}
 			}
-			catch (MetacartaException e)
+			catch (LCFException e)
 			{
 				ae = e;
 			}
@@ -1061,7 +1061,7 @@
 	* section at a time.
 	*/
 	public void enterReadCriticalSection(String sectionKey)
-		throws MetacartaException
+		throws LCFException
 	{
 		LocalLock ll = getLocalSection(sectionKey);
 
@@ -1084,7 +1084,7 @@
 			}
 			catch (InterruptedException e)
 			{
-				throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 			}
 			catch (ExpiredObjectException e)
 			{
@@ -1100,7 +1100,7 @@
 	* section at a time.
 	*/
 	public void leaveReadCriticalSection(String sectionKey)
-		throws MetacartaException
+		throws LCFException
 	{
 		LocalLock ll = getLocalSection(sectionKey);
 
@@ -1121,17 +1121,17 @@
 					try
 					{
 						lo.leaveReadLock();
-						throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 					}
 					catch (InterruptedException e2)
 					{
 						ll.incrementReadLocks();
-						throw new MetacartaException("Interrupted",e2,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e2,LCFException.INTERRUPTED);
 					}
 					catch (ExpiredObjectException e2)
 					{
 						ll.incrementReadLocks();
-						throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 					}
 				}
 				catch (ExpiredObjectException e)
@@ -1150,7 +1150,7 @@
 	* section at a time.
 	*/
 	public void enterNonExWriteCriticalSection(String sectionKey)
-		throws MetacartaException
+		throws LCFException
 	{
 		LocalLock ll = getLocalSection(sectionKey);
 
@@ -1166,7 +1166,7 @@
 		// Check for illegalities
 		if (ll.hasReadLock())
 		{
-			throw new MetacartaException("Illegal lock sequence: NonExWrite critical section can't be within read critical section",MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Illegal lock sequence: NonExWrite critical section can't be within read critical section",LCFException.GENERAL_ERROR);
 		}
 
 		// We don't own a local non-ex write lock.  Get one.  The global lock will need
@@ -1181,7 +1181,7 @@
 			}
 			catch (InterruptedException e)
 			{
-				throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 			}
 			catch (ExpiredObjectException e)
 			{
@@ -1197,7 +1197,7 @@
 	* section at a time.
 	*/
 	public void leaveNonExWriteCriticalSection(String sectionKey)
-		throws MetacartaException
+		throws LCFException
 	{
 		LocalLock ll = getLocalSection(sectionKey);
 
@@ -1221,17 +1221,17 @@
 					try
 					{
 						lo.leaveNonExWriteLock();
-						throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 					}
 					catch (InterruptedException e2)
 					{
 						ll.incrementNonExWriteLocks();
-						throw new MetacartaException("Interrupted",e2,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e2,LCFException.INTERRUPTED);
 					}
 					catch (ExpiredObjectException e2)
 					{
 						ll.incrementNonExWriteLocks();
-						throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 					}
 				}
 				catch (ExpiredObjectException e)
@@ -1250,7 +1250,7 @@
 	* section at a time.
 	*/
 	public void enterWriteCriticalSection(String sectionKey)
-		throws MetacartaException
+		throws LCFException
 	{
 		LocalLock ll = getLocalSection(sectionKey);
 
@@ -1265,7 +1265,7 @@
 		// Check for illegalities
 		if (ll.hasReadLock() || ll.hasNonExWriteLock())
 		{
-			throw new MetacartaException("Illegal lock sequence: Write lock can't be within read lock or non-ex write lock",MetacartaException.GENERAL_ERROR);
+			throw new LCFException("Illegal lock sequence: Write lock can't be within read lock or non-ex write lock",LCFException.GENERAL_ERROR);
 		}
 
 		// We don't own a local write lock.  Get one.  The global lock will need
@@ -1281,7 +1281,7 @@
 			}
 			catch (InterruptedException e)
 			{
-				throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 			}
 			catch (ExpiredObjectException e)
 			{
@@ -1298,7 +1298,7 @@
 	* section at a time.
 	*/
 	public void leaveWriteCriticalSection(String sectionKey)
-		throws MetacartaException
+		throws LCFException
 	{
 		LocalLock ll = getLocalSection(sectionKey);
 
@@ -1319,17 +1319,17 @@
 					try
 					{
 						lo.leaveWriteLock();
-						throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 					}
 					catch (InterruptedException e2)
 					{
 						ll.incrementWriteLocks();
-						throw new MetacartaException("Interrupted",e2,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e2,LCFException.INTERRUPTED);
 					}
 					catch (ExpiredObjectException e2)
 					{
 						ll.incrementWriteLocks();
-						throw new MetacartaException("Interrupted",e,MetacartaException.INTERRUPTED);
+						throw new LCFException("Interrupted",e,LCFException.INTERRUPTED);
 					}
 				}
 				catch (ExpiredObjectException e)
@@ -1348,7 +1348,7 @@
 	*@param writeSectionKeys is an array of write section descriptors, or null if there are none desired.
 	*/
 	public void enterCriticalSections(String[] readSectionKeys, String[] nonExSectionKeys, String[] writeSectionKeys)
-		throws MetacartaException
+		throws LCFException
 	{
 		// Sort the locks.  This improves the chances of making it through the locking process without
 		// contention!
@@ -1369,7 +1369,7 @@
 					// Check for illegalities
 					if ((ll.hasReadLock() || ll.hasNonExWriteLock()) && !ll.hasWriteLock())
 					{
-						throw new MetacartaException("Illegal lock sequence: Write critical section can't be within read critical section or non-ex write critical section",MetacartaException.GENERAL_ERROR);
+						throw new LCFException("Illegal lock sequence: Write critical section can't be within read critical section or non-ex write critical section",LCFException.GENERAL_ERROR);
 					}
 
 					// See if we already own the write lock for the object
@@ -1397,7 +1397,7 @@
 					// Check for illegalities
 					if (ll.hasReadLock() && !(ll.hasNonExWriteLock() || ll.hasWriteLock()))
 					{
-						throw new MetacartaException("Illegal lock sequence: NonExWrite critical section can't be within read critical section",MetacartaException.GENERAL_ERROR);
+						throw new LCFException("Illegal lock sequence: NonExWrite critical section can't be within read critical section",LCFException.GENERAL_ERROR);
 					}
 
 					// See if we already own the write lock for the object
@@ -1450,7 +1450,7 @@
 		catch (Throwable ex)
 		{
 			// No matter what, undo the locks we've taken
-			MetacartaException ae = null;
+			LCFException ae = null;
 			int errno = 0;
 
 			while (--locksProcessed >= 0)
@@ -1473,7 +1473,7 @@
 						break;
 					}
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					ae = e;
 				}
@@ -1483,14 +1483,14 @@
 			{
 				throw ae;
 			}
-			if (ex instanceof MetacartaException)
+			if (ex instanceof LCFException)
 			{
-				throw (MetacartaException)ex;
+				throw (LCFException)ex;
 			}
 			if (ex instanceof InterruptedException)
 			{
 				// It's InterruptedException
-				throw new MetacartaException("Interrupted",ex,MetacartaException.INTERRUPTED);
+				throw new LCFException("Interrupted",ex,LCFException.INTERRUPTED);
 			}
 			if (!(ex instanceof Error))
 			{
@@ -1506,11 +1506,11 @@
 	*@param writeSectionKeys is an array of write section descriptors, or null if there are none desired.
 	*/
 	public void leaveCriticalSections(String[] readSectionKeys, String[] nonExSectionKeys, String[] writeSectionKeys)
-		throws MetacartaException
+		throws LCFException
 	{
 		LockDescription[] lds = getSortedUniqueLocks(readSectionKeys,nonExSectionKeys,writeSectionKeys);
 		// Free them all... one at a time is fine
-		MetacartaException ae = null;
+		LCFException ae = null;
 		int i = lds.length;
 		while (--i >= 0)
 		{
@@ -1532,7 +1532,7 @@
 					break;
 				}
 			}
-			catch (MetacartaException e)
+			catch (LCFException e)
 			{
 				ae = e;
 			}

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/lockmanager/LockObject.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/lockmanager/LockObject.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/lockmanager/LockObject.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/lockmanager/LockObject.java Wed Feb 17 15:57:27 2010
@@ -19,7 +19,7 @@
 package org.apache.lcf.core.lockmanager;
 
 import org.apache.lcf.core.interfaces.*;
-import org.apache.lcf.core.system.Metacarta;
+import org.apache.lcf.core.system.LCF;
 import org.apache.lcf.core.system.Logging;
 import java.io.*;
 
@@ -77,7 +77,7 @@
 	
 	private static String createFileName(Object lockKey)
 	{
-		return "lock-"+Metacarta.safeFileName(lockKey.toString());
+		return "lock-"+LCF.safeFileName(lockKey.toString());
 	}
 
 	/** This method WILL NOT BE CALLED UNLESS we are actually committing a write lock for the
@@ -116,7 +116,7 @@
 		catch (LockException le2)
 		{
 			// Cross JVM lock; sleep!
-			Metacarta.sleep(10);
+			LCF.sleep(10);
 		}
 	    }
 	}
@@ -220,7 +220,7 @@
 			}
 			catch (LockException le)
 			{
-				Metacarta.sleep(10);
+				LCF.sleep(10);
 				// Loop around
 			}
 		}
@@ -257,7 +257,7 @@
 		catch (LockException le2)
 		{
 			// Cross JVM lock; sleep!
-			Metacarta.sleep(10);
+			LCF.sleep(10);
 		}
 	    }
 	}
@@ -373,7 +373,7 @@
 			}
 			catch (LockException le)
 			{
-				Metacarta.sleep(10);
+				LCF.sleep(10);
 				// Loop around
 			}
 		}
@@ -412,7 +412,7 @@
 			}
 			catch (LockException le)
 			{
-				Metacarta.sleep(10);
+				LCF.sleep(10);
 				// Loop around
 			}
 		}
@@ -531,7 +531,7 @@
 			}
 			catch (LockException le)
 			{
-				Metacarta.sleep(10);
+				LCF.sleep(10);
 				// Loop around
 			}
 		}
@@ -567,7 +567,7 @@
 					e.printStackTrace();
 				}
 				// Winnt sometimes throws an exception when you can't do the lock
-				Metacarta.sleep(100);
+				LCF.sleep(100);
 				continue;
 			}
 		}
@@ -610,7 +610,7 @@
 					e.printStackTrace();
 				}
 				ie = e;
-				Metacarta.sleep(100);
+				LCF.sleep(100);
 				continue;
 			}
 			catch (RuntimeException e)
@@ -629,7 +629,7 @@
 					e.printStackTrace();
 				}
 				ie = e;
-				Metacarta.sleep(100);
+				LCF.sleep(100);
 				continue;
 			}
 		}

Added: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/system/LCF.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/system/LCF.java?rev=911029&view=auto
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/system/LCF.java (added)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/system/LCF.java Wed Feb 17 15:57:27 2010
@@ -0,0 +1,1148 @@
+/* $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.core.system;
+
+import org.apache.lcf.core.interfaces.*;
+import java.io.*;
+import java.util.*;
+import java.security.MessageDigest;
+
+public class LCF
+{
+	public static final String _rcsid = "@(#)$Id$";
+
+
+	// On-exit file delete tracking
+	protected static FileTrack tracker = new FileTrack();
+	// Shutdown thread
+	protected static Thread shutdownThread = new FileCleanupThread();
+	static
+	{
+		try
+		{
+			Runtime.getRuntime().addShutdownHook(shutdownThread);
+		}
+		catch (Exception e)
+		{
+			// Guess we can't do it - dump a trace and continue
+			e.printStackTrace();
+		}
+		catch (Error e)
+		{
+			e.printStackTrace();
+		}
+	}
+
+	// Local member variables
+	protected static String masterDatabaseName = null;
+	protected static String masterDatabaseUsername = null;
+	protected static String masterDatabasePassword = null;
+	protected static java.util.Properties localProperties = null;
+	protected static String configPath = null;
+	protected static long propertyFilelastMod = 0;
+	protected static String propertyFileName = null;
+
+	protected static final String applicationName = "metacarta";
+
+	// Property names
+	public static final String masterDatabaseNameProperty = "org.apache.lcf.database.name";
+	public static final String masterDatabaseUsernameProperty = "org.apache.lcf.database.username";
+	public static final String masterDatabasePasswordProperty = "org.apache.lcf.database.password";
+	
+	public static final String databaseHandleMaxcountProperty = "org.apache.lcf.database.maxhandles";
+	public static final String databaseHandleTimeoutProperty = "org.apache.lcf.database.handletimeout";
+
+	public static final String synchDirectoryProperty = "org.apache.lcf.synchdirectory";
+	public static final String logDirectoryProperty = "org.apache.lcf.logdirectory";
+	public static final String logConfigFileProperty = "org.apache.lcf.logconfigfile";
+
+	/** Hack for BPA */
+	public static final String configSignalCommandProperty = "org.apache.lcf.configuration.change.command";
+	
+	/** Maintenance signal file */
+	public static final String maintenanceFileSignalProperty = "org.apache.lcf.database.maintenanceflag";
+	
+
+	/* Database test
+	public static void main(String[] argv)
+	{
+	    initializeEnvironment();
+	    Reader r = new InputStreamReader(System.in);
+
+	    try
+	    {
+		IThreadContext tc = ThreadContextFactory.make();
+		IDBInterface database = DBInterfaceFactory.make(tc,masterDatabaseName,masterDatabaseUsername,masterDatabasePassword);
+		while (true)
+		{
+			try
+			{
+				try
+				{
+					StringBuffer sb = new StringBuffer();
+					while (true)
+					{
+						int charval = r.read();
+						if (charval == -1)
+							return;
+						if (charval == '\r' || charval == '\n')
+							break;
+						sb.append((char)charval);
+					}
+					String query = sb.toString();
+					System.out.println("Doing query "+query);
+					if (!query.startsWith("select") && !query.startsWith("show"))
+						database.performModification(query,null,null);
+					else
+					{
+						IResultSet set = database.performQuery(query,null,null,null);
+						int i = 0;
+						while (i < set.getRowCount())
+						{
+							IResultRow row = set.getRow(i++);
+							Iterator iter = row.getColumns();
+							while (iter.hasNext())
+							{
+								String colName = (String)iter.next();
+								System.out.println(row.getValue(colName).toString());
+							}
+							System.out.println("-----");
+						}
+					}
+					System.out.println("Done");
+				}
+				catch (LCFException e)
+				{
+					e.printStackTrace();
+				}
+			}
+			catch (IOException e)
+			{
+				e.printStackTrace();
+			}
+		}
+	    }
+	    catch (LCFException e)
+	    {
+		    e.printStackTrace();
+	    }
+	}
+	*/
+	
+	/** Initialize environment.
+	*/
+	public static synchronized void initializeEnvironment()
+	{
+		if (localProperties != null)
+			return;
+
+		try
+		{
+			String defaultLogConfigFile;
+			// Get system properties
+			java.util.Properties props = System.getProperties();
+			String osName = (String)props.get("os.name");
+			boolean isWindows = osName.startsWith("Windows");
+
+			if (isWindows)
+			{
+				// First, look for a define that might indicate where to look
+				configPath = (String)props.get("org.apache.lcf.location");
+				if (configPath == null)
+					configPath = (String)props.get("user.home") + "/"+applicationName;
+				configPath = configPath.replace('\\', '/');
+				propertyFileName = "metacarta.ini";
+				defaultLogConfigFile = new File(configPath,"logging.ini").toString();
+
+				// Make sure both the log path and the config path are present
+				try
+				{
+					ensureFolder(configPath);
+				}
+				catch (LCFException e)
+				{
+					e.printStackTrace();
+				}
+
+			}
+			else
+			{
+				configPath = "/etc/metacarta";
+				defaultLogConfigFile = new File(configPath,"agent-logging.conf").toString();
+				propertyFileName = "agents.conf";
+			}
+
+
+			// Read .ini parameters
+			localProperties = new java.util.Properties();
+			checkProperties();
+
+			String logConfigFile = getProperty(logConfigFileProperty);
+			if (logConfigFile == null)
+				logConfigFile = defaultLogConfigFile;
+
+			masterDatabaseName = getProperty(masterDatabaseNameProperty);
+			if (masterDatabaseName == null)
+				masterDatabaseName = "metacarta";
+			masterDatabaseUsername = getProperty(masterDatabaseUsernameProperty);
+			if (masterDatabaseUsername == null)
+				masterDatabaseUsername = "metacarta";
+			masterDatabasePassword = getProperty(masterDatabasePasswordProperty);
+			if (masterDatabasePassword == null)
+				masterDatabasePassword = "local_pg_passwd";
+
+			Logging.initializeLoggingSystem(logConfigFile);
+
+			// Set up local loggers
+			Logging.initializeLoggers();
+			Logging.setLogLevels();
+
+		}
+		catch (LCFException e)
+		{
+			e.printStackTrace();
+		}
+
+
+	}
+
+	/** Reloads properties as needed.
+	*/
+	public static final void checkProperties()
+		throws LCFException
+	{
+		File f = new File(getConfigPath(),propertyFileName);	// for re-read
+		try
+		{
+			if (propertyFilelastMod != f.lastModified())
+			{
+				InputStream is = new FileInputStream(f);
+				try
+				{
+					localProperties.load(is);
+					//System.err.println("Loaded configuration properties: '" + f.toString() + "'");
+					propertyFilelastMod = f.lastModified();
+				}
+				finally
+				{
+					is.close();
+				}
+			}
+		}
+		catch (Exception e)
+		{
+			throw new LCFException("Could not read property file '"+f.toString()+"'",e);
+		}
+	}
+
+
+	/** Get the path where all config files are.
+	*@return the path.
+	*/
+	public static final String getConfigPath()
+	{
+		return configPath;
+	}
+
+	/** Read a property.
+	*@param s is the property name.
+	*@return the property value, as an object.
+	*/
+	public static final String getProperty(String s)
+	{
+		return localProperties.getProperty(s);
+	}
+
+	/** Attempt to make sure a path is a folder
+	* @param path
+	*/
+	public static void ensureFolder(String path)
+		throws LCFException
+	{
+		try
+		{
+			File f = new File(path);
+			if (!f.isDirectory())
+			{
+				f.mkdirs();
+			}
+		}
+		catch (Exception e)
+		{
+			throw new LCFException("Can't make folder",e,LCFException.GENERAL_ERROR);
+		}
+	}
+
+	/** Delete a folder path.
+	*@param path is the folder path.
+	*/
+	public static void deleteFolder(String path)
+	{
+		File directoryPath = new File(path);
+		recursiveDelete(directoryPath);
+	}
+
+	/** Recursive delete: for cleaning up company folder.
+	*@param directoryPath is the File describing the directory to be removed.
+	*/
+	protected static void recursiveDelete(File directoryPath)
+	{
+		File[] children = directoryPath.listFiles();
+		if (children != null)
+		{
+			int i = 0;
+			while (i < children.length)
+			{
+				File x = children[i++];
+				if (x.isDirectory())
+					recursiveDelete(x);
+				else
+					x.delete();
+			}
+		}
+		directoryPath.delete();
+	}
+
+	/** Discover if a path is a folder
+	* @param path spec, 'unix' form mostly
+	*/
+	public static boolean isFolder(String path)
+	{
+		File f = new File(path);
+		return f.isDirectory();
+	}
+
+	/** Convert a string into a safe, unique filename.
+	*@param value is the string.
+	*@return the file name.
+	*/
+	public static String safeFileName(String value)
+	{
+		StringBuffer rval = new StringBuffer();
+		int i = 0;
+		while (i < value.length())
+		{
+			char x = value.charAt(i++);
+			if (x == '/' || x == '"' || x == '\\' || x == '|' || (x >= 0 && x < ' ') ||
+				x == '+' || x == ',' || x == ':' || x == ';' || x == '<' || x == '>' ||
+				x == '=' || x == '[' || x == ']' || x == '&')
+			{
+				// Stuff the character
+				rval.append("&").append(Integer.toString((int)x)).append("!");
+			}
+			else
+				rval.append(x);
+		}
+		return rval.toString();
+	}
+
+	/** Get the master database name.
+	*@return the master database name
+	*/
+	public static String getMasterDatabaseName()
+	{
+		return masterDatabaseName;
+	}
+
+	/** Get the master database username.
+	*@return the master database username.
+	*/
+	public static String getMasterDatabaseUsername()
+	{
+		return masterDatabaseUsername;
+	}
+
+	/** Get the master database password.
+	*@return the master database password.
+	*/
+	public static String getMasterDatabasePassword()
+	{
+		return masterDatabasePassword;
+	}
+
+	/** Find a child database name given a company database instance and the child
+	* database identifier.
+	*@param companyDatabase is the company database.
+	*@param childDBIdentifier is the identifier.
+	*@return the child database name.
+	*/
+	public static String getChildDatabaseName(IDBInterface companyDatabase, String childDBIdentifier)
+	{
+		return companyDatabase.getDatabaseName()+"_"+childDBIdentifier;
+	}
+
+	/** Perform standard hashing of a string
+	 *  @param input is the string to hash.
+	 *  @return the encrypted string.
+	 *   */
+	public static String hash(String input)
+		throws LCFException
+	{
+		return encrypt(input);
+	}
+
+	/** Start creating a hash
+	*/
+	public static MessageDigest startHash()
+		throws LCFException
+	{
+		try
+		{
+			return MessageDigest.getInstance("SHA");
+		}
+		catch (Exception e)
+		{
+			throw new LCFException("Couldn't encrypt: "+e.getMessage(),e,LCFException.GENERAL_ERROR);
+		}
+	}
+
+	/** Add to hash
+	*/
+	public static void addToHash(MessageDigest digest, String input)
+		throws LCFException
+	{
+		try
+		{
+			byte[] inputBytes = input.getBytes("UTF-8");
+			digest.update(inputBytes);
+		}
+		catch (Exception e)
+		{
+			throw new LCFException("Couldn't encrypt: "+e.getMessage(),e,LCFException.GENERAL_ERROR);
+		}
+	}
+	
+	/** Calculate final hash value
+	*/
+	public static String getHashValue(MessageDigest digest)
+		throws LCFException
+	{
+		try
+		{
+			byte[] encryptedBytes = digest.digest();
+			StringBuffer rval = new StringBuffer();
+			int i = 0;
+			while (i < encryptedBytes.length)
+			{
+				byte x = encryptedBytes[i++];
+				rval.append(writeNibble((((int)x) >> 4) & 15));
+				rval.append(writeNibble(((int)x) & 15));
+			}
+			return rval.toString();
+		}
+		catch (Exception e)
+		{
+			throw new LCFException("Couldn't encrypt: "+e.getMessage(),e,LCFException.GENERAL_ERROR);
+		}
+	}
+	
+	/** Perform standard one-way encryption of a string.
+	*@param input is the string to encrypt.
+	*@return the encrypted string.
+	*/
+	public static String encrypt(String input)
+		throws LCFException
+	{
+		MessageDigest hash = startHash();
+		addToHash(hash,input);
+		return getHashValue(hash);
+	}
+
+	/** Encode a string in a reversible obfuscation.
+	*@param input is the input string.
+	*@return the output string.
+	*/
+	public static String obfuscate(String input)
+		throws LCFException
+	{
+	    try
+	    {
+		if (input == null)
+			return null;
+		if (input.length() == 0)
+			return input;
+		// First, convert to binary
+		byte[] array = input.getBytes("UTF-8");
+		// Shift and xor
+		// We shift by some number not a multiple of 4.
+		// The resulting hexadecimal is then not a simple shift.
+		int i = 0;
+		int carryover = (((int)array[array.length-1]) & 0x1f);
+		while (i < array.length)
+		{
+			int x = (int)array[i];
+			int newCarryover = x & 0x1f;
+			x = ((x >> 5) & 0x7) + (carryover << 3);
+			carryover = newCarryover;
+			array[i++] = (byte)(x ^ 0x59);
+		}
+		// Now, convert to hex
+		StringBuffer rval = new StringBuffer();
+		i = 0;
+		while (i < array.length)
+		{
+			int x = (int)array[i++];
+			rval.append(writeNibble((x >> 4) & 0x0f));
+			rval.append(writeNibble(x & 0x0f));
+		}
+		return rval.toString();
+	    }
+	    catch (java.io.UnsupportedEncodingException e)
+	    {
+		throw new LCFException("UTF-8 not supported",e,LCFException.GENERAL_ERROR);
+	    }
+	}
+
+	/** Write a hex nibble.
+	*@param value is the value to write.
+	*@return the character.
+	*/
+	protected static char writeNibble(int value)
+	{
+		if (value >= 10)
+			return (char)(value-10+'A');
+		else
+			return (char)(value+'0');
+	}
+
+	/** Decode a string encoded using the obfuscation
+	* technique.
+	*@param input is the input string.
+	*@return the decoded string.
+	*/
+	public static String deobfuscate(String input)
+		throws LCFException
+	{
+	    try
+	    {
+		if (input == null)
+			return null;
+		if (input.length() == 0)
+			return input;
+
+		if ((input.length() >> 1) * 2 != input.length())
+			throw new LCFException("Decoding error",LCFException.GENERAL_ERROR);
+
+		byte[] bytes = new byte[input.length() >> 1];
+		int i = 0;
+		int j = 0;
+		while (i < input.length())
+		{
+			int x0 = readNibble(input.charAt(i++));
+			int x1 = readNibble(input.charAt(i++));
+			int x = (x0 << 4) + x1;
+			bytes[j++] = (byte)x;
+		}
+
+		// Process the array in reverse order
+		int carryover = ((((int)bytes[0]) ^ 0x59) >> 3) & 0x1f;
+		i = bytes.length;
+		while (i > 0)
+		{
+			i--;
+			int x = ((int)bytes[i]) ^ 0x59;
+			int newCarryover = (x >> 3) & 0x1f;
+			x = (x << 5) + carryover;
+			bytes[i] = (byte)x;
+			carryover = newCarryover;
+		}
+			
+		// Convert from utf-8 to a string
+		return new String(bytes,"UTF-8");
+	    }
+	    catch (java.io.UnsupportedEncodingException e)
+	    {
+		throw new LCFException("UTF-8 unsupported",e,LCFException.GENERAL_ERROR);
+	    }
+	}
+
+	/** Read a hex nibble.
+	*@param value is the character.
+	*@return the value.
+	*/
+	protected static int readNibble(char value)
+		throws LCFException
+	{
+		if (value >= 'A' && value <= 'F')
+			return (int)(value - 'A' + 10);
+		else if (value >= '0' && value <= '9')
+			return (int)(value - '0');
+		else
+			throw new LCFException("Bad hexadecimal value",LCFException.GENERAL_ERROR);
+	}
+
+
+	/** Install system database.
+	*@param threadcontext is the thread context.
+	*@param masterName is the master database name ("mysql" for mysql).
+	*@param masterUsername is the master database user name.
+	*@param masterPassword is the master database password.
+	*/
+	public static void createSystemDatabase(IThreadContext threadcontext, String masterName,
+		String masterUsername, String masterPassword)
+		throws LCFException
+	{
+		String databaseName = getMasterDatabaseName();
+		String databaseUsername = getMasterDatabaseUsername();
+		String databasePassword = getMasterDatabasePassword();
+
+		IDBInterface master = DBInterfaceFactory.make(threadcontext,masterName,masterUsername,masterPassword);
+		// Ideally, check for existence of metacarta user.  In fact, we don't
+		// have a hook for this.  So, attempt the create, and interpret failure as
+		// meaning "user already exists".
+		if (master.lookupUser(databaseUsername,null,null) == false)
+		{
+			master.performCreateUser(databaseUsername,databasePassword);
+		}
+
+		if (master.lookupDatabase(databaseName,null,null) == false)
+		{
+			master.performCreateDatabase(databaseName,databaseUsername,databasePassword,null);
+		}
+	}
+
+	/** Drop system database.
+	*@param threadcontext is the thread context.
+	*@param masterName is the master database name ("mysql" for mysql).
+	*@param masterUsername is the master database user name.
+	*@param masterPassword is the master database password.
+	*/
+	public static void dropSystemDatabase(IThreadContext threadcontext, String masterName,
+		String masterUsername, String masterPassword)
+		throws LCFException
+	{
+		IDBInterface master = DBInterfaceFactory.make(threadcontext,masterName,masterUsername,masterPassword);
+		master.performDropDatabase(getMasterDatabaseName(),null);
+		master.performDropUser(getMasterDatabaseUsername());
+	}
+
+	/** Add a file to the tracking system. */
+	public static void addFile(File f)
+	{
+		tracker.addFile(f);
+	}
+
+	/** Use the tracking system to delete a file.  You MUST use this to
+	* delete any file that was added to the tracking system with addFile(). */
+	public static void deleteFile(File f)
+	{
+		tracker.deleteFile(f);
+	}
+
+	/** Check if maintenance is underway.
+	*/
+	public static boolean checkMaintenanceUnderway()
+	{
+		String fileToCheck = getProperty(maintenanceFileSignalProperty);
+		if (fileToCheck != null && fileToCheck.length() > 0)
+		{
+			File f = new File(fileToCheck);
+			return f.exists();
+		}
+		return false;
+	}
+	
+	/** Note configuration change.
+	*/
+	public static void noteConfigurationChange()
+		throws LCFException
+	{
+		String configChangeSignalCommand = getProperty(configSignalCommandProperty);
+		if (configChangeSignalCommand == null || configChangeSignalCommand.length() == 0)
+			return;
+		
+		// Do stuff to the file to note change.  This involves
+		// shelling out to the os and involving whatever is desired.
+
+		// We should try to convert the command into arguments.
+		ArrayList list = new ArrayList();
+		int currentIndex = 0;
+		while (currentIndex < configChangeSignalCommand.length())
+		{
+		    // Suck up the leading whitespace
+		    while (currentIndex < configChangeSignalCommand.length())
+		    {
+			char x = configChangeSignalCommand.charAt(currentIndex);
+			if (x < 0 || x > ' ')
+			    break;
+			currentIndex++;
+		    }
+		    StringBuffer argBuffer = new StringBuffer();
+		    boolean isQuoted = false;
+		    while (currentIndex < configChangeSignalCommand.length())
+		    {
+			char x = configChangeSignalCommand.charAt(currentIndex);
+			if (isQuoted)
+			{
+			    if (x == '"')
+			    {
+				currentIndex++;
+				isQuoted = false;
+			    }
+			    else if (x == '\\')
+			    {
+				currentIndex++;
+				if (currentIndex < configChangeSignalCommand.length())
+				{
+					x = configChangeSignalCommand.charAt(currentIndex);
+					argBuffer.append(x);
+				}
+				else
+					break;
+			    }
+			    else
+			    {
+				currentIndex++;
+				argBuffer.append(x);
+			    }
+			}
+			else
+			{
+				if (x == '"')
+				{
+					currentIndex++;
+					isQuoted = true;
+				}
+				else if (x == '\\')
+				{
+					currentIndex++;
+					if (currentIndex < configChangeSignalCommand.length())
+					{
+						x = configChangeSignalCommand.charAt(currentIndex);
+						argBuffer.append(x);
+					}
+					else
+						break;
+				}
+				else if (x >= 0 && x <= ' ')
+					break;
+				else
+				{
+					currentIndex++;
+					argBuffer.append(x);
+				}
+			}
+		    }
+		    list.add(argBuffer.toString());
+		}
+		
+		// Set up for command invocation
+		String[] commandArray = new String[list.size()];
+		int i = 0;
+		while (i < commandArray.length)
+		{
+			commandArray[i] = (String)list.get(i);
+			i++;
+		}
+		
+		if (commandArray.length == 0)
+			return;
+		
+		String[] env = new String[0];
+		File dir = new File("/");
+		
+		try
+		{
+			// Do the exec.
+			Process p = Runtime.getRuntime().exec(commandArray,env,dir);
+			try
+			{
+				// To make this truly "safe", we really ought to spin up a thread to handle both the standard error and the standard output streams - otherwise
+				// we run the risk of getting blocked here.  In practice, there's enough buffering in the OS to handle what we need right now.
+				int rval = p.waitFor();
+				if (rval != 0)
+				{
+				    InputStream is = p.getErrorStream();
+				    try
+				    {
+					Reader r = new InputStreamReader(is);
+					try
+					{
+					    BufferedReader br = new BufferedReader(r);
+					    try
+					    {
+						StringBuffer sb = new StringBuffer();
+						while (true)
+						{
+						    String value = br.readLine();
+						    if (value == null)
+							break;
+						    sb.append(value).append("; ");
+						}
+						throw new LCFException("Shelled process '"+configChangeSignalCommand+"' failed with error "+Integer.toString(rval)+": "+sb.toString());
+					    }
+					    finally
+					    {
+						br.close();
+					    }
+					}
+					finally
+					{
+					    r.close();
+					}
+				    }
+				    finally
+				    {
+					is.close();
+				    }
+				}
+			}
+			finally
+			{
+				p.destroy();
+			}
+		}
+		catch (InterruptedException e)
+		{
+			throw new LCFException("Process wait interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+		}
+		catch (InterruptedIOException e)
+		{
+			throw new LCFException("IO with subprocess interrupted: "+e.getMessage(),e,LCFException.INTERRUPTED);
+		}
+		catch (IOException e)
+		{
+			throw new LCFException("IO exception signalling change: "+e.getMessage(),e);
+		}
+	}
+
+	/** Use this method to sleep instead of Thread.sleep().  Thread.sleep() doesn't seem to work well when the system
+	* time is reset.
+	*/
+	public static void sleep(long milliseconds)
+		throws InterruptedException
+	{
+		// Unfortunately we need to create an object for every time that we sleep
+		Integer x = new Integer(0);
+		synchronized (x)
+		{
+			x.wait(milliseconds);
+		}
+	}
+
+	/** Write a bunch of bytes to the output stream */
+	public static void writeBytes(OutputStream os, byte[] byteArray)
+		throws IOException
+	{
+		os.write(byteArray,0,byteArray.length);
+	}
+	
+	/** Write a byte to an output stream */
+	public static void writeByte(OutputStream os, int byteValue)
+		throws IOException
+	{
+		writeBytes(os,new byte[]{(byte)byteValue});
+	}
+
+	/** Write a word to an output stream */
+	public static void writeWord(OutputStream os, int wordValue)
+		throws IOException
+	{
+		byte[] buffer = new byte[2];
+		buffer[0] = (byte)(wordValue & 0xff);
+		buffer[1] = (byte)((wordValue >>> 8) & 0xff);
+		writeBytes(os,buffer);
+	}
+
+	/** Write a dword to an output stream */
+	public static void writeDword(OutputStream os, int dwordValue)
+		throws IOException
+	{
+		if (dwordValue < 0)
+			throw new IllegalArgumentException("Attempt to use an unsigned operator to write a signed value");
+		writeSdword(os,dwordValue);
+	}
+
+	/** Write a signed dword to an output stream */
+	public static void writeSdword(OutputStream os, int dwordValue)
+		throws IOException
+	{
+		byte[] buffer = new byte[4];
+		buffer[0] = (byte)(dwordValue & 0xff);
+		buffer[1] = (byte)((dwordValue >>> 8) & 0xff);
+		buffer[2] = (byte)((dwordValue >>> 16) & 0xff);
+		buffer[3] = (byte)((dwordValue >>> 24) & 0xff);
+		writeBytes(os,buffer);
+	}
+
+	/** Write a Long to an output stream */
+	public static void writeLong(OutputStream os, Long longValue)
+		throws IOException
+	{
+		if (longValue == null)
+			writeByte(os,1);
+		else
+		{
+			writeByte(os,0);
+			long value = longValue.longValue();
+			byte[] buffer = new byte[8];
+			buffer[0] = (byte)(value & 0xff);
+			buffer[1] = (byte)(Long.rotateRight(value,8) & 0xff);
+			buffer[2] = (byte)(Long.rotateRight(value,16) & 0xff);
+			buffer[3] = (byte)(Long.rotateRight(value,24) & 0xff);
+			buffer[4] = (byte)(Long.rotateRight(value,32) & 0xff);
+			buffer[5] = (byte)(Long.rotateRight(value,40) & 0xff);
+			buffer[6] = (byte)(Long.rotateRight(value,48) & 0xff);
+			buffer[7] = (byte)(Long.rotateRight(value,56) & 0xff);
+			writeBytes(os,buffer);
+		}
+	}
+	
+	/** Write a String to an output stream */
+	public static void writeString(OutputStream os, String stringValue)
+		throws IOException
+	{
+		byte[] characters;
+		if (stringValue == null)
+			characters = null;
+		else
+			characters = stringValue.getBytes("utf-8");
+		writeByteArray(os,characters);
+	}
+	
+	/** Write a byte array to an output stream */
+	public static void writeByteArray(OutputStream os, byte[] byteArray)
+		throws IOException
+	{
+		if (byteArray == null)
+			writeSdword(os,-1);
+		else
+		{
+			writeSdword(os,byteArray.length);
+			writeBytes(os,byteArray);
+		}
+	}
+
+	/** Write a float value to an output stream */
+	public static void writefloat(OutputStream os, float floatValue)
+		throws IOException
+	{
+		writeSdword(os,Float.floatToIntBits(floatValue));
+	}
+	
+	/** Read  bytes from the input stream into specified array. */
+	public static void readBytes(InputStream is, byte[] byteArray)
+		throws IOException
+	{
+		int amtSoFar = 0;
+		while (amtSoFar < byteArray.length)
+		{
+			int amt = is.read(byteArray,amtSoFar,byteArray.length-amtSoFar);
+			if (amt == -1)
+				throw new IOException("Unexpected EOF");
+			amtSoFar += amt;
+		}
+	}
+	
+	/** Read a byte from an input stream */
+	public static int readByte(InputStream is)
+		throws IOException
+	{
+		byte[] inputArray = new byte[1];
+		readBytes(is,inputArray);
+		return ((int)inputArray[0]) & 0xff;
+	}
+		
+	/** Read a word from an input stream */
+	public static int readWord(InputStream is)
+		throws IOException
+	{
+		byte[] inputArray = new byte[2];
+		readBytes(is,inputArray);
+		return (((int)inputArray[0]) & 0xff) +
+			((((int)inputArray[1]) & 0xff) << 8);
+	}
+
+	/** Read a dword from an input stream */
+	public static int readDword(InputStream is)
+		throws IOException
+	{
+		byte[] inputArray = new byte[4];
+		readBytes(is,inputArray);
+		return (((int)inputArray[0]) & 0xff) +
+			((((int)inputArray[1]) & 0xff) << 8) +
+			((((int)inputArray[2]) & 0xff) << 16) +
+			((((int)inputArray[3]) & 0xff) << 24);
+	}
+
+	/** Read a signed dword from an input stream */
+	public static int readSdword(InputStream is)
+		throws IOException
+	{
+		byte[] inputArray = new byte[4];
+		readBytes(is,inputArray);
+		return (((int)inputArray[0]) & 0xff) +
+			((((int)inputArray[1]) & 0xff) << 8) +
+			((((int)inputArray[2]) & 0xff) << 16) +
+			(((int)inputArray[3]) << 24);
+	}
+
+	/** Read a Long from an input stream */
+	public static Long readLong(InputStream is)
+		throws IOException
+	{
+		int value = readByte(is);
+		if (value == 1)
+			return null;
+		byte[] inputArray = new byte[8];
+		readBytes(is,inputArray);
+		return new Long((long)(((int)inputArray[0]) & 0xff) +
+			Long.rotateLeft(((int)inputArray[1]) & 0xff, 8) +
+			Long.rotateLeft(((int)inputArray[2]) & 0xff, 16) +
+			Long.rotateLeft(((int)inputArray[3]) & 0xff, 24) +
+			Long.rotateLeft(((int)inputArray[4]) & 0xff, 32) +
+			Long.rotateLeft(((int)inputArray[5]) & 0xff, 40) +
+			Long.rotateLeft(((int)inputArray[6]) & 0xff, 48) +
+			Long.rotateLeft(((int)inputArray[7]) & 0xff, 56));
+
+	}
+	
+	/** Read a String from an input stream */
+	public static String readString(InputStream is)
+		throws IOException
+	{
+		byte[] bytes = readByteArray(is);
+		if (bytes == null)
+			return null;
+		return new String(bytes,"utf-8");
+	}
+	
+	/** Read a byte array from an input stream */
+	public static byte[] readByteArray(InputStream is)
+		throws IOException
+	{
+		int length = readSdword(is);
+		if (length == -1)
+			return null;
+		byte[] byteArray = new byte[length];
+		readBytes(is,byteArray);
+		return byteArray;
+	}
+
+	/** Read a float value from an input stream */
+	public static float readfloat(InputStream os)
+		throws IOException
+	{
+		return Float.intBitsToFloat(readSdword(os));
+	}
+
+	/** Class that tracks files that need to be cleaned up on exit */
+	protected static class FileTrack
+	{
+		/** Key and value are both File objects */
+		protected HashMap filesToDelete = new HashMap();
+
+		/** Constructor */
+		public FileTrack()
+		{
+		}
+
+		/** Add a file to track */
+		public synchronized void addFile(File f)
+		{
+			filesToDelete.put(f,f);
+		}
+
+		/** Delete a file */
+		public synchronized void deleteFile(File f)
+		{
+			f.delete();
+			filesToDelete.remove(f);
+		}
+
+		/** Delete all remaining files */
+		public synchronized void cleanUpAll()
+		{
+			Iterator iter = filesToDelete.keySet().iterator();
+			while (iter.hasNext())
+			{
+				File f = (File)iter.next();
+				f.delete();
+			}
+			filesToDelete.clear();
+		}
+		
+		/** Finalizer, which is designed to catch class unloading that tomcat 5.5 does.
+		*/
+		protected void finalize()
+			throws Throwable
+		{
+			try
+			{
+				cleanUpAll();
+			}
+			finally
+			{
+				super.finalize();
+			}
+		}
+
+	}
+
+	/** Finisher thread, to be registered with the runtime */
+	protected static class FileCleanupThread extends Thread
+	{
+		/** Constructor.
+		*/
+		public FileCleanupThread()
+		{
+			super();
+			setName("File cleanup thread");
+		}
+
+		public void run()
+		{
+		        // Clean up the database handles
+			Thread t = new DatabaseConnectionReleaseThread();
+			t.start();
+			try
+			{
+				// Wait 15 seconds for database cleanup to finish.  If we haven't managed to close database connections by then, we give up and just exit.
+				t.join(15000L);
+			}
+			catch (InterruptedException e)
+			{
+			}
+			// Cleanup temp files
+			if (tracker != null)
+				tracker.cleanUpAll();
+		}
+	}
+
+	/** The thread that actually releases database connections
+	*/
+	protected static class DatabaseConnectionReleaseThread extends Thread
+	{
+		/** Constructor. */
+		public DatabaseConnectionReleaseThread()
+		{
+			super();
+			setName("Database connection release thread");
+			// May be abandoned if it takes too long
+			setDaemon(true);
+		}
+		
+		public void run()
+		{
+		        // Clean up the database handles
+		        org.apache.lcf.core.database.ConnectionFactory.releaseAll();
+		}
+	}
+}
+

Modified: incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/system/Logging.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/system/Logging.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/system/Logging.java (original)
+++ incubator/lcf/trunk/modules/framework/core/org/apache/lcf/core/system/Logging.java Wed Feb 17 15:57:27 2010
@@ -72,7 +72,7 @@
 		// Initialize the logger
 		PropertyConfigurator.configure(logConfigFile);
 
-		//System.err.println("Metacarta logger setup complete");
+		//System.err.println("LCF logger setup complete");
 	}
 
 	/** Set up loggers used by core package.
@@ -107,7 +107,7 @@
 			String loggername = (String)e.getKey();
 
 			// logger level
-			String level = Metacarta.getProperty(loggername);
+			String level = LCF.getProperty(loggername);
 
 			Level loglevel = null;
 			if (level != null && level.length() > 0)

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/adminDefaults.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/adminDefaults.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/adminDefaults.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/adminDefaults.jsp Wed Feb 17 15:57:27 2010
@@ -28,7 +28,7 @@
 %>
 
 <%
-	org.apache.lcf.crawler.system.Metacarta.initializeEnvironment();
+	org.apache.lcf.crawler.system.LCF.initializeEnvironment();
 %>
 
 <jsp:useBean id="thread" class="org.apache.lcf.ui.beans.ThreadContext" scope="request"/>

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/adminHeaders.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/adminHeaders.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/adminHeaders.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/adminHeaders.jsp Wed Feb 17 15:57:27 2010
@@ -35,7 +35,7 @@
 <%@ page import="java.util.*" %>
 
 <%
-	org.apache.lcf.crawler.system.Metacarta.initializeEnvironment();
+	org.apache.lcf.crawler.system.LCF.initializeEnvironment();
 %>
 
 <jsp:useBean id="thread" class="org.apache.lcf.ui.beans.ThreadContext" scope="request"/>

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/documentstatus.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/documentstatus.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/documentstatus.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/documentstatus.jsp Wed Feb 17 15:57:27 2010
@@ -20,7 +20,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-boolean maintenanceUnderway = org.apache.lcf.crawler.system.Metacarta.checkMaintenanceUnderway();
+boolean maintenanceUnderway = org.apache.lcf.crawler.system.LCF.checkMaintenanceUnderway();
 
 %>
 

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/editauthority.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/editauthority.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/editauthority.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/editauthority.jsp Wed Feb 17 15:57:27 2010
@@ -464,7 +464,7 @@
 
 <%
     }
-    catch (MetacartaException e)
+    catch (LCFException e)
     {
 	e.printStackTrace();
 	variableContext.setParameter("text",e.getMessage());

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/editconnection.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/editconnection.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/editconnection.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/editconnection.jsp Wed Feb 17 15:57:27 2010
@@ -705,7 +705,7 @@
 
 <%
     }
-    catch (MetacartaException e)
+    catch (LCFException e)
     {
 	e.printStackTrace();
 	variableContext.setParameter("text",e.getMessage());

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/editjob.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/editjob.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/editjob.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/editjob.jsp Wed Feb 17 15:57:27 2010
@@ -1380,7 +1380,7 @@
 
 <%
     }
-    catch (MetacartaException e)
+    catch (LCFException e)
     {
 	e.printStackTrace();
 	variableContext.setParameter("text",e.getMessage());

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/editoutput.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/editoutput.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/editoutput.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/editoutput.jsp Wed Feb 17 15:57:27 2010
@@ -484,7 +484,7 @@
 
 <%
     }
-    catch (MetacartaException e)
+    catch (LCFException e)
     {
 	e.printStackTrace();
 	variableContext.setParameter("text",e.getMessage());

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/execute.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/execute.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/execute.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/execute.jsp Wed Feb 17 15:57:27 2010
@@ -81,7 +81,7 @@
 					{
 						job = manager.load(new Long(jobID));
 						if (job == null)
-							throw new MetacartaException("No such job: "+jobID);
+							throw new LCFException("No such job: "+jobID);
 					}
 
 					// Gather all the data from the form.
@@ -266,7 +266,7 @@
 <%
 
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					e.printStackTrace();
 					variableContext.setParameter("text",e.getMessage());
@@ -315,7 +315,7 @@
 					<jsp:forward page="viewoutput.jsp"/>
 <%
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					e.printStackTrace();
 					variableContext.setParameter("text",e.getMessage());
@@ -409,7 +409,7 @@
 					<jsp:forward page="viewconnection.jsp"/>
 <%
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					e.printStackTrace();
 					variableContext.setParameter("text",e.getMessage());
@@ -458,7 +458,7 @@
 					<jsp:forward page="viewauthority.jsp"/>
 <%
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					e.printStackTrace();
 					variableContext.setParameter("text",e.getMessage());
@@ -538,13 +538,13 @@
 				{
 					String jobID = variableContext.getParameter("jobid");
 					if (jobID == null)
-						throw new MetacartaException("Missing job parameter");
+						throw new LCFException("Missing job parameter");
 					manager.deleteJob(new Long(jobID));
 %>
 					<jsp:forward page="listjobs.jsp"/>
 <%
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					e.printStackTrace();
 					variableContext.setParameter("text",e.getMessage());
@@ -560,13 +560,13 @@
 				{
 					String connectionName = variableContext.getParameter("connname");
 					if (connectionName == null)
-						throw new MetacartaException("Missing connection parameter");
+						throw new LCFException("Missing connection parameter");
 					outputManager.delete(connectionName);
 %>
 					<jsp:forward page="listoutputs.jsp"/>
 <%
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					e.printStackTrace();
 					variableContext.setParameter("text",e.getMessage());
@@ -582,13 +582,13 @@
 				{
 					String connectionName = variableContext.getParameter("connname");
 					if (connectionName == null)
-						throw new MetacartaException("Missing connection parameter");
+						throw new LCFException("Missing connection parameter");
 					connManager.delete(connectionName);
 %>
 					<jsp:forward page="listconnections.jsp"/>
 <%
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					e.printStackTrace();
 					variableContext.setParameter("text",e.getMessage());
@@ -604,13 +604,13 @@
 				{
 					String connectionName = variableContext.getParameter("connname");
 					if (connectionName == null)
-						throw new MetacartaException("Missing connection parameter");
+						throw new LCFException("Missing connection parameter");
 					authConnManager.delete(connectionName);
 %>
 					<jsp:forward page="listauthorities.jsp"/>
 <%
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					e.printStackTrace();
 					variableContext.setParameter("text",e.getMessage());
@@ -769,7 +769,7 @@
 		<jsp:forward page="index.jsp"/>
 <%
 	}
-	catch (MetacartaException e)
+	catch (LCFException e)
 	{
 		e.printStackTrace();
 		variableContext.setParameter("text",e.getMessage());

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/listauthorities.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/listauthorities.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/listauthorities.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/listauthorities.jsp Wed Feb 17 15:57:27 2010
@@ -116,7 +116,7 @@
 
 <%
     }
-    catch (MetacartaException e)
+    catch (LCFException e)
     {
 	e.printStackTrace();
 	variableContext.setParameter("text",e.getMessage());

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/listconnections.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/listconnections.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/listconnections.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/listconnections.jsp Wed Feb 17 15:57:27 2010
@@ -117,7 +117,7 @@
 
 <%
     }
-    catch (MetacartaException e)
+    catch (LCFException e)
     {
 	e.printStackTrace();
 	variableContext.setParameter("text",e.getMessage());

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/listjobs.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/listjobs.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/listjobs.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/listjobs.jsp Wed Feb 17 15:57:27 2010
@@ -120,7 +120,7 @@
 
 <%
     }
-    catch (MetacartaException e)
+    catch (LCFException e)
     {
 	e.printStackTrace();
 	variableContext.setParameter("text",e.getMessage());

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/listoutputs.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/listoutputs.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/listoutputs.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/listoutputs.jsp Wed Feb 17 15:57:27 2010
@@ -118,7 +118,7 @@
 
 <%
     }
-    catch (MetacartaException e)
+    catch (LCFException e)
     {
 	e.printStackTrace();
 	variableContext.setParameter("text",e.getMessage());

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/maxactivityreport.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/maxactivityreport.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/maxactivityreport.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/maxactivityreport.jsp Wed Feb 17 15:57:27 2010
@@ -20,7 +20,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-boolean maintenanceUnderway = org.apache.lcf.crawler.system.Metacarta.checkMaintenanceUnderway();
+boolean maintenanceUnderway = org.apache.lcf.crawler.system.LCF.checkMaintenanceUnderway();
 
 %>
 

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/maxbandwidthreport.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/maxbandwidthreport.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/maxbandwidthreport.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/maxbandwidthreport.jsp Wed Feb 17 15:57:27 2010
@@ -20,7 +20,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-boolean maintenanceUnderway = org.apache.lcf.crawler.system.Metacarta.checkMaintenanceUnderway();
+boolean maintenanceUnderway = org.apache.lcf.crawler.system.LCF.checkMaintenanceUnderway();
 
 %>
 

Modified: incubator/lcf/trunk/modules/framework/crawler-ui/queuestatus.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/crawler-ui/queuestatus.jsp?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/crawler-ui/queuestatus.jsp (original)
+++ incubator/lcf/trunk/modules/framework/crawler-ui/queuestatus.jsp Wed Feb 17 15:57:27 2010
@@ -20,7 +20,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-boolean maintenanceUnderway = org.apache.lcf.crawler.system.Metacarta.checkMaintenanceUnderway();
+boolean maintenanceUnderway = org.apache.lcf.crawler.system.LCF.checkMaintenanceUnderway();
 
 %>
 



Mime
View raw message