You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Craig R. McClanahan" <Cr...@eng.sun.com> on 2000/06/10 21:13:58 UTC

Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/session SessionSerializer.java StandardManager.java

costin@locus.apache.org wrote:

> costin      00/06/10 11:54:51
>
>   Modified:    src/share/org/apache/tomcat/core ServletWrapper.java
>                         SessionManager.java
>                src/share/org/apache/tomcat/session StandardManager.java
>   Added:       src/share/org/apache/tomcat/session SessionSerializer.java
>   Removed:     src/share/org/apache/tomcat/core SessionSerializer.java
>                src/share/org/apache/tomcat/servlets NoInvokerServlet.java
>   Log:
>   - moved SessionSerializer to tomcat/session
>   - removed dependencies between SessionSerializer and tomcat internals.
>   - use ClassLoader instead of ServletLoader ( which is tomcat specific )
>   - added handleReload to SessionManager
>
>   The idea is to keep the Session code independent of the servlet engine implementation.
>   We not only want "plugable" session manager, but we also want that the session
>   plugin is reuseable in ( and from)  other serlvet engines. It seems NES, JRun and
>   probably other engines provide this feature.
>
>   SessionManager represent the requirements of tomcat ( what tomcat needs from a
>   session manager ). The session code should be absolutely independent of tomcat
>   ( it shouldn't use any tomcat class). SessionManager implements the "Adapter" pattern -
>   it allows you to plug external session code into tomcat. It should be easy to
>   make adapters for other "session plugins" ( assuming they are also independent of
>   engine internals).
>

Two issues to watch out for if you completely decouple these:

- Your session manager cannot use the logger associated with
  the context -- not a big deal the way that Tomcat 3.x currently
  uses "logger per component" instead of "logger per context"

- Your session manager cannot use the same class loader that
  the context uses.  This is going to cause you substantial grief
  when you try to reload sessions after a context restart.

Craig McClanahan



Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/session SessionSerializer.java StandardManager.java

Posted by co...@costin.dnt.ro.
> Two issues to watch out for if you completely decouple these:
> 
> - Your session manager cannot use the logger associated with
>   the context -- not a big deal the way that Tomcat 3.x currently
>   uses "logger per component" instead of "logger per context"

Logger is a standalone service, and both the session manager and tomcat
core can use the same logging system. Or different systems - we don't
force any option.

> - Your session manager cannot use the same class loader that
>   the context uses.  This is going to cause you substantial grief
>   when you try to reload sessions after a context restart.

That's the next commit, 5 min. :-)

Costin