One thing to note about interceptors is that the behavior is intended to
be as close as possible with Apache modules, IIS filters and NES SAFs.

If you read the docs for the 3 web servers you'll notice an amazing
similarity between their extension mechanism ( which at least in Apache is
also the way all internal functionality is implemented ). 
In other words - there is plenty of documentation for interceptors - if
you can translate the terms used in the 3 servers and tomcat.


There are some differences of course - each server has a different set of
callbacks ( but the most important ones are common !). But if you compare
the behavior and definition in the 3 references it'll be easy to
understand what tomcat is doing.


On Tue, 22 May 2001, Antony Bowesman wrote:

> Having just spent a while digging into Tomcat workings to try to
> understand how to write a realm this would have been a really useful
> primer.  It's a great start.  I would like to see more detail on.
> 
> Contexts.  What is their role in Interceptors.  For example, it seems
> that an Interceptor is a singleton but the contextInit() is called for
> each Context found in server.xml.  

There are "global" interceptors and "per context" interceptors. ( for
example you can set an authentication module as a global module, or you
can customize it differently for different modules  ).

In all cases - modules are notified when context are added and
initialized, that's the role of the contextInit callback.


Costin

Reply via email to