For shutdown of some hanging Jackrabbit threads
authorMathieu Baudier <mbaudier@argeo.org>
Fri, 13 Feb 2015 23:25:13 +0000 (23:25 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Fri, 13 Feb 2015 23:25:13 +0000 (23:25 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@7857 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

org.argeo.cms/src/org/argeo/cms/internal/kernel/Kernel.java

index e38704d5cd67df3f2571137ca2ce5f01f2e87657..f2d3995d3e06a101b38d535f4d21f7b07d773a5b 100644 (file)
@@ -4,6 +4,7 @@ import javax.jcr.RepositoryFactory;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.jackrabbit.util.TransientFileFactory;
 import org.argeo.ArgeoException;
 import org.argeo.jackrabbit.OsgiJackrabbitRepositoryFactory;
 import org.argeo.security.core.InternalAuthentication;
@@ -72,6 +73,9 @@ final class Kernel {
                nodeSecurity.destroy();
                node.destroy();
 
+               // Clean hanging threads from Jackrabbit
+               TransientFileFactory.shutdown();
+               
                long duration = System.currentTimeMillis() - begin;
                log.info("## ARGEO CMS DOWN in " + (duration / 1000) + "."
                                + (duration % 1000) + "s ##");