[PAX-WEB] In Karaf using Jetty 9.3 and Pax-Web, is there a way to override the default SessionManager for ALL?

6 views
Skip to first unread message

Peter Berkman

unread,
Aug 21, 2019, 6:59:53 PM8/21/19
to OPS4J
In Karaf using Jetty 9.3 and Pax-Web, is there a way to override the default SessionManager for ALL?

I don't have access to all of the web.xml or bundles.  I've searched for hours and cannot find anything...  I'm hoping someone here will have an idea!  Thank YOU!

Grzegorz Grzybek

unread,
Sep 10, 2019, 4:53:16 AM9/10/19
to op...@googlegroups.com
Hello

Sorry for late answer.

org.ops4j.pax.web.service.jetty.internal.HttpServiceContext (extension of org.eclipse.jetty.servlet.ServletContextHandler), when created uses "SESSIONS | SECURITY".
Session handler is created as:
  • org.ops4j.pax.web.service.jetty.internal.LateInvalidatingHashSessionManager, or
  • org.eclipse.jetty.server.session.JDBCSessionManager
(that's hardcoded in org.ops4j.pax.web.service.jetty.internal.HttpServiceContext#newSessionHandler()).

The chosen session manager depends on what's returned by org.eclipse.jetty.server.Server#getSessionIdManager(). LateInvalidatingHashSessionManager is chosen by default, without explicit configuration. The JDBCSessionManager is chosen if SessionIDManager is org.eclipse.jetty.server.session.JDBCSessionIdManager.

I believe JDBCSessionIdManager can be configured in etc/jetty.xml as in https://www.eclipse.org/jetty/documentation/9.3.27.v20190418/session-clustering-jdbc.html

regards
Grzegorz Grzybek

czw., 22 sie 2019 o 00:59 Peter Berkman <peterc...@gmail.com> napisał(a):
In Karaf using Jetty 9.3 and Pax-Web, is there a way to override the default SessionManager for ALL?

I don't have access to all of the web.xml or bundles.  I've searched for hours and cannot find anything...  I'm hoping someone here will have an idea!  Thank YOU!

--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/927a810f-91ee-409e-95f2-819e1d9faa53%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages