import javax.jcr.Session;
import javax.jcr.SimpleCredentials;
import javax.security.auth.Subject;
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
import javax.transaction.TransactionManager;
import javax.transaction.TransactionSynchronizationRegistry;
import javax.transaction.UserTransaction;
throw new ArgeoException("Cannot initialize", e);
} finally {
Thread.currentThread().setContextClassLoader(currentContextCl);
+ // FIXME better manage lifecycle.
+ try {
+ new LoginContext(LOGIN_CONTEXT_KERNEL,
+ nodeSecurity.getKernelSubject()).logout();
+ } catch (LoginException e) {
+ e.printStackTrace();
+ }
}
long jvmUptime = ManagementFactory.getRuntimeMXBean().getUptime();
// TODO find constants
Object httpPort = sr.getProperty("http.port");
Object httpsPort = sr.getProperty("https.port");
- dataHttp = new DataHttp(httpService, repository);
- nodeHttp = new NodeHttp(httpService);
+ dataHttp = new DataHttp(httpService);
+ nodeHttp = new NodeHttp(httpService, repository);
if (log.isDebugEnabled())
log.debug(httpPortsMsg(httpPort, httpsPort));
}
rootThreadGroup.enumerate(threads);
int nonDameonCount = 0;
for (Thread t : threads)
- if (!t.isDaemon())
+ if (t != null && !t.isDaemon())
nonDameonCount++;
return nonDameonCount;
}