logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Brock" <warj...@hotmail.com>
Subject Re: The penny drops - JBoss Repository Selector
Date Thu, 17 Jan 2002 16:56:02 GMT
Hi Ceki,

I'm trying to reduce the length of my posts, this one will probably
break that rule :-(

Re: Repositories
I'll try explaining this from the beginning. We basically agree
but I'm not getting my point across about multiple repositories.
Maybe I'm missing one of your points as well? :-)

First, here is what JBoss does at the moment.
Nearly the first thing that happens is to deploy an MBean called
Log4JService. This has the task of locating the property file
and sets up the configureAndWatch.
So we have one hierarchy for all logging.

The problem we are trying to solve is what happens when something
doesn't like the JBoss configuration and tries to reconfigure log4j.

A related issue (not the original problem raised on log4j-user) is that
a user wants to take a component that already does logging and put it in
its own hierarchy/configuration.

There are two types of deployment within JBoss.
1) A service, such as embedded Tomcat.
These could provide an internal mechanism for configuring log4j, it
maybe useful for them to run in a different hierarchy.
2) An application. This is the original problem. The application wants
to have a completely separate hierarchy and configuration to JBoss.

The easy solution is every time I see a new ClassLoader in the
RepositorySelector, create a new LoggerRepository.
The configuration will either be specified at deployment or I
use a fallback configuration.
When something tries to reconfigure log4j it will be playing in its own
backyard so problem solved. :-)

But there are 50+ services in the default configuration of JBoss.
Probably only the Web Server may want to reconfigure. The rest just
want to use the JBoss hierarchy and configuration. I would like
to let them share the same repository rather than creating 50
watchdog threads.

Now the extra complication I introduced.
The deployer may want all their applications running in the
repository/hierarchy, but not the JBoss one.
Again it would be wasteful to create a repository for each application when 
they are all sharing.
I am not saying this is what will happen. As you said each applcation
may want to specify its own log4j.properties. In this case, they
each get a repository.

Am I on the right track, have I over complicated this?
Maybe I'm concentrating too much on the 5% instead of the 95%?

I'll pickup the how to specify the url/configurator problem once I've nailed 
the RepositorySelector. I know what the configuration is, it's
just where to put it. JBoss.xml is one idea but that don't exist for
for pure web-apps :-(

Unrelated point: I spotted this in log4j-1.2alpha6 javadocs
org.apache.log4j.varia.PriorityMatchFilter is deprecated to itself, 
recursive deprecation :-)

Regards,
Adrian


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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


Mime
View raw message