Return-Path: Delivered-To: apmail-incubator-connectors-commits-archive@minotaur.apache.org Received: (qmail 49301 invoked from network); 4 Oct 2010 14:33:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Oct 2010 14:33:53 -0000 Received: (qmail 86811 invoked by uid 500); 4 Oct 2010 14:33:53 -0000 Delivered-To: apmail-incubator-connectors-commits-archive@incubator.apache.org Received: (qmail 86743 invoked by uid 500); 4 Oct 2010 14:33:52 -0000 Mailing-List: contact connectors-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: connectors-dev@incubator.apache.org Delivered-To: mailing list connectors-commits@incubator.apache.org Received: (qmail 86735 invoked by uid 99); 4 Oct 2010 14:33:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Oct 2010 14:33:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED,WEIRD_QUOTING X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Oct 2010 14:33:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 092792388C72; Mon, 4 Oct 2010 14:32:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1004255 [23/24] - in /incubator/lcf/trunk: modules/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ modules/connectors/documentum/connector/src/main/java/org/apache/manifoldc... Date: Mon, 04 Oct 2010 14:32:28 -0000 To: connectors-commits@incubator.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101004143235.092792388C72@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ResetManager.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ResetManager.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ResetManager.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ResetManager.java Mon Oct 4 14:32:19 2010 @@ -72,7 +72,7 @@ public abstract class ResetManager * @return false if no reset took place, or true if one did. */ public synchronized boolean waitForReset(IThreadContext tc) - throws ACFException, InterruptedException + throws ManifoldCFException, InterruptedException { if (resetRequired == false) return false; @@ -112,7 +112,7 @@ public abstract class ResetManager /** Do the reset logic. */ protected abstract void performResetLogic(IThreadContext tc) - throws ACFException; + throws ManifoldCFException; } Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingActivity.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingActivity.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingActivity.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingActivity.java Mon Oct 4 14:32:19 2010 @@ -86,7 +86,7 @@ public class SeedingActivity implements *@param prereqEventNames is the list of prerequisite events required for this document, or null if none. */ public void addSeedDocument(String documentIdentifier, String[] prereqEventNames) - throws ACFException + throws ManifoldCFException { if (documentCount == MAX_COUNT) { @@ -94,7 +94,7 @@ public class SeedingActivity implements writeSeedDocuments(documentHashList,documentList,documentPrereqList); documentCount = 0; } - documentHashList[documentCount] = ACF.hash(documentIdentifier); + documentHashList[documentCount] = ManifoldCF.hash(documentIdentifier); documentList[documentCount] = documentIdentifier; if (prereqEventNames != null) documentPrereqList[documentCount] = prereqEventNames; @@ -117,7 +117,7 @@ public class SeedingActivity implements *@param documentIdentifier is the identifier of the document to add to the "pending" queue. */ public void addSeedDocument(String documentIdentifier) - throws ACFException + throws ManifoldCFException { addSeedDocument(documentIdentifier,null); } @@ -134,7 +134,7 @@ public class SeedingActivity implements * "pending" queue. */ public void addUnqueuedSeedDocument(String documentIdentifier) - throws ACFException + throws ManifoldCFException { if (remainingDocumentCount == MAX_COUNT) { @@ -142,12 +142,12 @@ public class SeedingActivity implements jobManager.addRemainingDocumentsInitial(jobID,legalLinkTypes,remainingDocumentHashList,hopcountMethod); remainingDocumentCount = 0; } - remainingDocumentHashList[remainingDocumentCount++] = ACF.hash(documentIdentifier); + remainingDocumentHashList[remainingDocumentCount++] = ManifoldCF.hash(documentIdentifier); } /** Finish a seeding pass */ public void doneSeeding(boolean isPartial) - throws ACFException + throws ManifoldCFException { if (documentCount > 0) { @@ -200,7 +200,7 @@ public class SeedingActivity implements */ public void recordActivity(Long startTime, String activityType, Long dataSize, String entityIdentifier, String resultCode, String resultDescription, String[] childIdentifiers) - throws ACFException + throws ManifoldCFException { connManager.recordHistory(connectionName,startTime,activityType,dataSize,entityIdentifier,resultCode, resultDescription,childIdentifiers); @@ -208,7 +208,7 @@ public class SeedingActivity implements /** Write specified documents after calculating their priorities */ protected void writeSeedDocuments(String[] docIDHashes, String[] docIDs, String[][] prereqEventNames) - throws ACFException + throws ManifoldCFException { // First, prioritize the documents using the queue tracker long prioritizationTime = System.currentTimeMillis(); @@ -252,7 +252,7 @@ public class SeedingActivity implements * caller, will signal that the current seeding activity remains incomplete and must be retried when the job is resumed. */ public void checkJobStillActive() - throws ACFException, ServiceInterruption + throws ManifoldCFException, ServiceInterruption { if (jobManager.checkJobActive(jobID) == false) throw new ServiceInterruption("Job no longer active",System.currentTimeMillis()); @@ -264,7 +264,7 @@ public class SeedingActivity implements */ public String createGlobalString(String simpleString) { - return ACF.createGlobalString(simpleString); + return ManifoldCF.createGlobalString(simpleString); } /** Create a connection-specific string from a simple string. @@ -273,7 +273,7 @@ public class SeedingActivity implements */ public String createConnectionSpecificString(String simpleString) { - return ACF.createConnectionSpecificString(connection.getName(),simpleString); + return ManifoldCF.createConnectionSpecificString(connection.getName(),simpleString); } /** Create a job-based string from a simple string. @@ -282,7 +282,7 @@ public class SeedingActivity implements */ public String createJobSpecificString(String simpleString) { - return ACF.createJobSpecificString(jobID,simpleString); + return ManifoldCF.createJobSpecificString(jobID,simpleString); } } Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java Mon Oct 4 14:32:19 2010 @@ -47,7 +47,7 @@ public class SeedingThread extends Threa /** Constructor. */ public SeedingThread(QueueTracker queueTracker) - throws ACFException + throws ManifoldCFException { super(); setName("Seeding thread"); @@ -67,9 +67,9 @@ public class SeedingThread extends Threa IRepositoryConnectionManager connectionMgr = RepositoryConnectionManagerFactory.make(threadContext); IDBInterface database = DBInterfaceFactory.make(threadContext, - ACF.getMasterDatabaseName(), - ACF.getMasterDatabaseUsername(), - ACF.getMasterDatabasePassword()); + ManifoldCF.getMasterDatabaseName(), + ManifoldCF.getMasterDatabaseUsername(), + ManifoldCF.getMasterDatabasePassword()); String[] identifiers = new String[MAX_COUNT]; // Loop @@ -102,7 +102,7 @@ public class SeedingThread extends Threa if (seedJobs.length == 0) { Logging.threads.debug("Seeding thread found nothing to do"); - ACF.sleep(waitTime); + ManifoldCF.sleep(waitTime); continue; } @@ -183,13 +183,13 @@ public class SeedingThread extends Threa jsr.noteStarted(); } - catch (ACFException e) + catch (ManifoldCFException e) { - if (e.getErrorCode() == ACFException.INTERRUPTED) + if (e.getErrorCode() == ManifoldCFException.INTERRUPTED) throw new InterruptedException(); - if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR) + if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR) throw e; - if (e.getErrorCode() == ACFException.REPOSITORY_CONNECTION_ERROR) + if (e.getErrorCode() == ManifoldCFException.REPOSITORY_CONNECTION_ERROR) { Logging.threads.warn("Seeding thread: Ignoring connection error: "+e.getMessage(),e); continue; @@ -204,7 +204,7 @@ public class SeedingThread extends Threa finally { // Clean up all jobs that did not seed - ACFException exception = null; + ManifoldCFException exception = null; int i = 0; while (i < seedJobs.length) { @@ -219,7 +219,7 @@ public class SeedingThread extends Threa { jobManager.resetSeedJob(jsr.getJobID()); } - catch (ACFException e) + catch (ManifoldCFException e) { exception = e; } @@ -230,14 +230,14 @@ public class SeedingThread extends Threa } // Sleep for the retry interval. - ACF.sleep(waitTime); + ManifoldCF.sleep(waitTime); } - catch (ACFException e) + catch (ManifoldCFException e) { - if (e.getErrorCode() == ACFException.INTERRUPTED) + if (e.getErrorCode() == ManifoldCFException.INTERRUPTED) break; - if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR) + if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR) { resetManager.noteEvent(); @@ -245,7 +245,7 @@ public class SeedingThread extends Threa try { // Give the database a chance to catch up/wake up - ACF.sleep(10000L); + ManifoldCF.sleep(10000L); } catch (InterruptedException se) { @@ -257,7 +257,7 @@ public class SeedingThread extends Threa // Log it, but keep the thread alive Logging.threads.error("Exception tossed: "+e.getMessage(),e); - if (e.getErrorCode() == ACFException.SETUP_ERROR) + if (e.getErrorCode() == ManifoldCFException.SETUP_ERROR) { // Shut the whole system down! System.exit(1); @@ -307,7 +307,7 @@ public class SeedingThread extends Threa /** Reset */ protected void performResetLogic(IThreadContext tc) - throws ACFException + throws ManifoldCFException { IJobManager jobManager = JobManagerFactory.make(tc); jobManager.resetSeedingWorkerStatus(); Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SetPriorityThread.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SetPriorityThread.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SetPriorityThread.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SetPriorityThread.java Mon Oct 4 14:32:19 2010 @@ -49,7 +49,7 @@ public class SetPriorityThread extends T *@param qt is the queue tracker object. */ public SetPriorityThread(QueueTracker qt, int workerThreadCount, BlockingDocuments blockingDocuments) - throws ACFException + throws ManifoldCFException { super(); this.queueTracker = qt; @@ -87,7 +87,7 @@ public class SetPriorityThread extends T try { if (Thread.currentThread().isInterrupted()) - throw new ACFException("Interrupted",ACFException.INTERRUPTED); + throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED); Logging.threads.debug("Set priority thread woke up"); @@ -113,7 +113,7 @@ public class SetPriorityThread extends T while (true) { if (Thread.currentThread().isInterrupted()) - throw new ACFException("Interrupted",ACFException.INTERRUPTED); + throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED); if (processedCount >= cycleCount) { @@ -126,7 +126,7 @@ public class SetPriorityThread extends T DocumentDescription desc = blockingDocuments.getBlockingDocument(); if (desc != null) { - ACF.writeDocumentPriorities(threadContext,mgr,jobManager,new DocumentDescription[]{desc},connectionMap,jobDescriptionMap,queueTracker,currentTime); + ManifoldCF.writeDocumentPriorities(threadContext,mgr,jobManager,new DocumentDescription[]{desc},connectionMap,jobDescriptionMap,queueTracker,currentTime); processedCount++; continue; } @@ -145,24 +145,24 @@ public class SetPriorityThread extends T } */ Logging.threads.debug("Done reprioritizing because no more documents to reprioritize"); - ACF.sleep(30000L); + ManifoldCF.sleep(30000L); break; } } - catch (ACFException e) + catch (ManifoldCFException e) { - if (e.getErrorCode() == ACFException.INTERRUPTED) + if (e.getErrorCode() == ManifoldCFException.INTERRUPTED) break; - if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR) + if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR) { Logging.threads.error("Set priority thread aborting and restarting due to database connection reset: "+e.getMessage(),e); try { // Give the database a chance to catch up/wake up - ACF.sleep(10000L); + ManifoldCF.sleep(10000L); } catch (InterruptedException se) { @@ -174,7 +174,7 @@ public class SetPriorityThread extends T // Log it, but keep the thread alive Logging.threads.error("Exception tossed: "+e.getMessage(),e); - if (e.getErrorCode() == ACFException.SETUP_ERROR) + if (e.getErrorCode() == ManifoldCFException.SETUP_ERROR) { System.exit(1); } Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java Mon Oct 4 14:32:19 2010 @@ -44,7 +44,7 @@ public class StartupThread extends Threa /** Constructor. */ public StartupThread(QueueTracker queueTracker) - throws ACFException + throws ManifoldCFException { super(); setName("Startup thread"); @@ -64,9 +64,9 @@ public class StartupThread extends Threa IRepositoryConnectionManager connectionMgr = RepositoryConnectionManagerFactory.make(threadContext); IDBInterface database = DBInterfaceFactory.make(threadContext, - ACF.getMasterDatabaseName(), - ACF.getMasterDatabaseUsername(), - ACF.getMasterDatabasePassword()); + ManifoldCF.getMasterDatabaseName(), + ManifoldCF.getMasterDatabaseUsername(), + ManifoldCF.getMasterDatabasePassword()); String[] identifiers = new String[MAX_COUNT]; @@ -95,7 +95,7 @@ public class StartupThread extends Threa if (startupJobs.length == 0) { - ACF.sleep(waitTime); + ManifoldCF.sleep(waitTime); continue; } @@ -207,13 +207,13 @@ public class StartupThread extends Threa jobManager.noteJobStarted(jobID,currentTime); jsr.noteStarted(); } - catch (ACFException e) + catch (ManifoldCFException e) { - if (e.getErrorCode() == ACFException.INTERRUPTED) + if (e.getErrorCode() == ManifoldCFException.INTERRUPTED) throw new InterruptedException(); - if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR) + if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR) throw e; - if (e.getErrorCode() == ACFException.REPOSITORY_CONNECTION_ERROR) + if (e.getErrorCode() == ManifoldCFException.REPOSITORY_CONNECTION_ERROR) { Logging.threads.warn("Startup thread: connection error; continuing: "+e.getMessage(),e); continue; @@ -228,7 +228,7 @@ public class StartupThread extends Threa finally { // Clean up all jobs that did not start - ACFException exception = null; + ManifoldCFException exception = null; int i = 0; while (i < startupJobs.length) { @@ -240,7 +240,7 @@ public class StartupThread extends Threa { jobManager.resetStartupJob(jsr.getJobID()); } - catch (ACFException e) + catch (ManifoldCFException e) { exception = e; } @@ -251,14 +251,14 @@ public class StartupThread extends Threa } // Sleep for the retry interval. - ACF.sleep(waitTime); + ManifoldCF.sleep(waitTime); } - catch (ACFException e) + catch (ManifoldCFException e) { - if (e.getErrorCode() == ACFException.INTERRUPTED) + if (e.getErrorCode() == ManifoldCFException.INTERRUPTED) break; - if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR) + if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR) { resetManager.noteEvent(); @@ -266,7 +266,7 @@ public class StartupThread extends Threa try { // Give the database a chance to catch up/wake up - ACF.sleep(10000L); + ManifoldCF.sleep(10000L); } catch (InterruptedException se) { @@ -278,7 +278,7 @@ public class StartupThread extends Threa // Log it, but keep the thread alive Logging.threads.error("Exception tossed: "+e.getMessage(),e); - if (e.getErrorCode() == ACFException.SETUP_ERROR) + if (e.getErrorCode() == ManifoldCFException.SETUP_ERROR) { // Shut the whole system down! System.exit(1); @@ -327,7 +327,7 @@ public class StartupThread extends Threa /** Reset */ protected void performResetLogic(IThreadContext tc) - throws ACFException + throws ManifoldCFException { IJobManager jobManager = JobManagerFactory.make(tc); jobManager.resetStartupWorkerStatus(); Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StufferThread.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StufferThread.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StufferThread.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StufferThread.java Mon Oct 4 14:32:19 2010 @@ -55,7 +55,7 @@ public class StufferThread extends Threa */ public StufferThread(DocumentQueue documentQueue, int n, WorkerResetManager resetManager, QueueTracker qt, BlockingDocuments blockingDocuments, float lowWaterFactor, float stuffSizeFactor) - throws ACFException + throws ManifoldCFException { super(); this.documentQueue = documentQueue; @@ -118,7 +118,7 @@ public class StufferThread extends Threa try { if (Thread.currentThread().isInterrupted()) - throw new ACFException("Interrupted",ACFException.INTERRUPTED); + throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED); // Check if we're okay resetManager.waitForReset(threadContext); @@ -128,7 +128,7 @@ public class StufferThread extends Threa boolean isEmpty = documentQueue.checkIfEmpty(lowWaterMark); if (isEmpty == false) { - ACF.sleep(1000L); + ManifoldCF.sleep(1000L); continue; } long queueNeededTime = System.currentTimeMillis(); @@ -160,7 +160,7 @@ public class StufferThread extends Threa lastQueueFullResults = (descs.length == stuffAmt); if (Thread.currentThread().isInterrupted()) - throw new ACFException("Interrupted",ACFException.INTERRUPTED); + throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED); queueTracker.assessMinimumDepth(depthStatistics.getBins()); @@ -175,7 +175,7 @@ public class StufferThread extends Threa // The theory is that we need to allow stuff to accumulate. if (descs.length == 0) { - ACF.sleep(2000L); // 2 seconds + ManifoldCF.sleep(2000L); // 2 seconds continue; } @@ -269,15 +269,15 @@ public class StufferThread extends Threa } } } - catch (ACFException e) + catch (ManifoldCFException e) { // If we were interrupted, then we are allowed to leave, because the process is terminating, but that's the only exception to the rule - if (e.getErrorCode() == ACFException.INTERRUPTED) + if (e.getErrorCode() == ManifoldCFException.INTERRUPTED) throw e; // Note: We really should never leave this block by throwing an exception, since that could easily leave dangling // active jobqueue entries around. Instead, log the error and continue IN ALL CASES. - Logging.threads.error("Stuffer thread ACF Exception thrown: "+e.getMessage()+" - continuing", + Logging.threads.error("Stuffer thread ManifoldCF Exception thrown: "+e.getMessage()+" - continuing", e); maxDocuments = 1; binNames = new String[]{""}; @@ -345,12 +345,12 @@ public class StufferThread extends Threa // If we don't wait here, the other threads don't seem to have a chance to queue anything else up. //Thread.yield(); } - catch (ACFException e) + catch (ManifoldCFException e) { - if (e.getErrorCode() == ACFException.INTERRUPTED) + if (e.getErrorCode() == ManifoldCFException.INTERRUPTED) break; - if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR) + if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR) { resetManager.noteEvent(); documentQueue.reset(); @@ -359,7 +359,7 @@ public class StufferThread extends Threa try { // Give the database a chance to catch up/wake up - ACF.sleep(10000L); + ManifoldCF.sleep(10000L); } catch (InterruptedException se) { @@ -371,7 +371,7 @@ public class StufferThread extends Threa // Log it, but keep the thread alive Logging.threads.error("Exception tossed: "+e.getMessage(),e); - if (e.getErrorCode() == ACFException.SETUP_ERROR) + if (e.getErrorCode() == ManifoldCFException.SETUP_ERROR) { System.exit(1); } Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerResetManager.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerResetManager.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerResetManager.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerResetManager.java Mon Oct 4 14:32:19 2010 @@ -42,7 +42,7 @@ public class WorkerResetManager extends /** Reset */ protected void performResetLogic(IThreadContext tc) - throws ACFException + throws ManifoldCFException { IJobManager jobManager = JobManagerFactory.make(tc); jobManager.resetDocumentWorkerStatus(); Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java (original) +++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java Mon Oct 4 14:32:19 2010 @@ -47,7 +47,7 @@ public class WorkerThread extends Thread *@param id is the worker thread id. */ public WorkerThread(String id, DocumentQueue documentQueue, WorkerResetManager resetManager, QueueTracker queueTracker) - throws ACFException + throws ManifoldCFException { super(); this.id = id; @@ -104,7 +104,7 @@ public class WorkerThread extends Thread try { if (Thread.currentThread().isInterrupted()) - throw new ACFException("Interrupted",ACFException.INTERRUPTED); + throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED); // Before we begin, conditionally reset resetManager.waitForReset(threadContext); @@ -123,7 +123,7 @@ public class WorkerThread extends Thread // System.out.println("Got a document set"); if (Thread.currentThread().isInterrupted()) - throw new ACFException("Interrupted",ACFException.INTERRUPTED); + throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED); // First of all: find out if the job for these documents has been aborted, paused, etc. // If so, we requeue the documents immediately. @@ -324,7 +324,7 @@ public class WorkerThread extends Thread { if (Thread.currentThread().isInterrupted()) - throw new ACFException("Interrupted",ACFException.INTERRUPTED); + throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED); HashMap abortSet = new HashMap(); ProcessActivity activity; @@ -378,7 +378,7 @@ public class WorkerThread extends Thread { // Treat this as a hard failure. if (e.isAbortOnFail()) - throw new ACFException("Repeated service interruptions - failure getting document version"+((e.getCause()!=null)?": "+e.getCause().getMessage():""),e.getCause()); + throw new ManifoldCFException("Repeated service interruptions - failure getting document version"+((e.getCause()!=null)?": "+e.getCause().getMessage():""),e.getCause()); // We want this particular document to be not included in the // reprocessing. Therefore, we do the same thing as we would // if we got back a null version. @@ -577,7 +577,7 @@ public class WorkerThread extends Thread try { if (Thread.currentThread().isInterrupted()) - throw new ACFException("Interrupted",ACFException.INTERRUPTED); + throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED); if (Logging.threads.isDebugEnabled()) Logging.threads.debug("Worker thread about to process "+Integer.toString(processIDs.length)+" documents"); @@ -590,7 +590,7 @@ public class WorkerThread extends Thread // "Finish" the documents (removing unneeded carrydown info, etc.) DocumentDescription[] requeueCandidates = jobManager.finishDocuments(job.getID(),legalLinkTypes,processIDHashes,job.getHopcountMode()); - ACF.requeueDocumentsDueToCarrydown(jobManager,requeueCandidates,connector,connection,queueTracker,currentTime); + ManifoldCF.requeueDocumentsDueToCarrydown(jobManager,requeueCandidates,connector,connection,queueTracker,currentTime); if (Logging.threads.isDebugEnabled()) Logging.threads.debug("Worker thread done processing "+Integer.toString(processIDs.length)+" documents"); @@ -627,7 +627,7 @@ public class WorkerThread extends Thread { // Treat this as a hard failure. if (e.isAbortOnFail()) - throw new ACFException("Repeated service interruptions - failure processing document"+((e.getCause()!=null)?": "+e.getCause().getMessage():""),e.getCause()); + throw new ManifoldCFException("Repeated service interruptions - failure processing document"+((e.getCause()!=null)?": "+e.getCause().getMessage():""),e.getCause()); // We want this particular document to be not included in the // reprocessing. Therefore, we do the same thing as we would // if we got back a null version. @@ -824,7 +824,7 @@ public class WorkerThread extends Thread } break; default: - throw new ACFException("Unexpected value for job type: '"+Integer.toString(job.getType())+"'"); + throw new ManifoldCFException("Unexpected value for job type: '"+Integer.toString(job.getType())+"'"); } // Finally, if we're still alive, mark everything as "processed". @@ -861,10 +861,10 @@ public class WorkerThread extends Thread } } } - catch (ACFException e) + catch (ManifoldCFException e) { - if (e.getErrorCode() == ACFException.REPOSITORY_CONNECTION_ERROR) + if (e.getErrorCode() == ManifoldCFException.REPOSITORY_CONNECTION_ERROR) { // Couldn't establish a connection. // This basically means none of the documents handed to this thread can be @@ -897,12 +897,12 @@ public class WorkerThread extends Thread qds.endProcessing(queueTracker); } } - catch (ACFException e) + catch (ManifoldCFException e) { - if (e.getErrorCode() == ACFException.INTERRUPTED) + if (e.getErrorCode() == ManifoldCFException.INTERRUPTED) break; - if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR) + if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR) throw e; if (jobManager.errorAbort(qds.getJobDescription().getID(),e.getMessage())) @@ -929,12 +929,12 @@ public class WorkerThread extends Thread } } } - catch (ACFException e) + catch (ManifoldCFException e) { - if (e.getErrorCode() == ACFException.INTERRUPTED) + if (e.getErrorCode() == ManifoldCFException.INTERRUPTED) break; - if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR) + if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR) { // Note the failure, which will cause a reset to occur resetManager.noteEvent(); @@ -945,7 +945,7 @@ public class WorkerThread extends Thread try { // Give the database a chance to catch up/wake up - ACF.sleep(10000L); + ManifoldCF.sleep(10000L); } catch (InterruptedException se) { @@ -1015,7 +1015,7 @@ public class WorkerThread extends Thread IIncrementalIngester ingester, ArrayList ingesterDeleteList, ArrayList ingesterDeleteListUnhashed, Long jobID, String[] legalLinkTypes, OutputActivity ingestLogger, int hopcountMethod, QueueTracker queueTracker, long currentTime) - throws ACFException + throws ManifoldCFException { String connectionName = connection.getName(); @@ -1051,11 +1051,11 @@ public class WorkerThread extends Thread waittime = 300000L; try { - ACF.sleep(waittime); + ManifoldCF.sleep(waittime); } catch (InterruptedException e2) { - throw new ACFException("Interrupted: "+e2.getMessage(),e2,ACFException.INTERRUPTED); + throw new ManifoldCFException("Interrupted: "+e2.getMessage(),e2,ManifoldCFException.INTERRUPTED); } } } @@ -1077,7 +1077,7 @@ public class WorkerThread extends Thread DocumentDescription[] requeueCandidates = jobManager.markDocumentDeletedMultiple(jobID,legalLinkTypes,deleteDescriptions,hopcountMethod); // Requeue those documents that had carrydown data modifications - ACF.requeueDocumentsDueToCarrydown(jobManager,requeueCandidates,connector,connection,queueTracker,currentTime); + ManifoldCF.requeueDocumentsDueToCarrydown(jobManager,requeueCandidates,connector,connection,queueTracker,currentTime); // Mark all these as done i = 0; @@ -1097,7 +1097,7 @@ public class WorkerThread extends Thread *@param failCount is the number of retries allowed until hard failure. */ protected static void requeueDocuments(IJobManager jobManager, ArrayList requeueList, long retryTime, long failTime, int failCount) - throws ACFException + throws ManifoldCFException { if (requeueList.size() > 0) { @@ -1159,7 +1159,7 @@ public class WorkerThread extends Thread *@return true if the mime type is indexable. */ public boolean checkMimeTypeIndexable(String mimeType) - throws ACFException, ServiceInterruption + throws ManifoldCFException, ServiceInterruption { return ingester.checkMimeTypeIndexable(job.getOutputConnectionName(),mimeType); } @@ -1169,7 +1169,7 @@ public class WorkerThread extends Thread *@return true if the document is indexable. */ public boolean checkDocumentIndexable(File localFile) - throws ACFException, ServiceInterruption + throws ManifoldCFException, ServiceInterruption { return ingester.checkDocumentIndexable(job.getOutputConnectionName(),localFile); } @@ -1192,7 +1192,7 @@ public class WorkerThread extends Thread */ public void recordActivity(Long startTime, String activityType, Long dataSize, String entityIdentifier, String resultCode, String resultDescription, String[] childIdentifiers) - throws ACFException + throws ManifoldCFException { connMgr.recordHistory(connectionName,startTime,activityType,dataSize,entityIdentifier,resultCode, resultDescription,childIdentifiers); @@ -1204,9 +1204,9 @@ public class WorkerThread extends Thread *@return an array containing the unique data values passed from ALL parents. Note that these are in no particular order, and there will not be any duplicates. */ public String[] retrieveParentData(String localIdentifier, String dataName) - throws ACFException + throws ManifoldCFException { - return jobManager.retrieveParentData(job.getID(),ACF.hash(localIdentifier),dataName); + return jobManager.retrieveParentData(job.getID(),ManifoldCF.hash(localIdentifier),dataName); } /** Retrieve data passed from parents to a specified child document. @@ -1215,9 +1215,9 @@ public class WorkerThread extends Thread *@return an array containing the unique data values passed from ALL parents. Note that these are in no particular order, and there will not be any duplicates. */ public CharacterInput[] retrieveParentDataAsFiles(String localIdentifier, String dataName) - throws ACFException + throws ManifoldCFException { - return jobManager.retrieveParentDataAsFiles(job.getID(),ACF.hash(localIdentifier),dataName); + return jobManager.retrieveParentDataAsFiles(job.getID(),ManifoldCF.hash(localIdentifier),dataName); } /** Check whether current job is still active. @@ -1226,7 +1226,7 @@ public class WorkerThread extends Thread * caller, will signal that the current versioning activity remains incomplete and must be retried when the job is resumed. */ public void checkJobStillActive() - throws ACFException, ServiceInterruption + throws ManifoldCFException, ServiceInterruption { if (jobManager.checkJobActive(job.getID()) == false) throw new ServiceInterruption("Job no longer active",System.currentTimeMillis()); @@ -1240,7 +1240,7 @@ public class WorkerThread extends Thread *@return false if the event is already in the "pending" state. */ public boolean beginEventSequence(String eventName) - throws ACFException + throws ManifoldCFException { return jobManager.beginEventSequence(eventName); } @@ -1253,7 +1253,7 @@ public class WorkerThread extends Thread *@param eventName is the event name. */ public void completeEventSequence(String eventName) - throws ACFException + throws ManifoldCFException { jobManager.completeEventSequence(eventName); } @@ -1265,7 +1265,7 @@ public class WorkerThread extends Thread *@param localIdentifier is the document identifier to requeue */ public void retryDocumentProcessing(String localIdentifier) - throws ACFException + throws ManifoldCFException { // Accumulate aborts abortSet.put(localIdentifier,localIdentifier); @@ -1277,7 +1277,7 @@ public class WorkerThread extends Thread */ public String createGlobalString(String simpleString) { - return ACF.createGlobalString(simpleString); + return ManifoldCF.createGlobalString(simpleString); } /** Create a connection-specific string from a simple string. @@ -1286,7 +1286,7 @@ public class WorkerThread extends Thread */ public String createConnectionSpecificString(String simpleString) { - return ACF.createConnectionSpecificString(connectionName,simpleString); + return ManifoldCF.createConnectionSpecificString(connectionName,simpleString); } /** Create a job-based string from a simple string. @@ -1295,7 +1295,7 @@ public class WorkerThread extends Thread */ public String createJobSpecificString(String simpleString) { - return ACF.createJobSpecificString(jobID,simpleString); + return ManifoldCF.createJobSpecificString(jobID,simpleString); } } @@ -1357,7 +1357,7 @@ public class WorkerThread extends Thread /** Clean up any dangling information, before abandoning this process activity object */ public void discard() - throws ACFException + throws ManifoldCFException { Iterator iter = referenceList.keySet().iterator(); while (iter.hasNext()) @@ -1384,12 +1384,12 @@ public class WorkerThread extends Thread */ public void addDocumentReference(String localIdentifier, String parentIdentifier, String relationshipType, String[] dataNames, Object[][] dataValues, Long originationTime, String[] prereqEventNames) - throws ACFException + throws ManifoldCFException { - String localIdentifierHash = ACF.hash(localIdentifier); + String localIdentifierHash = ManifoldCF.hash(localIdentifier); String parentIdentifierHash = null; if (parentIdentifier != null && parentIdentifier.length() > 0) - parentIdentifierHash = ACF.hash(parentIdentifier); + parentIdentifierHash = ManifoldCF.hash(parentIdentifier); if (Logging.threads.isDebugEnabled()) Logging.threads.debug("Adding document reference, from "+((parentIdentifier==null)?"no parent":"'"+parentIdentifier+"'") @@ -1482,7 +1482,7 @@ public class WorkerThread extends Thread */ public void addDocumentReference(String localIdentifier, String parentIdentifier, String relationshipType, String[] dataNames, Object[][] dataValues, Long originationTime) - throws ACFException + throws ManifoldCFException { addDocumentReference(localIdentifier,parentIdentifier,relationshipType,dataNames,dataValues,originationTime,null); } @@ -1500,7 +1500,7 @@ public class WorkerThread extends Thread */ public void addDocumentReference(String localIdentifier, String parentIdentifier, String relationshipType, String[] dataNames, Object[][] dataValues) - throws ACFException + throws ManifoldCFException { addDocumentReference(localIdentifier,parentIdentifier,relationshipType,dataNames,dataValues,null); } @@ -1515,7 +1515,7 @@ public class WorkerThread extends Thread * "getRelationshipTypes()". May be null. */ public void addDocumentReference(String localIdentifier, String parentIdentifier, String relationshipType) - throws ACFException + throws ManifoldCFException { addDocumentReference(localIdentifier,parentIdentifier,relationshipType,null,null); } @@ -1526,7 +1526,7 @@ public class WorkerThread extends Thread * fetched the document). */ public void addDocumentReference(String localIdentifier) - throws ACFException + throws ManifoldCFException { addDocumentReference(localIdentifier,null,null,null,null); } @@ -1537,9 +1537,9 @@ public class WorkerThread extends Thread *@return an array containing the unique data values passed from ALL parents. Note that these are in no particular order, and there will not be any duplicates. */ public String[] retrieveParentData(String localIdentifier, String dataName) - throws ACFException + throws ManifoldCFException { - return jobManager.retrieveParentData(job.getID(),ACF.hash(localIdentifier),dataName); + return jobManager.retrieveParentData(job.getID(),ManifoldCF.hash(localIdentifier),dataName); } /** Retrieve data passed from parents to a specified child document. @@ -1548,9 +1548,9 @@ public class WorkerThread extends Thread *@return an array containing the unique data values passed from ALL parents. Note that these are in no particular order, and there will not be any duplicates. */ public CharacterInput[] retrieveParentDataAsFiles(String localIdentifier, String dataName) - throws ACFException + throws ManifoldCFException { - return jobManager.retrieveParentDataAsFiles(job.getID(),ACF.hash(localIdentifier),dataName); + return jobManager.retrieveParentDataAsFiles(job.getID(),ManifoldCF.hash(localIdentifier),dataName); } /** Record a document version, but don't ingest it. @@ -1559,9 +1559,9 @@ public class WorkerThread extends Thread *@param version is the document version. */ public void recordDocument(String documentIdentifier, String version) - throws ACFException, ServiceInterruption + throws ManifoldCFException, ServiceInterruption { - String documentIdentifierHash = ACF.hash(documentIdentifier); + String documentIdentifierHash = ManifoldCF.hash(documentIdentifier); ingester.documentRecord(job.getOutputConnectionName(),job.getConnectionName(),documentIdentifierHash,version,currentTime,ingestLogger); } @@ -1574,13 +1574,13 @@ public class WorkerThread extends Thread *@param data is the document data. The data is closed after ingestion is complete. */ public void ingestDocument(String documentIdentifier, String version, String documentURI, RepositoryDocument data) - throws ACFException, ServiceInterruption + throws ManifoldCFException, ServiceInterruption { // We should not get called here if versions agree, unless the repository // connector cannot distinguish between versions - in which case it must // always ingest (essentially) - String documentIdentifierHash = ACF.hash(documentIdentifier); + String documentIdentifierHash = ManifoldCF.hash(documentIdentifier); // First, we need to add into the metadata the stuff from the job description. ingester.documentIngest(job.getOutputConnectionName(), @@ -1596,9 +1596,9 @@ public class WorkerThread extends Thread *@param documentIdentifier is the document's local identifier. */ public void deleteDocument(String documentIdentifier) - throws ACFException, ServiceInterruption + throws ManifoldCFException, ServiceInterruption { - String documentIdentifierHash = ACF.hash(documentIdentifier); + String documentIdentifierHash = ManifoldCF.hash(documentIdentifier); ingester.documentDelete(job.getOutputConnectionName(), job.getConnectionName(),documentIdentifierHash, ingestLogger); @@ -1617,7 +1617,7 @@ public class WorkerThread extends Thread public void setDocumentScheduleBounds(String localIdentifier, Long lowerRecrawlBoundTime, Long upperRecrawlBoundTime, Long lowerExpireBoundTime, Long upperExpireBoundTime) - throws ACFException + throws ManifoldCFException { if (lowerRecrawlBoundTime != null) lowerRescheduleBounds.put(localIdentifier,lowerRecrawlBoundTime); @@ -1644,7 +1644,7 @@ public class WorkerThread extends Thread */ public void setDocumentOriginationTime(String localIdentifier, Long originationTime) - throws ACFException + throws ManifoldCFException { if (originationTime == null) originationTimes.remove(localIdentifier); @@ -1765,7 +1765,7 @@ public class WorkerThread extends Thread */ public void recordActivity(Long startTime, String activityType, Long dataSize, String entityIdentifier, String resultCode, String resultDescription, String[] childIdentifiers) - throws ACFException + throws ManifoldCFException { connMgr.recordHistory(connection.getName(),startTime,activityType,dataSize,entityIdentifier,resultCode, resultDescription,childIdentifiers); @@ -1774,7 +1774,7 @@ public class WorkerThread extends Thread /** Flush the outstanding references into the database. */ public void flush() - throws ACFException + throws ManifoldCFException { processDocumentReferences(); } @@ -1782,7 +1782,7 @@ public class WorkerThread extends Thread /** Process outstanding document references, in batch. */ protected void processDocumentReferences() - throws ACFException + throws ManifoldCFException { if (referenceList.size() == 0) return; @@ -1831,7 +1831,7 @@ public class WorkerThread extends Thread eventNames[j] = dr.getPrerequisiteEventNames(); // Calculate desired document priority based on current queuetracker status. - String[] bins = ACF.calculateBins(connector,dr.getLocalIdentifier()); + String[] bins = ManifoldCF.calculateBins(connector,dr.getLocalIdentifier()); binNames[j] = bins; @@ -1871,7 +1871,7 @@ public class WorkerThread extends Thread * caller, will signal that the current processing activity remains incomplete and must be retried when the job is resumed. */ public void checkJobStillActive() - throws ACFException, ServiceInterruption + throws ManifoldCFException, ServiceInterruption { if (jobManager.checkJobActive(job.getID()) == false) throw new ServiceInterruption("Job no longer active",System.currentTimeMillis()); @@ -1885,7 +1885,7 @@ public class WorkerThread extends Thread *@return false if the event is already in the "pending" state. */ public boolean beginEventSequence(String eventName) - throws ACFException + throws ManifoldCFException { return jobManager.beginEventSequence(eventName); } @@ -1898,7 +1898,7 @@ public class WorkerThread extends Thread *@param eventName is the event name. */ public void completeEventSequence(String eventName) - throws ACFException + throws ManifoldCFException { jobManager.completeEventSequence(eventName); } @@ -1910,7 +1910,7 @@ public class WorkerThread extends Thread *@param localIdentifier is the document identifier to requeue */ public void retryDocumentProcessing(String localIdentifier) - throws ACFException + throws ManifoldCFException { // Accumulate aborts abortSet.put(localIdentifier,localIdentifier); @@ -1921,7 +1921,7 @@ public class WorkerThread extends Thread *@return true if the mime type is indexable. */ public boolean checkMimeTypeIndexable(String mimeType) - throws ACFException, ServiceInterruption + throws ManifoldCFException, ServiceInterruption { return ingester.checkMimeTypeIndexable(job.getOutputConnectionName(),mimeType); } @@ -1931,7 +1931,7 @@ public class WorkerThread extends Thread *@return true if the document is indexable. */ public boolean checkDocumentIndexable(File localFile) - throws ACFException, ServiceInterruption + throws ManifoldCFException, ServiceInterruption { return ingester.checkDocumentIndexable(job.getOutputConnectionName(),localFile); } @@ -1942,7 +1942,7 @@ public class WorkerThread extends Thread */ public String createGlobalString(String simpleString) { - return ACF.createGlobalString(simpleString); + return ManifoldCF.createGlobalString(simpleString); } /** Create a connection-specific string from a simple string. @@ -1951,7 +1951,7 @@ public class WorkerThread extends Thread */ public String createConnectionSpecificString(String simpleString) { - return ACF.createConnectionSpecificString(connection.getName(),simpleString); + return ManifoldCF.createConnectionSpecificString(connection.getName(),simpleString); } /** Create a job-based string from a simple string. @@ -1960,7 +1960,7 @@ public class WorkerThread extends Thread */ public String createJobSpecificString(String simpleString) { - return ACF.createJobSpecificString(job.getID(),simpleString); + return ManifoldCF.createJobSpecificString(job.getID(),simpleString); } } @@ -2044,7 +2044,7 @@ public class WorkerThread extends Thread /** Close all object data references. This should be called whenever a DocumentReference object is abandoned. */ public void discard() - throws ACFException + throws ManifoldCFException { Iterator iter = data.keySet().iterator(); while (iter.hasNext()) @@ -2264,9 +2264,9 @@ public class WorkerThread extends Thread */ public void recordActivity(Long startTime, String activityType, Long dataSize, String entityURI, String resultCode, String resultDescription) - throws ACFException + throws ManifoldCFException { - connMgr.recordHistory(connectionName,startTime,ACF.qualifyOutputActivityName(activityType,outputConnectionName),dataSize,entityURI,resultCode, + connMgr.recordHistory(connectionName,startTime,ManifoldCF.qualifyOutputActivityName(activityType,outputConnectionName),dataSize,entityURI,resultCode, resultDescription,null); } @@ -2277,7 +2277,7 @@ public class WorkerThread extends Thread *@return the properly qualified access token. */ public String qualifyAccessToken(String authorityNameString, String accessToken) - throws ACFException + throws ManifoldCFException { try { @@ -2287,7 +2287,7 @@ public class WorkerThread extends Thread } catch (java.io.UnsupportedEncodingException e) { - throw new ACFException(e.getMessage(),e); + throw new ManifoldCFException(e.getMessage(),e); } } Modified: incubator/lcf/trunk/modules/framework/tests/ThreadLockSpinner.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/tests/ThreadLockSpinner.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/tests/ThreadLockSpinner.java (original) +++ incubator/lcf/trunk/modules/framework/tests/ThreadLockSpinner.java Mon Oct 4 14:32:19 2010 @@ -16,7 +16,7 @@ */ import org.apache.manifoldcf.core.interfaces.*; -import org.apache.manifoldcf.core.system.ACF; +import org.apache.manifoldcf.core.system.ManifoldCF; public class ThreadLockSpinner { @@ -26,7 +26,7 @@ public class ThreadLockSpinner public static void main(String[] argv) throws Exception { - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); // Start up multiple threads of each kind int t1instanceCount = 25; Modified: incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/agents/tests/Sanity.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/agents/tests/Sanity.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/agents/tests/Sanity.java (original) +++ incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/agents/tests/Sanity.java Mon Oct 4 14:32:19 2010 @@ -20,7 +20,7 @@ package org.apache.manifoldcf.agents.tes import org.apache.manifoldcf.core.interfaces.*; import org.apache.manifoldcf.agents.interfaces.*; -import org.apache.manifoldcf.agents.system.ACF; +import org.apache.manifoldcf.agents.system.ManifoldCF; import java.io.*; import java.util.*; Modified: incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/agents/tests/TestBase.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/agents/tests/TestBase.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/agents/tests/TestBase.java (original) +++ incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/agents/tests/TestBase.java Mon Oct 4 14:32:19 2010 @@ -20,7 +20,7 @@ package org.apache.manifoldcf.agents.tes import org.apache.manifoldcf.core.interfaces.*; import org.apache.manifoldcf.agents.interfaces.*; -import org.apache.manifoldcf.agents.system.ACF; +import org.apache.manifoldcf.agents.system.ManifoldCF; import java.io.*; import java.util.*; @@ -60,9 +60,9 @@ public class TestBase extends org.apache // Install the agents tables initialize(); - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); - ACF.installTables(tc); + ManifoldCF.installTables(tc); } @After @@ -87,13 +87,13 @@ public class TestBase extends org.apache if (isInitialized()) { // Test the uninstall - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); Exception currentException = null; try { - ACF.deinstallTables(tc); + ManifoldCF.deinstallTables(tc); } catch (Exception e) { Modified: incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/core/tests/TestBase.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/core/tests/TestBase.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/core/tests/TestBase.java (original) +++ incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/core/tests/TestBase.java Mon Oct 4 14:32:19 2010 @@ -19,7 +19,7 @@ package org.apache.manifoldcf.core.tests; import org.apache.manifoldcf.core.interfaces.*; -import org.apache.manifoldcf.core.system.ACF; +import org.apache.manifoldcf.core.system.ManifoldCF; import java.io.*; import java.util.*; @@ -98,11 +98,11 @@ public class TestBase " \n" + "\n"); - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); // Create the database - ACF.createSystemDatabase(tc,"",""); + ManifoldCF.createSystemDatabase(tc,"",""); } @@ -127,11 +127,11 @@ public class TestBase initialize(); if (isInitialized()) { - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); // Remove the database - ACF.dropSystemDatabase(tc,"",""); + ManifoldCF.dropSystemDatabase(tc,"",""); // Get rid of the property and logging files. logOutputFile.delete(); Modified: incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/core/tests/UILockSpinner.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/core/tests/UILockSpinner.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/core/tests/UILockSpinner.java (original) +++ incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/core/tests/UILockSpinner.java Mon Oct 4 14:32:19 2010 @@ -18,7 +18,7 @@ package org.apache.manifoldcf.core.tests; import org.apache.manifoldcf.core.interfaces.*; -import org.apache.manifoldcf.core.system.ACF; +import org.apache.manifoldcf.core.system.ManifoldCF; public class UILockSpinner { @@ -28,7 +28,7 @@ public class UILockSpinner public static void main(String[] argv) throws Exception { - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); // Create a thread context object. Modified: incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/crawler/tests/Sanity.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/crawler/tests/Sanity.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/crawler/tests/Sanity.java (original) +++ incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/crawler/tests/Sanity.java Mon Oct 4 14:32:19 2010 @@ -20,7 +20,7 @@ package org.apache.manifoldcf.crawler.te import org.apache.manifoldcf.core.interfaces.*; import org.apache.manifoldcf.agents.interfaces.*; -import org.apache.manifoldcf.agents.system.ACF; +import org.apache.manifoldcf.agents.system.ManifoldCF; import java.io.*; import java.util.*; Modified: incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/crawler/tests/TestBase.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/crawler/tests/TestBase.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/crawler/tests/TestBase.java (original) +++ incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/crawler/tests/TestBase.java Mon Oct 4 14:32:19 2010 @@ -21,7 +21,7 @@ package org.apache.manifoldcf.crawler.te import org.apache.manifoldcf.core.interfaces.*; import org.apache.manifoldcf.agents.interfaces.*; import org.apache.manifoldcf.crawler.interfaces.*; -import org.apache.manifoldcf.crawler.system.ACF; +import org.apache.manifoldcf.crawler.system.ManifoldCF; import java.io.*; import java.util.*; @@ -61,7 +61,7 @@ public class TestBase extends org.apache // Install the agents tables initialize(); - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); IAgentManager mgr = AgentManagerFactory.make(tc); mgr.registerAgent("org.apache.manifoldcf.crawler.system.CrawlerAgent"); @@ -89,7 +89,7 @@ public class TestBase extends org.apache if (isInitialized()) { // Test the uninstall - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); Exception currentException = null; Modified: incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/crawler/tests/TestConnectorBase.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/crawler/tests/TestConnectorBase.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/crawler/tests/TestConnectorBase.java (original) +++ incubator/lcf/trunk/modules/framework/tests/src/main/java/org/apache/manifoldcf/crawler/tests/TestConnectorBase.java Mon Oct 4 14:32:19 2010 @@ -22,7 +22,7 @@ import org.apache.manifoldcf.core.interf import org.apache.manifoldcf.agents.interfaces.*; import org.apache.manifoldcf.crawler.interfaces.*; import org.apache.manifoldcf.authorities.interfaces.*; -import org.apache.manifoldcf.core.system.ACF; +import org.apache.manifoldcf.core.system.ManifoldCF; import java.io.*; import java.util.*; @@ -93,13 +93,13 @@ public class TestConnectorBase extends o // Register the connector we're testing initialize(); - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); IDBInterface database = DBInterfaceFactory.make(tc, - ACF.getMasterDatabaseName(), - ACF.getMasterDatabaseUsername(), - ACF.getMasterDatabasePassword()); + ManifoldCF.getMasterDatabaseName(), + ManifoldCF.getMasterDatabaseUsername(), + ManifoldCF.getMasterDatabasePassword()); IConnectorManager mgr = ConnectorManagerFactory.make(tc); IAuthorityConnectorManager authMgr = AuthorityConnectorManagerFactory.make(tc); @@ -157,7 +157,7 @@ public class TestConnectorBase extends o } } - catch (ACFException e) + catch (ManifoldCFException e) { database.signalRollback(); throw e; @@ -195,7 +195,7 @@ public class TestConnectorBase extends o if (isInitialized()) { // Test the uninstall - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); Exception currentException = null; @@ -238,9 +238,9 @@ public class TestConnectorBase extends o try { IDBInterface database = DBInterfaceFactory.make(tc, - ACF.getMasterDatabaseName(), - ACF.getMasterDatabaseUsername(), - ACF.getMasterDatabasePassword()); + ManifoldCF.getMasterDatabaseName(), + ManifoldCF.getMasterDatabaseUsername(), + ManifoldCF.getMasterDatabasePassword()); IConnectorManager mgr = ConnectorManagerFactory.make(tc); IAuthorityConnectorManager authMgr = AuthorityConnectorManagerFactory.make(tc); @@ -293,7 +293,7 @@ public class TestConnectorBase extends o } } - catch (ACFException e) + catch (ManifoldCFException e) { database.signalRollback(); throw e; Modified: incubator/lcf/trunk/modules/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/beans/AdminProfile.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/beans/AdminProfile.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/beans/AdminProfile.java (original) +++ incubator/lcf/trunk/modules/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/beans/AdminProfile.java Mon Oct 4 14:32:19 2010 @@ -100,9 +100,9 @@ public class AdminProfile implements Htt if (userID != null) { IDBInterface database = DBInterfaceFactory.make(threadContext, - ACF.getMasterDatabaseName(), - ACF.getMasterDatabaseUsername(), - ACF.getMasterDatabasePassword()); + ManifoldCF.getMasterDatabaseName(), + ManifoldCF.getMasterDatabaseUsername(), + ManifoldCF.getMasterDatabasePassword()); // MHL to actually log in (when we figure out what to use as an authority) if (userID.equals("admin") && userPassword.equals("admin")) { @@ -112,7 +112,7 @@ public class AdminProfile implements Htt } } } - catch (ACFException e) + catch (ManifoldCFException e) { Logging.misc.fatal("Exception logging in!",e); } Modified: incubator/lcf/trunk/modules/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/multipart/MultipartWrapper.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/multipart/MultipartWrapper.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/multipart/MultipartWrapper.java (original) +++ incubator/lcf/trunk/modules/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/multipart/MultipartWrapper.java Mon Oct 4 14:32:19 2010 @@ -42,7 +42,7 @@ public class MultipartWrapper implements /** Constructor. */ public MultipartWrapper(HttpServletRequest request) - throws ACFException + throws ManifoldCFException { // Check that we have a file upload request boolean isMultipart = FileUpload.isMultipartContent(request); @@ -82,14 +82,14 @@ public class MultipartWrapper implements else { if (((FileItem)list.get(0)).isFormField() != item.isFormField()) - throw new ACFException("Illegal form data; posted form has the same name for different data types ('"+name+"')!"); + throw new ManifoldCFException("Illegal form data; posted form has the same name for different data types ('"+name+"')!"); } list.add(item); } } catch (FileUploadException e) { - throw new ACFException("Problem uploading file: "+e.getMessage(),e); + throw new ManifoldCFException("Problem uploading file: "+e.getMessage(),e); } } @@ -168,7 +168,7 @@ public class MultipartWrapper implements /** Get a file parameter, as a binary input. */ public BinaryInput getBinaryStream(String name) - throws ACFException + throws ManifoldCFException { if (request != null) return null; @@ -199,7 +199,7 @@ public class MultipartWrapper implements } catch (IOException e) { - throw new ACFException("Error creating file binary stream",e); + throw new ManifoldCFException("Error creating file binary stream",e); } } Modified: incubator/lcf/trunk/modules/tests/filesystem/org/apache/manifoldcf/filesystem_tests/APISanity.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/tests/filesystem/org/apache/manifoldcf/filesystem_tests/APISanity.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/tests/filesystem/org/apache/manifoldcf/filesystem_tests/APISanity.java (original) +++ incubator/lcf/trunk/modules/tests/filesystem/org/apache/manifoldcf/filesystem_tests/APISanity.java Mon Oct 4 14:32:19 2010 @@ -21,7 +21,7 @@ package org.apache.manifoldcf.filesystem import org.apache.manifoldcf.core.interfaces.*; import org.apache.manifoldcf.agents.interfaces.*; import org.apache.manifoldcf.crawler.interfaces.*; -import org.apache.manifoldcf.crawler.system.ACF; +import org.apache.manifoldcf.crawler.system.ManifoldCF; import java.io.*; import java.util.*; @@ -176,9 +176,9 @@ public class APISanity extends TestBase // Crawl everything underneath the 'testdata' area File testDataFile = new File("testdata").getCanonicalFile(); if (!testDataFile.exists()) - throw new ACFException("Test data area not found! Looking in "+testDataFile.toString()); + throw new ManifoldCFException("Test data area not found! Looking in "+testDataFile.toString()); if (!testDataFile.isDirectory()) - throw new ACFException("Test data area not a directory! Looking in "+testDataFile.toString()); + throw new ManifoldCFException("Test data area not a directory! Looking in "+testDataFile.toString()); ConfigurationNode sn = new ConfigurationNode("startpoint"); sn.setAttribute("path",testDataFile.toString()); ConfigurationNode n = new ConfigurationNode("include"); @@ -229,7 +229,7 @@ public class APISanity extends TestBase long count; count = getJobDocumentsProcessed(jobIDString); if (count != 5) - throw new ACFException("Wrong number of documents processed - expected 5, saw "+new Long(count).toString()); + throw new ManifoldCFException("Wrong number of documents processed - expected 5, saw "+new Long(count).toString()); // Add a file and recrawl createFile(new File("testdata/testdir/test4.txt"),"Added file"); @@ -241,7 +241,7 @@ public class APISanity extends TestBase // The test data area has 4 documents and one directory, and we have to count the root directory too. count = getJobDocumentsProcessed(jobIDString); if (count != 6) - throw new ACFException("Wrong number of documents processed after add - expected 6, saw "+new Long(count).toString()); + throw new ManifoldCFException("Wrong number of documents processed after add - expected 6, saw "+new Long(count).toString()); // Change a file, and recrawl changeFile(new File("testdata/test1.txt"),"Modified contents"); @@ -253,7 +253,7 @@ public class APISanity extends TestBase // The test data area has 4 documents and one directory, and we have to count the root directory too. count = getJobDocumentsProcessed(jobIDString); if (count != 6) - throw new ACFException("Wrong number of documents processed after change - expected 6, saw "+new Long(count).toString()); + throw new ManifoldCFException("Wrong number of documents processed after change - expected 6, saw "+new Long(count).toString()); // We also need to make sure the new document was indexed. Have to think about how to do this though. // MHL @@ -268,7 +268,7 @@ public class APISanity extends TestBase // The test data area has 3 documents and one directory, and we have to count the root directory too. count = getJobDocumentsProcessed(jobIDString); if (count != 5) - throw new ACFException("Wrong number of documents processed after delete - expected 5, saw "+new Long(count).toString()); + throw new ManifoldCFException("Wrong number of documents processed after delete - expected 5, saw "+new Long(count).toString()); // Now, delete the job. deleteJob(jobIDString); @@ -379,7 +379,7 @@ public class APISanity extends TestBase break; if (status.equals("error")) throw new Exception("Job reports error."); - ACF.sleep(10000L); + ManifoldCF.sleep(10000L); continue; } } @@ -392,7 +392,7 @@ public class APISanity extends TestBase String status = getJobStatus(jobIDString); if (status == null) break; - ACF.sleep(10000L); + ManifoldCF.sleep(10000L); } } Modified: incubator/lcf/trunk/modules/tests/filesystem/org/apache/manifoldcf/filesystem_tests/Sanity.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/tests/filesystem/org/apache/manifoldcf/filesystem_tests/Sanity.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/tests/filesystem/org/apache/manifoldcf/filesystem_tests/Sanity.java (original) +++ incubator/lcf/trunk/modules/tests/filesystem/org/apache/manifoldcf/filesystem_tests/Sanity.java Mon Oct 4 14:32:19 2010 @@ -21,7 +21,7 @@ package org.apache.manifoldcf.filesystem import org.apache.manifoldcf.core.interfaces.*; import org.apache.manifoldcf.agents.interfaces.*; import org.apache.manifoldcf.crawler.interfaces.*; -import org.apache.manifoldcf.crawler.system.ACF; +import org.apache.manifoldcf.crawler.system.ManifoldCF; import java.io.*; import java.util.*; @@ -109,9 +109,9 @@ public class Sanity extends TestBase // Crawl everything underneath the 'testdata' area File testDataFile = new File("testdata").getCanonicalFile(); if (!testDataFile.exists()) - throw new ACFException("Test data area not found! Looking in "+testDataFile.toString()); + throw new ManifoldCFException("Test data area not found! Looking in "+testDataFile.toString()); if (!testDataFile.isDirectory()) - throw new ACFException("Test data area not a directory! Looking in "+testDataFile.toString()); + throw new ManifoldCFException("Test data area not a directory! Looking in "+testDataFile.toString()); SpecificationNode sn = new SpecificationNode("startpoint"); sn.setAttribute("path",testDataFile.toString()); SpecificationNode n = new SpecificationNode("include"); @@ -145,7 +145,7 @@ public class Sanity extends TestBase JobStatus status = jobManager.getStatus(job.getID()); // The test data area has 3 documents and one directory, and we have to count the root directory too. if (status.getDocumentsProcessed() != 5) - throw new ACFException("Wrong number of documents processed - expected 5, saw "+new Long(status.getDocumentsProcessed()).toString()); + throw new ManifoldCFException("Wrong number of documents processed - expected 5, saw "+new Long(status.getDocumentsProcessed()).toString()); // Add a file and recrawl createFile(new File("testdata/testdir/test4.txt"),"Added file"); @@ -157,7 +157,7 @@ public class Sanity extends TestBase status = jobManager.getStatus(job.getID()); // The test data area has 4 documents and one directory, and we have to count the root directory too. if (status.getDocumentsProcessed() != 6) - throw new ACFException("Wrong number of documents processed after add - expected 6, saw "+new Long(status.getDocumentsProcessed()).toString()); + throw new ManifoldCFException("Wrong number of documents processed after add - expected 6, saw "+new Long(status.getDocumentsProcessed()).toString()); // Change a file, and recrawl changeFile(new File("testdata/test1.txt"),"Modified contents"); @@ -169,7 +169,7 @@ public class Sanity extends TestBase status = jobManager.getStatus(job.getID()); // The test data area has 4 documents and one directory, and we have to count the root directory too. if (status.getDocumentsProcessed() != 6) - throw new ACFException("Wrong number of documents processed after change - expected 6, saw "+new Long(status.getDocumentsProcessed()).toString()); + throw new ManifoldCFException("Wrong number of documents processed after change - expected 6, saw "+new Long(status.getDocumentsProcessed()).toString()); // We also need to make sure the new document was indexed. Have to think about how to do this though. // MHL @@ -184,7 +184,7 @@ public class Sanity extends TestBase status = jobManager.getStatus(job.getID()); // The test data area has 3 documents and one directory, and we have to count the root directory too. if (status.getDocumentsProcessed() != 5) - throw new ACFException("Wrong number of documents processed after delete - expected 5, saw "+new Long(status.getDocumentsProcessed()).toString()); + throw new ManifoldCFException("Wrong number of documents processed after delete - expected 5, saw "+new Long(status.getDocumentsProcessed()).toString()); // Now, delete the job. jobManager.deleteJob(job.getID()); @@ -200,24 +200,24 @@ public class Sanity extends TestBase } protected void waitJobInactive(IJobManager jobManager, Long jobID) - throws ACFException, InterruptedException + throws ManifoldCFException, InterruptedException { while (true) { JobStatus status = jobManager.getStatus(jobID); if (status == null) - throw new ACFException("No such job: '"+jobID+"'"); + throw new ManifoldCFException("No such job: '"+jobID+"'"); int statusValue = status.getStatus(); switch (statusValue) { case JobStatus.JOBSTATUS_NOTYETRUN: - throw new ACFException("Job was never started."); + throw new ManifoldCFException("Job was never started."); case JobStatus.JOBSTATUS_COMPLETED: break; case JobStatus.JOBSTATUS_ERROR: - throw new ACFException("Job reports error status: "+status.getErrorText()); + throw new ManifoldCFException("Job reports error status: "+status.getErrorText()); default: - ACF.sleep(10000L); + ManifoldCF.sleep(10000L); continue; } break; @@ -225,14 +225,14 @@ public class Sanity extends TestBase } protected void waitJobDeleted(IJobManager jobManager, Long jobID) - throws ACFException, InterruptedException + throws ManifoldCFException, InterruptedException { while (true) { JobStatus status = jobManager.getStatus(jobID); if (status == null) break; - ACF.sleep(10000L); + ManifoldCF.sleep(10000L); } } Modified: incubator/lcf/trunk/modules/tests/filesystem/org/apache/manifoldcf/filesystem_tests/TestBase.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/tests/filesystem/org/apache/manifoldcf/filesystem_tests/TestBase.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/modules/tests/filesystem/org/apache/manifoldcf/filesystem_tests/TestBase.java (original) +++ incubator/lcf/trunk/modules/tests/filesystem/org/apache/manifoldcf/filesystem_tests/TestBase.java Mon Oct 4 14:32:19 2010 @@ -21,7 +21,7 @@ package org.apache.manifoldcf.filesystem import org.apache.manifoldcf.core.interfaces.*; import org.apache.manifoldcf.agents.interfaces.*; import org.apache.manifoldcf.crawler.interfaces.*; -import org.apache.manifoldcf.crawler.system.ACF; +import org.apache.manifoldcf.crawler.system.ManifoldCF; import java.io.*; import java.util.*; @@ -131,7 +131,7 @@ public class TestBase extends org.apache // API support - // These methods allow communication with the ACF api webapp, via the locally-instantiated jetty + // These methods allow communication with the ManifoldCF api webapp, via the locally-instantiated jetty /** Construct a command url. */ @@ -343,7 +343,7 @@ public class TestBase extends org.apache { jobManager.manualAbort(desc.getID()); } - catch (ACFException e) + catch (ManifoldCFException e) { // This generally means that the job was not running } @@ -366,7 +366,7 @@ public class TestBase extends org.apache case JobStatus.JOBSTATUS_ERROR: break; default: - ACF.sleep(10000); + ManifoldCF.sleep(10000); continue; } } @@ -383,7 +383,7 @@ public class TestBase extends org.apache { jobManager.deleteJob(desc.getID()); } - catch (ACFException e) + catch (ManifoldCFException e) { // This usually means that the job is already being deleted } @@ -399,7 +399,7 @@ public class TestBase extends org.apache JobStatus status = jobManager.getStatus(desc.getID()); if (status != null) { - ACF.sleep(10000); + ManifoldCF.sleep(10000); continue; } break; @@ -472,11 +472,11 @@ public class TestBase extends org.apache break; // Start whatever agents need to be started - ACF.startAgents(tc); + ManifoldCF.startAgents(tc); try { - ACF.sleep(5000); + ManifoldCF.sleep(5000); } catch (InterruptedException e) { @@ -484,7 +484,7 @@ public class TestBase extends org.apache } } } - catch (ACFException e) + catch (ManifoldCFException e) { daemonException = e; } @@ -492,9 +492,9 @@ public class TestBase extends org.apache { try { - ACF.stopAgents(tc); + ManifoldCF.stopAgents(tc); } - catch (ACFException e) + catch (ManifoldCFException e) { daemonException = e; } Modified: incubator/lcf/trunk/tests/crawler-testing-package/org/apache/manifoldcf/authorities/ResetAll.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/crawler-testing-package/org/apache/manifoldcf/authorities/ResetAll.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/tests/crawler-testing-package/org/apache/manifoldcf/authorities/ResetAll.java (original) +++ incubator/lcf/trunk/tests/crawler-testing-package/org/apache/manifoldcf/authorities/ResetAll.java Mon Oct 4 14:32:19 2010 @@ -44,7 +44,7 @@ public class ResetAll try { - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); // Now, get a list of the authority connections IAuthorityConnectionManager mgr = AuthorityConnectionManagerFactory.make(tc); Modified: incubator/lcf/trunk/tests/crawler-testing-package/org/apache/manifoldcf/crawler/JobStartSpinner.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/crawler-testing-package/org/apache/manifoldcf/crawler/JobStartSpinner.java?rev=1004255&r1=1004254&r2=1004255&view=diff ============================================================================== --- incubator/lcf/trunk/tests/crawler-testing-package/org/apache/manifoldcf/crawler/JobStartSpinner.java (original) +++ incubator/lcf/trunk/tests/crawler-testing-package/org/apache/manifoldcf/crawler/JobStartSpinner.java Mon Oct 4 14:32:19 2010 @@ -48,7 +48,7 @@ public class JobStartSpinner try { - ACF.initializeEnvironment(); + ManifoldCF.initializeEnvironment(); // Create the import thread Thread importThread = new ImportThread(1000,importFilename); // Create the job start thread @@ -102,7 +102,7 @@ public class JobStartSpinner int i = 0; while (i < repeatCount) { - ACF.importConfiguration(tc,fileName); + ManifoldCF.importConfiguration(tc,fileName); if ((i % 100) == 0) System.out.println("Configuration import #"+Integer.toString(i)+" succeeded."); i++;