01: /*
02: * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.desktop.context;
06:
07: //
08: // this class may introduce some performance troubles using java 1.2,
09: // but they are reported to be fixed in java 1.3.
10: //
11:
12: public class ParentContainerThreadLocalizer {
13: //private static InheritableThreadLocal providerContextThreadLocal = new InheritableThreadLocal();
14: private static ThreadLocal parentContainerThreadLocal = new ThreadLocal();
15:
16: private ParentContainerThreadLocalizer() {
17: // nothing, cannot be called
18: }
19:
20: public static String get() {
21: String pc = (String) parentContainerThreadLocal.get();
22: return pc;
23: }
24:
25: public static void set(String pc) {
26: parentContainerThreadLocal.set(pc);
27: }
28: }
|