ceki 01/08/06 09:38:15 Modified: src/java/org/apache/log4j Makefile src/java/org/apache/log4j/test Makefile Added: src/java/org/apache/log4j MDC.java Log: Added the long awaited MDC.java class. Revision Changes Path 1.13 +1 -0 jakarta-log4j/src/java/org/apache/log4j/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Makefile 2001/07/20 16:03:41 1.12 +++ Makefile 2001/08/06 16:38:14 1.13 @@ -24,6 +24,7 @@ Priority.java\ WriterAppender.java\ ConsoleAppender.java\ + MDC.java\ ifdef $(ISJDK1) JSOURCES:=$(JSOURCES) RollingFileAppenderBeanInfo.java 1.1 jakarta-log4j/src/java/org/apache/log4j/MDC.java Index: MDC.java =================================================================== package org.apache.log4j; import java.util.Hashtable; public class MDC { final static MappedContext context = new MappedContext(); static final int HT_SIZE = 11; static public void put(String key, Object o) { Hashtable ht = getMap(); ht.put(key, o); } static public Object get(String key) { Hashtable ht = getMap(); return ht.get(key); } private static Hashtable getMap() { Hashtable ht = (Hashtable) context.get(); if(ht == null) { System.out.println("getMap creating new ht. [" + Thread.currentThread().getName()+ "]"); ht = new Hashtable(HT_SIZE); context.set(ht); } return ht; } } class MappedContext extends InheritableThreadLocal { public Object childValue(Object parentValue) { Hashtable ht = (Hashtable) parentValue; System.out.println("childValue called. ["+Thread.currentThread().getName()+"]"); return ht.clone(); } public void finalize() throws Throwable { System.out.println("finalize called. ["+Thread.currentThread().getName()+"]"); super.finalize(); } } 1.16 +1 -0 jakarta-log4j/src/java/org/apache/log4j/test/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/test/Makefile,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- Makefile 2001/07/25 19:43:44 1.15 +++ Makefile 2001/08/06 16:38:14 1.16 @@ -29,6 +29,7 @@ CustomCategoryTest.java\ FQCNTest.java\ DRFATest.java\ + MDCStress.java ifdef $(ISJDK1) JSOURCES:=$(JSOURCES) UnitTestOR.java --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]