Quoting Niclas Hedhman <[EMAIL PROTECTED]>:

> On Thursday 20 January 2005 05:48, Jacob Kjome wrote:
> > Only server implementing
> > child-first classloading behavior could allow you to bundle log4j.jar with
> > the webapp and count on that version being used rather than the server
> > version.
>
> Not necessarily true.
>

You mean not necessarily true *if* the container has not already provided the
library on the system or otherwise server-provided classloader.  Of course,
that's plainly obvious.

> IMHO, A container should NOT provide/expose anything beyond the 'explicit
> requirements' to the contained applications. Everything else quickly creates
> a mess. Unfortunately, there seems to be an entropy going on "out there",
> where stuff slowly makes its way into the system classloader and other shared
> classloader hierarchies, and applications start relying on that these shared
> resources 'exists', and don't bundle them.
>

I understand what you are saying, but when the server (or custom service needed
at the system or server classloader level) uses Log4j logging or whatever other
library itself, it is going to be exposed to all children.  This can be
unfortunate or fortunate depending on your point of view and needs.  But the
fact is, it is there and and has to be delbt with.  If you want to come up an
alternative where this isn't an issue, I welcome it.  But I'm not sure it is
even theoretically possible to avoid this completley.  I agree, it can be
minimized with care.

> I don;t know the internals of Tomcat now, but once upon a time, the whole
> point of Catalina was exactly the above, and not a "Child First Behavior". If
> CFB is in place in Tomcat, it is because of this bad entropy, and Tomcat is
> then indirectly adding to it.

No, it is because the servlet spec defines it (it's a recommendation, not a
requirement) and Tomcat implements the servlet spec.  No mystery or
non-standard kludge here.  Maybe Yoav can comment on this for a more definitive
answer?

> Whether Log4J has added its share to the current state, I will leave
> unsaid... :o)
>

If you are going to imply it, please say it (even with a happy face).  I'm not
sure what you mean here, but maybe the UGLI stuff eases this issue.


Jake

>
> Well, well...
>
> Cheers
> Niclas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to