Skip to content

Commit

Permalink
removed debug listener
Browse files Browse the repository at this point in the history
  • Loading branch information
salvatore-coppola committed Feb 21, 2025
1 parent cc2f172 commit 8f6bd48
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
import org.eclipse.kura.web.session.BaseSecurityHandler;
import org.eclipse.kura.web.session.CreateSessionSecurityHandler;
import org.eclipse.kura.web.session.HttpServletContextHelper;
import org.eclipse.kura.web.session.HttpSessionTracker;
import org.eclipse.kura.web.session.RoutingSecurityHandler;
import org.eclipse.kura.web.session.SecurityHandler;
import org.eclipse.kura.web.session.SessionAutorizationSecurityHandler;
Expand All @@ -93,9 +92,6 @@
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpSession;
import jakarta.servlet.http.HttpSessionAttributeListener;
import jakarta.servlet.http.HttpSessionIdListener;
import jakarta.servlet.http.HttpSessionListener;

public class Console implements SelfConfiguringComponent {

Expand Down Expand Up @@ -468,10 +464,6 @@ private synchronized void initResourcesAndServlets() {
registerContextHelper(RESOURCE_CONTEXT_NAME, "/", resourceContextHelper, 5);
registerContextHelper(SESSION_CONTEXT_NAME, "/", sessionContextHelper, 10);

HttpSessionTracker sessionTracker = new HttpSessionTracker();

registerListeners(sessionTracker, SESSION_CONTEXT_NAME);

registerResources(ADMIN_ROOT + "/*", "www", new AdminResources(), RESOURCE_CONTEXT_NAME);
registerResources(AUTH_PATH, "www/auth.html", new AuthorizationResources(), SESSION_CONTEXT_NAME);
registerResources(CONSOLE_PATH, "www/denali.html", new ConsoleResources(), SESSION_CONTEXT_NAME);
Expand Down Expand Up @@ -545,35 +537,6 @@ private synchronized void initResourcesAndServlets() {
this.eventService.start();
}

private void registerListeners(HttpSessionTracker sessionTracker, String contextHelperName) {
Map<String, Object> props = new HashMap<>();

String contextHelperSelector = "(" + HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "="
+ contextHelperName + ")";

props.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_LISTENER, "true");
props.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT, contextHelperSelector);

ServiceRegistration<HttpSessionListener> listenerService1 = this.bundleContext
.registerService(HttpSessionListener.class, sessionTracker, new Hashtable<>(props));

ServiceRegistration<HttpSessionIdListener> listenerService2 = this.bundleContext
.registerService(HttpSessionIdListener.class, sessionTracker, new Hashtable<>(props));

ServiceRegistration<HttpSessionAttributeListener> listenerService3 = this.bundleContext
.registerService(HttpSessionAttributeListener.class, sessionTracker, new Hashtable<>(props));

logger.debug("registered listener with id: {} , contextHelperName: {}", //
listenerService1.getReference().getProperty(Constants.SERVICE_ID), contextHelperName);

logger.debug("registered listener with id: {} , contextHelperName: {}", //
listenerService2.getReference().getProperty(Constants.SERVICE_ID), contextHelperName);

logger.debug("registered listener with id: {} , contextHelperName: {}", //
listenerService3.getReference().getProperty(Constants.SERVICE_ID), contextHelperName);

}

private void registerContextHelper(String contextName, String contextPath, ServletContextHelper contextHelper,
int ranking) {
Map<String, Object> props = new HashMap<>();
Expand Down

This file was deleted.

0 comments on commit 8f6bd48

Please sign in to comment.