Hi Adrian,

At 14:04 16.01.2002 +0000, Adrian Brock wrote:
>Hi Ceki,
>
>Firstly, sorry for posting to log4j-user instead of jboss-user
>I spotted my mistake just as I hit send :-(
>
>Re: WeakHashMap
>It doesn't make any difference if I do an explicit remove,
>it will remain on the heap until the garbage collector
>figures out it is unused.
>
>It might speed up the get(), but lots of deploy/undeploy is not a
>normal operation - optimization isn't very important here.
>
>I'll probably do it because I could hit problems
>with cross linking between classes loaded in the repositories
>from the classloaders used in the keys.
>
>I'm might not use repositories directly, see later.
>
>Re: Configuration
>I'm pretty happy with the mechanics. The spi.Configurator
>makes this very flexible, your example code has the idea.
>
>My problems are the following:
>
>1) Unnecessary multiplication of Repostiories/Configuration
>Now I know this can be done per ClassLoader, this opens
>up the ability to do this for every JBoss component,
>in particular the embedded webserver (Tomcat).

>This may want to perform the configuration itself, which
>is fine, but it is more likely it will be configured through a
>JBoss mechanism see point 2.
>
>What I don't want to do is create 50+ repositories all
>doing configure and watch on the same url,
>just because the webserver *might* want use a different one.

50+? Isn't that rather unlikely? Moreover, who says they will watch
the same URL?

>I think the best approach is to add an extra level of indirection.
>One map does ClassLoader->ConfigURL,
>then a second does ConfigURL->Repository.
>
>Does this sound ok, one repository is created per config url.
>I might need to cater for per URL/LoggingCongifurator if somebody
>wants to be stupid.

How do you intend to deal with relative config files? For example, the
user might specify "log4j.properties" as resource within the J2EE
application.

Sticking to "one LoggerRepository per J2EE application" is a simple
and safe policy. You might be painting yourself into a corner imho.

>2) Deployment Configuration
>This isn't a log4j issue at all.

Right, it isn't. 

>In your example code you have
>app.getLoggingConfigurationApplicationResourceURL()
>it's the mechanics of this I haven't figured out.

The config information would be application specific and would
probably go into jboss-???.xml, a file shipped with the ear file.

>Do you want me to go into this here?

Do you want to *move* this discussion to jboss-development? I copied
jboss-development just to do just that... 

For those on jboss-dev who did not follow the beginning of this
discussion on log4j-dev, here are the relevant threads:

http://marc.theaimsgroup.com/?t=101075511400001&r=1&w=2
http://marc.theaimsgroup.com/?t=101113512600004&r=1&w=2

Regards, Ceki


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

Reply via email to