Commit 4838155e authored by Michael Ritter's avatar Michael Ritter
Browse files

Update web.xml for the new ContextListener

parent f76bebe1
......@@ -60,19 +60,21 @@ public class CollectionThreadPoolExecutor extends ThreadPoolExecutor {
// Public interface to interact with the TPE
public KnownFuture<Submittable> submitFileAudit(Collection c, AuditThread at) {
public KSFuture submitFileAudit(Collection c, AuditThread at) {
LOG.info("Submitting [FILE_AUDIT]" + " for " + c.getName());
Submittable submittable = new Submittable(c, Submittable.RunType.FILE_AUDIT, at);
return submitThread(at, submittable);
return submitThread(at, submittable, c);
}
public KnownFuture<Submittable> submitIngestThread(Collection c, IngestThreadPool.IngestSupervisor is) {
public KSFuture submitIngestThread(Collection c, IngestThreadPool.IngestSupervisor is) {
Submittable submittable = new Submittable(c, Submittable.RunType.TOKEN_INGEST, is);
return submitThread(is, submittable);
return submitThread(is, submittable, c);
}
public KnownFuture<Submittable> submitTokenAduit(Collection c, AuditTokens at) {
public KSFuture submitTokenAudit(Collection c, AuditTokens at) {
LOG.info("Submitting [TOKEN_AUDIT]" + " for " + c.getName());
Submittable submittable = new Submittable(c, Submittable.RunType.TOKEN_AUDIT, at);
return submitThread(at, submittable);
return submitThread(at, submittable, c);
}
public Runnable getRunnableForSubmittable(Collection c, Submittable.RunType t) {
......@@ -105,13 +107,16 @@ public class CollectionThreadPoolExecutor extends ThreadPoolExecutor {
* @param s The submittable to use
* @return true if a new thread was created, false otherwise
*/
private KnownFuture<Submittable> submitThread(Runnable r, Submittable s) {
private KSFuture submitThread(Runnable r, Submittable s, Collection c) {
if (set.add(s)) {
KnownFuture<Submittable> f = new KnownFuture<>(r, s);
KSFuture f = new KSFuture(r, s);
execute(f);
return f;
}
Submittable.RunType t = s.getType();
LOG.info("Already submitted RunType [" + t.name() + "]" + " for " + c.getName());
return null;
}
......
......@@ -54,7 +54,10 @@
<description>ServletContextListener</description>
<listener-class>edu.umiacs.ace.monitor.core.CollectionSettingsMigrationListener</listener-class>
</listener>
<!-- normal startup listeners, shedulers, etc -->
<!-- normal startup listeners, schedulers, etc -->
<listener>
<listener-class>edu.umiacs.ace.util.CollectionThreadPoolContextListener</listener-class>
</listener>
<listener>
<listener-class>edu.umiacs.ace.monitor.access.CollectionCountContext</listener-class>
</listener>
......
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="ace-ims-ws" />
<orderEntry type="library" name="Maven: log4j:log4j:1.2.16" level="project" />
<orderEntry type="module" module-name="ace-common" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.8.2" level="project" />
</component>
</module>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment