logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Log4j Configuration with Servlet
Date Thu, 12 Dec 2002 14:29:47 GMT

>Mr is right; But only if you are using the servlet api 2.3 this would
>work. My solution was done before... ;-)

That's true.  My solution requires servlet API 2.3 or later, and I
should've mentioned that.  In fact, until v2.3 came out, I had a
load-on-startup servlet as well.  The only way I found out about the
server's permission to reload was because we have a very broad mix of
servlet containers used in production.

>I love it ;-)
>"The reflection API represents, or reflects, the classes, interfaces,
>objects in the current Java Virtual Machine."
>With the reflection API you can:
>Determine the class of an object.
>Exactly this is done here. What in your opinion is that else?

Two reasons why I said the above is not reflection per-se:

1. It doesn't use anything in the java.lang.reflect package
2. The above method call is a delegator to the ClassLoader getResources,
which calls findResource.  In all the ClassLoaders I've implemented and
seen implemented, not one has used proper reflection to find a resource,
and for good reasons.

The above definition of reflection, whose source wasn't quoted and
differs from the latest JavaDoc for java.lang.reflect, is very broad and
could be used for nearly every statement in the java language ;)  If
taken literally, I agree that it could describe
CLASSNAME.class.getResource("...") as well ;)

But it's a nitpicky argument that comes down to interpretation, and it's
not relevant to this thread, so in the interest of not filling up
people's mailboxes with junk, I'm going to stop here ;)

Yoav Shapira
Millennium ChemInformatics

To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

View raw message