tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Assaf Arkin <>
Subject Re: [LONG TERM PLAN] Proposed Architecture for Tomcat.Next Servlet Container
Date Fri, 31 Dec 1999 00:44:06 GMT
> Let's decompose the "interceptor" design pattern.
> ----------
> An Interceptor is responsible to "wrap" around the execution of a
> servlet. The servlet is NOT allowed to rely on the interceptor for it's
> operation. A servlet must expose the same black-box functionality of its
> service(request,response) method indipendent from the presence of zero
> or more interceptors.


> Expecially, since an interceptor is able to behave like a servle without
> the servlet being called, this is _automatically_ tying the servlet to
> the interceptor's presence. Why? Because it behaves differently if it's
> there or not.

Yes and no. The Servlet will behave differently if the interceptor is
there, it will also behave differently if the Servlet is not there to
begin with, or Servlet A has been changed with Servlet B. This is an
environment issue, and interceptors are all about the environment. It's
the interceptor's porogative to decide that a Servlet does not exist (or
not accessed) when in fact it does, or that servlet A is in fact Servlet
B. That's no different than how context configuration works today,
except there is one interceptor that is build into the server.

> So, why don't we create an "authenticator" and remove this functionality
> from "interceptor" or along?

Because an authenticator is one solution to one problem, and Interceptor
is about having any number of solutions to any number of problems. It
could be a logging mechanism. It could be a mechanism that validates the
site's contents to make sure your server has not been hacked. It could
be a mechanism that redirects requests in more ways than the trivial. It
could be a new container replacing the existing one. It could be a load
balancing mechanism, or a session persistence engine. Etc.


> Just my 0.02 euros...
> --
> Stefano Mazzocchi      One must still have chaos in oneself to be
>                           able to give birth to a dancing star.
> <>                             Friedrich Nietzsche
> --------------------------------------------------------------------
>  Come to the first official Apache Software Foundation Conference!
> ------------------------- http://ApacheCon.Com ---------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message