tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Assaf Arkin <>
Subject Re: Tomcat.Next Component Interfaces Checked In
Date Sun, 09 Jan 2000 06:41:50 GMT
I can think of several reasons why the interceptor would like to know
what container it's bound to, e.g. to find out what realm it's running,
or get the context configuration, etc.

In that case only setInterceptor is required, not getInterceptor, and
will be called only once thrown an ILSE if called twice. The same design
pattern is also used in EJB with setSessionContext called on a Bean.


> The next from my point of view is Interceptor - I think it should be
> minimal ( no getContainer() or getInfo() ) - and this is the style for
> most interfaces and the current defined interface. Why do we need
> an Interceptor have a pointer to a Container - we can have one
> instance of interceptor that counts ( the number of requests served
> by the server).
> We create a new CountInterceptor() and add it to all Containers
> ( same instance).  It's a perfectly valid problem and solution -
> and it's made imposible by the Interceptor interface, which doesn't
> allow one Interceptor to be used by 2 Containers.
> Costin
> ( again too long, I'm too tired )
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message