tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cos...@costin.dnt.ro>
Subject Re: authorization providers (was More on JAAS)
Date Thu, 20 Apr 2000 00:20:39 GMT
> The issue I was addressing is, where do I keep state information specific to
> this particular interceptor related to this particular request?  Because
> there's only one instance of the interceptor (so you cannot use instance
> variables unless you internally key things by thread), and you cannot use
> local variables (they go away as each handler method returns) to keep state
> information from one handler method to the next handler method in that same
> interceptor.
>
> It's not that you cannot store state information for this purpose -- it's
> just a little more complicated to have to use something like request
> attributes for things that are (from a logical perspective) private to this
> interceptor.

The local variables are visible only inside invoke(). That means even inside
the same Valve - you can't share them, but just use inside the invoke() method.

Having local variables inside a method ( that are used before and after
the method pass control to the next one in chain) is not so much "less
complicated", and I don't think  it should be on the list of "requirements" for
a
servlet container or subject to "feature comparation" between 2
patterns ...


Costin


Mime
View raw message