Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/DefineRepositoryConnection.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/DefineRepositoryConnection.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/DefineRepositoryConnection.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/DefineRepositoryConnection.java Sat Sep 28 13:14:47 2013 @@ -28,69 +28,66 @@ import java.util.*; */ public class DefineRepositoryConnection { - public static final String _rcsid = "@(#)$Id: DefineRepositoryConnection.java 988245 2010-08-23 18:39:35Z kwright $"; + public static final String _rcsid = "@(#)$Id: DefineRepositoryConnection.java 988245 2010-08-23 18:39:35Z kwright $"; - private DefineRepositoryConnection() - { - } - - - public static void main(String[] args) - { - if (args.length < 5) - { - System.err.println("Usage: DefineRepositoryConnection <connection_name> <description> <connector_class> <authority_name> <pool_max> <param1>=<value1> ..."); - System.exit(1); - } - - String connectionName = args[0]; - String description = args[1]; - String connectorClass = args[2]; - String authorityName = args[3]; - String poolMax = args[4]; - - - try - { - ManifoldCF.initializeEnvironment(); - IThreadContext tc = ThreadContextFactory.make(); - IRepositoryConnectionManager mgr = RepositoryConnectionManagerFactory.make(tc); - IRepositoryConnection conn = mgr.create(); - conn.setName(connectionName); - conn.setDescription(description); - conn.setClassName(connectorClass); - if (authorityName.length() > 0) - conn.setACLAuthority(authorityName); - conn.setMaxConnections(new Integer(poolMax).intValue()); - ConfigParams x = conn.getConfigParams(); - int i = 5; - while (i < args.length) - { - String arg = args[i++]; - // Parse - int pos = arg.indexOf("="); - if (pos == -1) - throw new ManifoldCFException("Argument missing ="); - String name = arg.substring(0,pos); - String value = arg.substring(pos+1); - if (name.endsWith("assword")) - x.setObfuscatedParameter(name,value); - else - x.setParameter(name,value); - } - - // Now, save - mgr.save(conn); - - } - catch (Exception e) - { - e.printStackTrace(); - System.exit(2); - } - } + private DefineRepositoryConnection() + { + } + + + public static void main(String[] args) + { + if (args.length < 5) + { + System.err.println("Usage: DefineRepositoryConnection <connection_name> <description> <connector_class> <authority_name> <pool_max> <param1>=<value1> ..."); + System.exit(1); + } + + String connectionName = args[0]; + String description = args[1]; + String connectorClass = args[2]; + String authorityName = args[3]; + String poolMax = args[4]; + + + try + { + IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); + IRepositoryConnectionManager mgr = RepositoryConnectionManagerFactory.make(tc); + IRepositoryConnection conn = mgr.create(); + conn.setName(connectionName); + conn.setDescription(description); + conn.setClassName(connectorClass); + if (authorityName.length() > 0) + conn.setACLAuthority(authorityName); + conn.setMaxConnections(new Integer(poolMax).intValue()); + ConfigParams x = conn.getConfigParams(); + int i = 5; + while (i < args.length) + { + String arg = args[i++]; + // Parse + int pos = arg.indexOf("="); + if (pos == -1) + throw new ManifoldCFException("Argument missing ="); + String name = arg.substring(0,pos); + String value = arg.substring(pos+1); + if (name.endsWith("assword")) + x.setObfuscatedParameter(name,value); + else + x.setParameter(name,value); + } + + // Now, save + mgr.save(conn); + + } + catch (Exception e) + { + e.printStackTrace(); + System.exit(2); + } + } - - - }
Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/DeleteJob.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/DeleteJob.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/DeleteJob.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/DeleteJob.java Sat Sep 28 13:14:47 2013 @@ -28,36 +28,36 @@ import java.util.*; */ public class DeleteJob { - public static final String _rcsid = "@(#)$Id: DeleteJob.java 988245 2010-08-23 18:39:35Z kwright $"; + public static final String _rcsid = "@(#)$Id: DeleteJob.java 988245 2010-08-23 18:39:35Z kwright $"; - private DeleteJob() - { - } + private DeleteJob() + { + } - public static void main(String[] args) - { - if (args.length != 1) - { - System.err.println("Usage: DeleteJob <jobid>"); - System.exit(1); - } + public static void main(String[] args) + { + if (args.length != 1) + { + System.err.println("Usage: DeleteJob <jobid>"); + System.exit(1); + } - String jobID = args[0]; + String jobID = args[0]; - try - { - ManifoldCF.initializeEnvironment(); - IThreadContext tc = ThreadContextFactory.make(); - IJobManager jobManager = JobManagerFactory.make(tc); - jobManager.deleteJob(new Long(jobID)); - System.out.println("Job deleting"); - } - catch (Exception e) - { - e.printStackTrace(); - System.exit(2); - } - } - + try + { + IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); + IJobManager jobManager = JobManagerFactory.make(tc); + jobManager.deleteJob(new Long(jobID)); + System.out.println("Job deleting"); + } + catch (Exception e) + { + e.printStackTrace(); + System.exit(2); + } + } + } Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/DeleteRepositoryConnection.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/DeleteRepositoryConnection.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/DeleteRepositoryConnection.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/DeleteRepositoryConnection.java Sat Sep 28 13:14:47 2013 @@ -28,38 +28,38 @@ import java.util.*; */ public class DeleteRepositoryConnection { - public static final String _rcsid = "@(#)$Id: DeleteRepositoryConnection.java 988245 2010-08-23 18:39:35Z kwright $"; + public static final String _rcsid = "@(#)$Id: DeleteRepositoryConnection.java 988245 2010-08-23 18:39:35Z kwright $"; - private DeleteRepositoryConnection() - { - } - - - public static void main(String[] args) - { - if (args.length != 1) - { - System.err.println("Usage: DeleteRepositoryConnection <connection_name>"); - System.exit(1); - } - - String connectionName = args[0]; - try - { - ManifoldCF.initializeEnvironment(); - IThreadContext tc = ThreadContextFactory.make(); - IRepositoryConnectionManager mgr = RepositoryConnectionManagerFactory.make(tc); - mgr.delete(connectionName); - - } - catch (Exception e) - { - e.printStackTrace(); - System.exit(2); - } - } + private DeleteRepositoryConnection() + { + } + + + public static void main(String[] args) + { + if (args.length != 1) + { + System.err.println("Usage: DeleteRepositoryConnection <connection_name>"); + System.exit(1); + } + + String connectionName = args[0]; + try + { + IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); + IRepositoryConnectionManager mgr = RepositoryConnectionManagerFactory.make(tc); + mgr.delete(connectionName); + + } + catch (Exception e) + { + e.printStackTrace(); + System.exit(2); + } + } - + } Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/FindJob.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/FindJob.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/FindJob.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/FindJob.java Sat Sep 28 13:14:47 2013 @@ -48,8 +48,8 @@ public class FindJob try { - ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); IJobManager jobManager = JobManagerFactory.make(tc); IJobDescription[] jobs = jobManager.getAllJobs(); int i = 0; Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/GetJobSchedule.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/GetJobSchedule.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/GetJobSchedule.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/GetJobSchedule.java Sat Sep 28 13:14:47 2013 @@ -49,8 +49,8 @@ public class GetJobSchedule try { - ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); IJobManager jobManager = JobManagerFactory.make(tc); IJobDescription job = jobManager.load(new Long(jobID)); Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/InitializeAndRegister.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/InitializeAndRegister.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/InitializeAndRegister.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/InitializeAndRegister.java Sat Sep 28 13:14:47 2013 @@ -53,8 +53,8 @@ public class InitializeAndRegister try { - ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); InitializeAndRegister register = new InitializeAndRegister(); register.doExecute(tc); Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobStatuses.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobStatuses.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobStatuses.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobStatuses.java Sat Sep 28 13:14:47 2013 @@ -47,8 +47,8 @@ public class ListJobStatuses try { - ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); IJobManager jobManager = JobManagerFactory.make(tc); JobStatus[] jobStatuses = jobManager.getAllStatus(); Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobs.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobs.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobs.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobs.java Sat Sep 28 13:14:47 2013 @@ -47,8 +47,8 @@ public class ListJobs try { - ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); IJobManager jobManager = JobManagerFactory.make(tc); IJobDescription[] jobs = jobManager.getAllJobs(); Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/PauseJob.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/PauseJob.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/PauseJob.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/PauseJob.java Sat Sep 28 13:14:47 2013 @@ -28,38 +28,38 @@ import java.util.*; */ public class PauseJob { - public static final String _rcsid = "@(#)$Id: PauseJob.java 988245 2010-08-23 18:39:35Z kwright $"; + public static final String _rcsid = "@(#)$Id: PauseJob.java 988245 2010-08-23 18:39:35Z kwright $"; - private PauseJob() - { - } - - // Add: throttle, priority, recrawl interval - - public static void main(String[] args) - { - if (args.length != 1) - { - System.err.println("Usage: PauseJob <jobid>"); - System.exit(1); - } - - String jobID = args[0]; - - - try - { - ManifoldCF.initializeEnvironment(); - IThreadContext tc = ThreadContextFactory.make(); - IJobManager jobManager = JobManagerFactory.make(tc); - jobManager.pauseJob(new Long(jobID)); - System.out.println("Job paused"); - } - catch (Exception e) - { - e.printStackTrace(); - System.exit(2); - } - } - + private PauseJob() + { + } + + // Add: throttle, priority, recrawl interval + + public static void main(String[] args) + { + if (args.length != 1) + { + System.err.println("Usage: PauseJob <jobid>"); + System.exit(1); + } + + String jobID = args[0]; + + + try + { + IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); + IJobManager jobManager = JobManagerFactory.make(tc); + jobManager.pauseJob(new Long(jobID)); + System.out.println("Job paused"); + } + catch (Exception e) + { + e.printStackTrace(); + System.exit(2); + } + } + } Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RestartJob.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RestartJob.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RestartJob.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RestartJob.java Sat Sep 28 13:14:47 2013 @@ -28,38 +28,38 @@ import java.util.*; */ public class RestartJob { - public static final String _rcsid = "@(#)$Id: RestartJob.java 988245 2010-08-23 18:39:35Z kwright $"; + public static final String _rcsid = "@(#)$Id: RestartJob.java 988245 2010-08-23 18:39:35Z kwright $"; - private RestartJob() - { - } - - // Add: throttle, priority, recrawl interval - - public static void main(String[] args) - { - if (args.length != 1) - { - System.err.println("Usage: RestartJob <jobid>"); - System.exit(1); - } - - String jobID = args[0]; - - - try - { - ManifoldCF.initializeEnvironment(); - IThreadContext tc = ThreadContextFactory.make(); - IJobManager jobManager = JobManagerFactory.make(tc); - jobManager.restartJob(new Long(jobID)); - System.err.println("Job resuming"); - } - catch (Exception e) - { - e.printStackTrace(); - System.exit(2); - } - } - + private RestartJob() + { + } + + // Add: throttle, priority, recrawl interval + + public static void main(String[] args) + { + if (args.length != 1) + { + System.err.println("Usage: RestartJob <jobid>"); + System.exit(1); + } + + String jobID = args[0]; + + + try + { + IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); + IJobManager jobManager = JobManagerFactory.make(tc); + jobManager.restartJob(new Long(jobID)); + System.err.println("Job resuming"); + } + catch (Exception e) + { + e.printStackTrace(); + System.exit(2); + } + } + } Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunDocumentStatus.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunDocumentStatus.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunDocumentStatus.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunDocumentStatus.java Sat Sep 28 13:14:47 2013 @@ -75,8 +75,8 @@ public class RunDocumentStatus try { - ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); IJobManager jobManager = JobManagerFactory.make(tc); StatusFilterCriteria filter = parseFilterCriteria(jobList,currentTime,matchRegexp,matchStateList,matchStatusList); Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxActivityHistory.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxActivityHistory.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxActivityHistory.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxActivityHistory.java Sat Sep 28 13:14:47 2013 @@ -72,8 +72,8 @@ public class RunMaxActivityHistory try { - ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); IRepositoryConnectionManager connManager = RepositoryConnectionManagerFactory.make(tc); FilterCriteria filter = parseFilterCriteria(activityList,startTime,endTime,entityRegexp,resultCodeRegexp); Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxBandwidthHistory.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxBandwidthHistory.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxBandwidthHistory.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxBandwidthHistory.java Sat Sep 28 13:14:47 2013 @@ -72,8 +72,8 @@ public class RunMaxBandwidthHistory try { - ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); IRepositoryConnectionManager connManager = RepositoryConnectionManagerFactory.make(tc); FilterCriteria filter = parseFilterCriteria(activityList,startTime,endTime,entityRegexp,resultCodeRegexp); Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunQueueStatus.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunQueueStatus.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunQueueStatus.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunQueueStatus.java Sat Sep 28 13:14:47 2013 @@ -77,8 +77,8 @@ public class RunQueueStatus try { - ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); IJobManager jobManager = JobManagerFactory.make(tc); StatusFilterCriteria filter = parseFilterCriteria(jobList,currentTime,matchRegexp,matchStateList,matchStatusList); Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunResultHistory.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunResultHistory.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunResultHistory.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunResultHistory.java Sat Sep 28 13:14:47 2013 @@ -73,8 +73,8 @@ public class RunResultHistory try { - ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); IRepositoryConnectionManager connManager = RepositoryConnectionManagerFactory.make(tc); FilterCriteria filter = parseFilterCriteria(activityList,startTime,endTime,entityRegexp,resultCodeRegexp); Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunSimpleHistory.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunSimpleHistory.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunSimpleHistory.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunSimpleHistory.java Sat Sep 28 13:14:47 2013 @@ -70,8 +70,8 @@ public class RunSimpleHistory try { - ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); IRepositoryConnectionManager connManager = RepositoryConnectionManagerFactory.make(tc); FilterCriteria filter = parseFilterCriteria(activityList,startTime,endTime,entityRegexp,resultCodeRegexp); Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/StartJob.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/StartJob.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/StartJob.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/StartJob.java Sat Sep 28 13:14:47 2013 @@ -49,8 +49,8 @@ public class StartJob try { - ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); IJobManager jobManager = JobManagerFactory.make(tc); jobManager.manualStart(new Long(jobID)); System.out.println("Job starting"); Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/TransactionalCrawlerInitializationCommand.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/TransactionalCrawlerInitializationCommand.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/TransactionalCrawlerInitializationCommand.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/TransactionalCrawlerInitializationCommand.java Sat Sep 28 13:14:47 2013 @@ -30,8 +30,8 @@ public abstract class TransactionalCrawl { public void execute() throws ManifoldCFException { - ManifoldCF.initializeEnvironment(); IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); IDBInterface database = DBInterfaceFactory.make(tc, org.apache.manifoldcf.agents.system.ManifoldCF.getMasterDatabaseName(), org.apache.manifoldcf.agents.system.ManifoldCF.getMasterDatabaseUsername(), Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/WaitForJobDeleted.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/WaitForJobDeleted.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/WaitForJobDeleted.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/WaitForJobDeleted.java Sat Sep 28 13:14:47 2013 @@ -28,44 +28,44 @@ import java.util.*; */ public class WaitForJobDeleted { - public static final String _rcsid = "@(#)$Id: WaitForJobDeleted.java 988245 2010-08-23 18:39:35Z kwright $"; + public static final String _rcsid = "@(#)$Id: WaitForJobDeleted.java 988245 2010-08-23 18:39:35Z kwright $"; + + private WaitForJobDeleted() + { + } + + // Add: throttle, priority, recrawl interval + + public static void main(String[] args) + { + if (args.length != 1) + { + System.err.println("Usage: WaitForJobDeleted <jobid>"); + System.exit(1); + } + + String jobID = args[0]; + + + try + { + IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); + IJobManager jobManager = JobManagerFactory.make(tc); + while (true) + { + JobStatus status = jobManager.getStatus(new Long(jobID)); + if (status == null) + break; + ManifoldCF.sleep(10000); + } + + } + catch (Exception e) + { + e.printStackTrace(); + System.exit(2); + } + } - private WaitForJobDeleted() - { - } - - // Add: throttle, priority, recrawl interval - - public static void main(String[] args) - { - if (args.length != 1) - { - System.err.println("Usage: WaitForJobDeleted <jobid>"); - System.exit(1); - } - - String jobID = args[0]; - - - try - { - ManifoldCF.initializeEnvironment(); - IThreadContext tc = ThreadContextFactory.make(); - IJobManager jobManager = JobManagerFactory.make(tc); - while (true) - { - JobStatus status = jobManager.getStatus(new Long(jobID)); - if (status == null) - break; - ManifoldCF.sleep(10000); - } - - } - catch (Exception e) - { - e.printStackTrace(); - System.exit(2); - } - } - } Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/WaitForJobInactive.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/WaitForJobInactive.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/WaitForJobInactive.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/WaitForJobInactive.java Sat Sep 28 13:14:47 2013 @@ -28,61 +28,61 @@ import java.util.*; */ public class WaitForJobInactive { - public static final String _rcsid = "@(#)$Id: WaitForJobInactive.java 988245 2010-08-23 18:39:35Z kwright $"; + public static final String _rcsid = "@(#)$Id: WaitForJobInactive.java 988245 2010-08-23 18:39:35Z kwright $"; - private WaitForJobInactive() + private WaitForJobInactive() + { + } + + // Add: throttle, priority, recrawl interval + + public static void main(String[] args) + { + if (args.length != 1) + { + System.err.println("Usage: WaitForJobInactive <jobid>"); + System.exit(1); + } + + String jobID = args[0]; + + + try + { + IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); + IJobManager jobManager = JobManagerFactory.make(tc); + + while (true) + { + JobStatus status = jobManager.getStatus(new Long(jobID)); + if (status == null) + throw new ManifoldCFException("No such job: '"+jobID+"'"); + int statusValue = status.getStatus(); + switch (statusValue) { + case JobStatus.JOBSTATUS_NOTYETRUN: + System.out.println("Never run"); + break; + case JobStatus.JOBSTATUS_COMPLETED: + System.out.println("OK"); + break; + case JobStatus.JOBSTATUS_ERROR: + System.out.println("Error: "+status.getErrorText()); + break; + default: + ManifoldCF.sleep(10000); + continue; } + break; + } - // Add: throttle, priority, recrawl interval - - public static void main(String[] args) - { - if (args.length != 1) - { - System.err.println("Usage: WaitForJobInactive <jobid>"); - System.exit(1); - } - - String jobID = args[0]; - - - try - { - ManifoldCF.initializeEnvironment(); - IThreadContext tc = ThreadContextFactory.make(); - IJobManager jobManager = JobManagerFactory.make(tc); - - while (true) - { - JobStatus status = jobManager.getStatus(new Long(jobID)); - if (status == null) - throw new ManifoldCFException("No such job: '"+jobID+"'"); - int statusValue = status.getStatus(); - switch (statusValue) - { - case JobStatus.JOBSTATUS_NOTYETRUN: - System.out.println("Never run"); - break; - case JobStatus.JOBSTATUS_COMPLETED: - System.out.println("OK"); - break; - case JobStatus.JOBSTATUS_ERROR: - System.out.println("Error: "+status.getErrorText()); - break; - default: - ManifoldCF.sleep(10000); - continue; - } - break; - } - - } - catch (Exception e) - { - e.printStackTrace(); - System.exit(2); - } - } - + } + catch (Exception e) + { + e.printStackTrace(); + System.exit(2); + } + } + } Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/WaitJobPaused.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/WaitJobPaused.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/WaitJobPaused.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/WaitJobPaused.java Sat Sep 28 13:14:47 2013 @@ -28,46 +28,46 @@ import java.util.*; */ public class WaitJobPaused { - public static final String _rcsid = "@(#)$Id: WaitJobPaused.java 988245 2010-08-23 18:39:35Z kwright $"; + public static final String _rcsid = "@(#)$Id: WaitJobPaused.java 988245 2010-08-23 18:39:35Z kwright $"; - private WaitJobPaused() + private WaitJobPaused() + { + } + + // Add: throttle, priority, recrawl interval + + public static void main(String[] args) + { + if (args.length != 1) + { + System.err.println("Usage: WaitJobPaused <jobid>"); + System.exit(1); + } + + String jobID = args[0]; + + + try + { + IThreadContext tc = ThreadContextFactory.make(); + ManifoldCF.initializeEnvironment(tc); + IJobManager jobManager = JobManagerFactory.make(tc); + while (true) + { + if (jobManager.checkJobBusy(new Long(jobID))) { + ManifoldCF.sleep(5000); + continue; } - - // Add: throttle, priority, recrawl interval - - public static void main(String[] args) - { - if (args.length != 1) - { - System.err.println("Usage: WaitJobPaused <jobid>"); - System.exit(1); - } - - String jobID = args[0]; - - - try - { - ManifoldCF.initializeEnvironment(); - IThreadContext tc = ThreadContextFactory.make(); - IJobManager jobManager = JobManagerFactory.make(tc); - while (true) - { - if (jobManager.checkJobBusy(new Long(jobID))) - { - ManifoldCF.sleep(5000); - continue; - } - break; - } - System.err.println("Job no longer busy"); - } - catch (Exception e) - { - e.printStackTrace(); - System.exit(2); - } - } - + break; + } + System.err.println("Job no longer busy"); + } + catch (Exception e) + { + e.printStackTrace(); + System.exit(2); + } + } + } Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/CrawlerAgent.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/CrawlerAgent.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/CrawlerAgent.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/CrawlerAgent.java Sat Sep 28 13:14:47 2013 @@ -62,8 +62,8 @@ public class CrawlerAgent implements IAg public void startAgent() throws ManifoldCFException { - org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(); - org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(); + org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(threadContext); + org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(threadContext); ManifoldCF.startSystem(threadContext); } @@ -73,8 +73,8 @@ public class CrawlerAgent implements IAg throws ManifoldCFException { ManifoldCF.stopSystem(threadContext); - org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(); - org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(); + org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(threadContext); + org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(threadContext); } /** Request permission from agent to delete an output connection. Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java Sat Sep 28 13:14:47 2013 @@ -105,35 +105,35 @@ public class ManifoldCF extends org.apac protected static final String connectorsConfigurationFileProperty = "org.apache.manifoldcf.connectorsconfigurationfile"; protected static final String databaseSuperuserNameProperty = "org.apache.manifoldcf.dbsuperusername"; protected static final String databaseSuperuserPasswordProperty = "org.apache.manifoldcf.dbsuperuserpassword"; - protected static final String salt = "org.apache.manifoldcf.salt"; + protected static final String saltProperty = "org.apache.manifoldcf.salt"; /** This object is used to make sure the initialization sequence is atomic. Shutdown cannot occur until the system is in a known state. */ protected static Integer startupLock = new Integer(0); /** Initialize environment. */ - public static void initializeEnvironment() + public static void initializeEnvironment(IThreadContext tc) throws ManifoldCFException { synchronized (initializeFlagLock) { - org.apache.manifoldcf.agents.system.ManifoldCF.initializeEnvironment(); - org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(); - org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(); + org.apache.manifoldcf.agents.system.ManifoldCF.initializeEnvironment(tc); + org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(tc); + org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(tc); } } - public static void cleanUpEnvironment() + public static void cleanUpEnvironment(IThreadContext tc) { synchronized (initializeFlagLock) { - org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(); - org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(); - org.apache.manifoldcf.agents.system.ManifoldCF.cleanUpEnvironment(); + org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(tc); + org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(tc); + org.apache.manifoldcf.agents.system.ManifoldCF.cleanUpEnvironment(tc); } } - public static void localInitialize() + public static void localInitialize(IThreadContext tc) throws ManifoldCFException { synchronized (initializeFlagLock) @@ -143,12 +143,12 @@ public class ManifoldCF extends org.apac return; Logging.initializeLoggers(); - Logging.setLogLevels(); + Logging.setLogLevels(tc); crawlerInitialized = true; } } - public static void localCleanup() + public static void localCleanup(IThreadContext tc) { } @@ -158,12 +158,8 @@ public class ManifoldCF extends org.apac throws ManifoldCFException { // Get the specified superuser name and password, in case this isn't Derby we're using - String superuserName = getProperty(databaseSuperuserNameProperty); - if (superuserName == null) - superuserName = ""; - String superuserPassword = getProperty(databaseSuperuserPasswordProperty); - if (superuserPassword == null) - superuserPassword = ""; + String superuserName = LockManagerFactory.getStringProperty(threadContext, databaseSuperuserNameProperty, ""); + String superuserPassword = LockManagerFactory.getStringProperty(threadContext, databaseSuperuserPasswordProperty, ""); createSystemDatabase(threadContext,superuserName,superuserPassword); } @@ -569,40 +565,22 @@ public class ManifoldCF extends org.apac synchronized (startupLock) { // Now, start all the threads - String maxThreads = getProperty(workerThreadCountProperty); - if (maxThreads == null) - maxThreads = "100"; - numWorkerThreads = new Integer(maxThreads).intValue(); + numWorkerThreads = LockManagerFactory.getIntProperty(threadContext,workerThreadCountProperty,100); if (numWorkerThreads < 1 || numWorkerThreads > 300) throw new ManifoldCFException("Illegal value for the number of worker threads"); - String maxDeleteThreads = getProperty(deleteThreadCountProperty); - if (maxDeleteThreads == null) - maxDeleteThreads = "10"; - String maxCleanupThreads = getProperty(cleanupThreadCountProperty); - if (maxCleanupThreads == null) - maxCleanupThreads = "10"; - String maxExpireThreads = getProperty(expireThreadCountProperty); - if (maxExpireThreads == null) - maxExpireThreads = "10"; - numDeleteThreads = new Integer(maxDeleteThreads).intValue(); + numDeleteThreads = LockManagerFactory.getIntProperty(threadContext,deleteThreadCountProperty,10); + numCleanupThreads = LockManagerFactory.getIntProperty(threadContext,cleanupThreadCountProperty,10); + numExpireThreads = LockManagerFactory.getIntProperty(threadContext,expireThreadCountProperty,10); if (numDeleteThreads < 1 || numDeleteThreads > 300) throw new ManifoldCFException("Illegal value for the number of delete threads"); - numCleanupThreads = new Integer(maxCleanupThreads).intValue(); if (numCleanupThreads < 1 || numCleanupThreads > 300) throw new ManifoldCFException("Illegal value for the number of cleanup threads"); - numExpireThreads = new Integer(maxExpireThreads).intValue(); if (numExpireThreads < 1 || numExpireThreads > 300) throw new ManifoldCFException("Illegal value for the number of expire threads"); - String lowWaterFactorString = getProperty(lowWaterFactorProperty); - if (lowWaterFactorString == null) - lowWaterFactorString = "5"; - lowWaterFactor = new Float(lowWaterFactorString).floatValue(); + lowWaterFactor = (float)LockManagerFactory.getDoubleProperty(threadContext,lowWaterFactorProperty,5.0); if (lowWaterFactor < 1.0 || lowWaterFactor > 1000.0) throw new ManifoldCFException("Illegal value for the low water factor"); - String stuffAmtFactorString = getProperty(stuffAmtFactorProperty); - if (stuffAmtFactorString == null) - stuffAmtFactorString = "2"; - stuffAmtFactor = new Float(stuffAmtFactorString).floatValue(); + stuffAmtFactor = (float)LockManagerFactory.getDoubleProperty(threadContext,stuffAmtFactorProperty,2.0); if (stuffAmtFactor < 0.1 || stuffAmtFactor > 1000.0) throw new ManifoldCFException("Illegal value for the stuffing amount factor"); @@ -1139,7 +1117,7 @@ public class ManifoldCF extends org.apac Cipher cipher = null; try { - cipher = getCipher(Cipher.ENCRYPT_MODE, passCode, iv); + cipher = getCipher(threadContext, Cipher.ENCRYPT_MODE, passCode, iv); } catch (GeneralSecurityException gse) { @@ -1266,7 +1244,7 @@ public class ManifoldCF extends org.apac Cipher cipher = null; try { - cipher = getCipher(Cipher.DECRYPT_MODE, passCode, iv); + cipher = getCipher(threadContext, Cipher.DECRYPT_MODE, passCode, iv); } catch (GeneralSecurityException gse) { @@ -1661,10 +1639,10 @@ public class ManifoldCF extends org.apac private static final int IV_LENGTH = 16; - private static Cipher getCipher(final int mode, final String passCode, final byte[] iv) throws GeneralSecurityException, + private static Cipher getCipher(IThreadContext threadContext, final int mode, final String passCode, final byte[] iv) throws GeneralSecurityException, ManifoldCFException { - final String saltValue = getProperty(salt); + final String saltValue = LockManagerFactory.getProperty(threadContext, saltProperty); if (saltValue == null || saltValue.length() == 0) throw new ManifoldCFException("Missing required SALT value"); Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseDerby.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseDerby.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseDerby.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseDerby.java Sat Sep 28 13:14:47 2013 @@ -116,15 +116,17 @@ public class BaseDerby extends org.apach throws Exception { super.initializeSystem(); - org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(); - org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(); + IThreadContext tc = ThreadContextFactory.make(); + org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(tc); + org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(tc); } protected void cleanupSystem() throws Exception { - org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(); - org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(); + IThreadContext tc = ThreadContextFactory.make(); + org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(tc); + org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(tc); super.cleanupSystem(); } Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseHSQLDB.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseHSQLDB.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseHSQLDB.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseHSQLDB.java Sat Sep 28 13:14:47 2013 @@ -114,15 +114,17 @@ public class BaseHSQLDB extends org.apac throws Exception { super.initializeSystem(); - org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(); - org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(); + IThreadContext tc = ThreadContextFactory.make(); + org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(tc); + org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(tc); } protected void cleanupSystem() throws Exception { - org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(); - org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(); + IThreadContext tc = ThreadContextFactory.make(); + org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(tc); + org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(tc); super.cleanupSystem(); } Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseHSQLDBext.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseHSQLDBext.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseHSQLDBext.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseHSQLDBext.java Sat Sep 28 13:14:47 2013 @@ -114,15 +114,17 @@ public class BaseHSQLDBext extends org.a throws Exception { super.initializeSystem(); - org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(); - org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(); + IThreadContext tc = ThreadContextFactory.make(); + org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(tc); + org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(tc); } protected void cleanupSystem() throws Exception { - org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(); - org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(); + IThreadContext tc = ThreadContextFactory.make(); + org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(tc); + org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(tc); super.cleanupSystem(); } Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseMySQL.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseMySQL.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseMySQL.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BaseMySQL.java Sat Sep 28 13:14:47 2013 @@ -114,15 +114,17 @@ public class BaseMySQL extends org.apach throws Exception { super.initializeSystem(); - org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(); - org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(); + IThreadContext tc = ThreadContextFactory.make(); + org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(tc); + org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(tc); } protected void cleanupSystem() throws Exception { - org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(); - org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(); + IThreadContext tc = ThreadContextFactory.make(); + org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(tc); + org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(tc); super.cleanupSystem(); } Modified: manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BasePostgresql.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BasePostgresql.java?rev=1527182&r1=1527181&r2=1527182&view=diff ============================================================================== --- manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BasePostgresql.java (original) +++ manifoldcf/branches/CONNECTORS-13/framework/pull-agent/src/test/java/org/apache/manifoldcf/crawler/tests/BasePostgresql.java Sat Sep 28 13:14:47 2013 @@ -114,15 +114,17 @@ public class BasePostgresql extends org. throws Exception { super.initializeSystem(); - org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(); - org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(); + IThreadContext tc = ThreadContextFactory.make(); + org.apache.manifoldcf.authorities.system.ManifoldCF.localInitialize(tc); + org.apache.manifoldcf.crawler.system.ManifoldCF.localInitialize(tc); } protected void cleanupSystem() throws Exception { - org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(); - org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(); + IThreadContext tc = ThreadContextFactory.make(); + org.apache.manifoldcf.authorities.system.ManifoldCF.localCleanup(tc); + org.apache.manifoldcf.crawler.system.ManifoldCF.localCleanup(tc); super.cleanupSystem(); }
