[logback-dev] svn commit: r1851 - logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran

noreply.ceki at qos.ch noreply.ceki at qos.ch
Mon Oct 20 20:38:21 CEST 2008


Author: ceki
Date: Mon Oct 20 20:38:21 2008
New Revision: 1851

Modified:
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/GenericConfigurator.java

Log:
- prevent concurrent configurations of the same Context

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/GenericConfigurator.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/GenericConfigurator.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/joran/GenericConfigurator.java	Mon Oct 20 20:38:21 2008
@@ -93,7 +93,10 @@
     recorder.setContext(context);
     recorder.recordEvents(inputSource);
     buildInterpreter();
-    interpreter.play(recorder.saxEventList);
+    // disallow simultaneous configurations of the same context
+    synchronized (context) {
+      interpreter.play(recorder.saxEventList);
+    }
   }
 
   public void doConfigure(final List<SaxEvent> eventList)


More information about the logback-dev mailing list