undertow-io/undertow — pull request #164 by pferraro (2014-01-30 20:21:24+00:00)
Title: Introduce SessionIdentifierCodec to easily configure encoding/decoding of routing information to/from the session identifer

Refactor io.undertow.server.session.SessionCookieConfig - extract the SessionConfig implementation into a separate CookieSessionConfig class. This removes duplicated logic between io.undertow.server.session.SessionCookieConfig and io.undertow.servlet.spec.SessionCookieConfigImpl.
Tidy SessionConfig logic in io.undertow.servlet.spec.ServletContextImpl.initDone().

These changes are necessary to complete https://issues.jboss.org/browse/WFLY-2774
Currently, session identifier encoding is implemented within the distributed SessionManager itself. This is insufficient, not only since this logic is needed for the InMemorySessionManager, but also since the session manager is not the only player using the session id. With the above changes, session encoding/decoding is performed entirely within the context of the SessionConfig - this way, all other server components always see a consistent representation of the session id.