On Wed, 20 Jun 2001, Oleg V Alexeev wrote:
> Hello Craig,
>
> Interesting question and clear answer... 8)
>
Yah, I really enjoy the interesting ones :-).
> What do you think about such caching for Class? With this approach we
> call forName() method only once - no other overhead.
>
Class loaders do this kind of caching already, so I guess I don't see all
that much benefit.
For Struts in particular, if you're concerned about repeated
Class.forName() calls, a better strategy is avoidance -- arrange your
application so that the form beans are created for you ahead of
time. Then Struts will never have to call it.
Or, throw you can just throw hardware at it and take advantage of Moore's
Law ... :-)
Craig