private final ServiceTracker<HttpService, HttpService> httpServiceTracker;
private static String httpRealm = "Argeo";
+ private final boolean cleanState;
- public NodeHttp() {
+ public NodeHttp(boolean cleanState) {
+ this.cleanState = cleanState;
httpServiceTracker = new PrepareHttpStc();
// httpServiceTracker.open();
KernelUtils.asyncOpen(httpServiceTracker);
throw new CmsException("An http service is already configured");
repositories = new RepositoriesStc(bc, httpService);
// repositories.open();
- KernelUtils.asyncOpen(repositories);
+ if (cleanState)
+ KernelUtils.asyncOpen(repositories);
log.info(httpPortsMsg(httpPort, httpsPort));
// httpAvailable = true;
// checkReadiness();
@Override
protected void service(final HttpServletRequest request, final HttpServletResponse response)
throws ServletException, IOException {
- // try {
- // Subject subject = subjectFromRequest(request, response);
- // Subject.doAs(subject, new PrivilegedExceptionAction<Void>() {
- // @Override
- // public Void run() throws Exception {
if (log.isTraceEnabled())
HttpUtils.logRequest(log, request);
RemotingServlet.super.service(request, response);
- // return null;
- // }
- // });
- // } catch (PrivilegedActionException e) {
- // throw new CmsException("Cannot process JCR remoting request",
- // e.getException());
- // }
}
}