Paulo Gaspar wrote:
>
> I have been playing with that idea for some time and I believe that a
> plugable introspection engine should provide his own cache. This means,
> of course, that a introspection engine factory should be defined and
> that this one should be used to create an introspection engine instance
> that should be placed in the internal context.
It doesn't belong in the EventCartridge. That has nothing to do with
introspection.
>
> The default factory would just create an introspection engine instance
> with the current introspection logic and current introspection cache.
>
And the fundamental cache should be global, not context local.
> Cache objects already need to be created in the context (AFAIK). This
> way the introspection engine holding the cache gets created in the
> context.
For a given context, but there should be a global one. The
context-local cache is a great performance help, as it keeps everything
from serializing through the global cache.
> The performance impact of having such functionality in place will be
> unnoticeable (something we already went trough in this list)
Huh? when?
> and this
> will ease the development of alternative introspection strategies.
> Advantages:
> - One can easily test new/alternative implementations of the
> introspection without having to change Velocity's structure;
And if it was pluggable in general, same thing. I don't think this is
an app level API.
> - Customization for different types of introspection (example: getting
> fields instead of/together with properties, case insensitive, etc.);
That's an advantage of pluggable introspection, not the architecture you
seemed to just describe.
> - Customization for different resource needs (example: not using the
> cache for an app with memory restrictions but low performance needs.
Yes, but that's *easily* solvable now. You don't need to rip up the
guts to do that...
> I also think its implementation is not that hard, and I am willing to
> take a shot at it (already made some experimentation there).
Give it a whirl.
--
Geir Magnusson Jr. [EMAIL PROTECTED]
Developing for the web? See http://jakarta.apache.org/velocity/