You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matthias Kerkhoff <ma...@BESToffers.de> on 2000/11/17 19:16:23 UTC

Re[2]: Are ActionMapping's immutable ?

Hi Craig,

>> [...]

> An individual ActionMapping is *not* assumed to return the same values every
> time.  The ActionMappings collection itself is the cache, so the mapping
> elements are queried any time their value is needed.

Ahhh. So, an ActionMapping is _partially_ immutable - changing the path would
not be recognized and the current implementation of ActionMappings also
does not handle the varying getUnknown's properly. (I asked, because I've
made some optimizations on how the unknown is cached. These optimizations
however do work only under the assumption that the unknown handler does
not change.)
Thinking of ActionMapping's as not being immutable introduces quite a lot
of (yet unhandled) problems. Together with the synchronization thing (see
my mail to Struts-Dev) it will be quite difficult making ActionMapping(s)
handle all possible scenarios - IMHO.

> The same thing goes for the ActionMappings object itself -- the value returned
> by getUnknown() can change dynamically if you wish to vary the choice of
> destination action.

> Unfortunately, however, you do not have much context on which to base that
> decision, since getUnknown() takes no arguments.  Would it be useful to pass in
> the request currently being processed?

See above - I just needed a clarification. I have no need for varying
unknown handlers.

-- 
Matthias                        (mailto:make@BESToffers.de)