RE: cvs commit: jakarta-log4j/tests/src/java/org/apache/log4j/plugins PluginTestCase.java

2002-12-10 Thread mwomack
This is a basic test case for testing Plugins and the PluginRegistry with stand alone plugins. There was a bug in PluginRegistry where stopping a plugin did not remove the reference to it in the registry. I'll be adding one tomorrow to test multiple repositories and event listening/handling. -Ma

cvs commit: jakarta-log4j/tests build.xml

2002-12-10 Thread mwomack
mwomack 2002/12/10 23:35:03 Modified:testsbuild.xml Log: Added PluginTestCase. Revision ChangesPath 1.24 +10 -1 jakarta-log4j/tests/build.xml Index: build.xml === RCS file: /home/cvs/jak

cvs commit: jakarta-log4j/tests/src/java/org/apache/log4j/plugins PluginTestCase.java

2002-12-10 Thread mwomack
mwomack 2002/12/10 23:32:19 Added: tests/src/java/org/apache/log4j/plugins PluginTestCase.java Log: Added PluginTestCase. Revision ChangesPath 1.1 jakarta-log4j/tests/src/java/org/apache/log4j/plugins/PluginTestCase.java Index: PluginTestCase.java

cvs commit: jakarta-log4j/tests/src/java/org/apache/log4j/plugins - New directory

2002-12-10 Thread mwomack
mwomack 2002/12/10 23:31:56 jakarta-log4j/tests/src/java/org/apache/log4j/plugins - New directory -- To unsubscribe, e-mail: For additional commands, e-mail:

cvs commit: jakarta-log4j/tests/witness plugins.PluginTestCase.test1.txt

2002-12-10 Thread mwomack
mwomack 2002/12/10 23:31:32 Added: tests/witness plugins.PluginTestCase.test1.txt Log: Added witness file for test case 1 of PluginTestCase. Revision ChangesPath 1.1 jakarta-log4j/tests/witness/plugins.PluginTestCase.test1.txt Index: plugins.Plugin

cvs commit: jakarta-log4j/src/java/org/apache/log4j/net SocketReceiver.java SocketNode.java JMSReceiver.java

2002-12-10 Thread mwomack
mwomack 2002/12/10 23:30:31 Modified:src/java/org/apache/log4j/net SocketReceiver.java SocketNode.java JMSReceiver.java Log: Reference plugin related classes in new o.a.log4j.plugins package. Revision ChangesPath 1.3 +1 -1 jakarta-log4j/

cvs commit: jakarta-log4j/src/java/org/apache/log4j/xml DOMConfigurator.java

2002-12-10 Thread mwomack
mwomack 2002/12/10 23:26:47 Modified:src/java/org/apache/log4j/xml DOMConfigurator.java Log: Reference plugin related classes in new o.a.log4j.plugins package. Revision ChangesPath 1.53 +2 -0 jakarta-log4j/src/java/org/apache/log4j/xml/DOMConfigurator.java

cvs commit: jakarta-log4j/src/java/org/apache/log4j Receiver.java PluginSkeleton.java PluginRegistry.java Plugin.java

2002-12-10 Thread mwomack
mwomack 2002/12/10 23:25:39 Removed: src/java/org/apache/log4j Receiver.java PluginSkeleton.java PluginRegistry.java Plugin.java Log: Moved from o.a.log4j to o.a.log4j.plugins package. -- To unsubscribe, e-mail: For additional com

cvs commit: jakarta-log4j/src/java/org/apache/log4j/plugins Receiver.java PluginSkeleton.java PluginRegistry.java Plugin.java

2002-12-10 Thread mwomack
mwomack 2002/12/10 23:25:14 Added: src/java/org/apache/log4j/plugins Receiver.java PluginSkeleton.java PluginRegistry.java Plugin.java Log: Moved from o.a.log4j to o.a.log4j.plugins package. Fixed bug in PluginRegistry where stopped plugin was not removed

cvs commit: jakarta-log4j/src/java/org/apache/log4j/plugins - New directory

2002-12-10 Thread mwomack
mwomack 2002/12/10 21:28:57 jakarta-log4j/src/java/org/apache/log4j/plugins - New directory -- To unsubscribe, e-mail: For additional commands, e-mail:

RE: synchronization problem with listeners in Hierarchy?

2002-12-10 Thread Mark Womack
Ceki, > I am thrilled with the recent commits. I'd like to re-read > them carefully before making further comments. Please do! > As for looping on > repositoryEventListeners, > getting an enumeration on the listeners vectors might be safe. Nicko > Cadell's approach of an array copy should b

RE: cvs commit: jakarta-log4j/src/java/org/apache/log4j PluginReg istry.java

2002-12-10 Thread Mark Womack
> Sounds like you have covered all the bases. I don't know about that. Plugins/Receivers/Watchdogs do make the configuration process more complex and we are going to need to spend time working out the issues. > The only thing that might be slightly confusing to a user when using a > watchdog is

Re: synchronization problem with listeners in Hierarchy?

2002-12-10 Thread Ceki Gülcü
Mark, I am thrilled with the recent commits. I'd like to re-read them carefully before making further comments. As for looping on repositoryEventListeners, getting an enumeration on the listeners vectors might be safe. Nicko Cadell's approach of an array copy should be equally safe if not safe

RE: cvs commit: jakarta-log4j/src/java/org/apache/log4j PluginReg istry.java

2002-12-10 Thread Nicko Cadell
You are right about the Configurator not resetting the repository. I'm not sure where I got that notion from. Maybe it was too early in the morning to be writing emails! Sounds like you have covered all the bases. The only thing that might be slightly confusing to a user when using a watchdog is

RE: cvs commit: jakarta-log4j/src/java/org/apache/log4j PluginReg istry.java

2002-12-10 Thread Mark Womack
Nicko, > This means that all the plugins will be stopped when the > logger repository > is reset. If you are using a watchdog on the config file, > each time the > config file is modified all the plugins will be stopped and > re-read from the > config file. This means 2 things: I'll need to lo

RE: cvs commit: jakarta-log4j/src/java/org/apache/log4j Plugin.ja va

2002-12-10 Thread Mark Womack
Ha! You're in it now! :-) Seriously, the current interface pretty much comes from one of your emails. And the plugin concept is now cascading to include a lot of new 1.3 functionality... -Mark > -Original Message- > From: Nicko Cadell [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December

RE: cvs commit: jakarta-log4j/src/java/org/apache/log4j PluginRegistry.java

2002-12-10 Thread Nicko Cadell
> + /** > +Internal class used to handle listener events from repositories. */ > + private static class RepositoryListener > + implements LoggerRepositoryEventListener { > +/** > + Stops all plugins associated with the repository being reset. */ > +public void conf

RE: cvs commit: jakarta-log4j/src/java/org/apache/log4j Plugin.java

2002-12-10 Thread Nicko Cadell
> mwomack 2002/12/09 22:55:30 > > Modified:src/java/org/apache/log4j Plugin.java > Log: > Applying Ceki's criteria of contributor vs author, added > Nicko Cadell as an author. The entire plugin interface was > suggested by him. Don't blame me! All I suggested was a name change!

RE: synchronization problem with listeners in Hierarchy?

2002-12-10 Thread Nicko Cadell
I would suggest copying the vector elements to an array before iterating over them and notifying them of the event. The copy should be done in a synchronized block but the event delivery should be done outside the sync block. I know it's not the most efficient way to do it but it does give you corr