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;
*/
final class Kernel {
private final static Log log = LogFactory.getLog(Kernel.class);
+// private static final String PROP_WORKBENCH_AUTOSTART = "org.eclipse.rap.workbenchAutostart";
private final BundleContext bundleContext;
nodeSecurity = new NodeSecurity(bundleContext, node);
nodeHttp = new NodeHttp(bundleContext, node, nodeSecurity);
- // Publish services to OSGi register
+ // Publish services to OSGi
nodeSecurity.publish();
node.publish();
bundleContext.registerService(RepositoryFactory.class,
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 ##");
}
+// private void registerWorkbench(final WorkbenchApplicationConfiguration wac) {
+// new Thread("Worbench Launcher") {
+// public void run() {
+// Hashtable<String, String> props = new Hashtable<String, String>();
+// props.put(ApplicationLauncher.PROPERTY_CONTEXT_NAME, "ui");
+// workbenchReg = bundleContext.registerService(
+// ApplicationConfiguration.class, wac, props);
+// }
+// }.start();
+// }
+
private void directorsCut() {
final long ms = 128l + (long) (Math.random() * 128d);
log.info("Spend " + ms + "ms"