From 07413c34b3480edfabc126bb99f5f7669a1c83c9 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Wed, 7 May 2008 15:55:06 +0000 Subject: [PATCH] named thread locals for introspection --- .../webflow/context/ExternalContextHolder.java | 4 +++- .../webflow/execution/RequestContextHolder.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/spring-webflow/src/main/java/org/springframework/webflow/context/ExternalContextHolder.java b/spring-webflow/src/main/java/org/springframework/webflow/context/ExternalContextHolder.java index e5e49824..301f137a 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/context/ExternalContextHolder.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/context/ExternalContextHolder.java @@ -15,6 +15,8 @@ */ package org.springframework.webflow.context; +import org.springframework.core.NamedThreadLocal; + /** * Simple holder class that associates an {@link ExternalContext} instance with the current thread. The ExternalContext * will not be inherited by any child threads spawned by the current thread. @@ -28,7 +30,7 @@ package org.springframework.webflow.context; */ public final class ExternalContextHolder { - private static final ThreadLocal externalContextHolder = new ThreadLocal(); + private static final ThreadLocal externalContextHolder = new NamedThreadLocal("Flow ExternalContext"); /** * Associate the given ExternalContext with the current thread. diff --git a/spring-webflow/src/main/java/org/springframework/webflow/execution/RequestContextHolder.java b/spring-webflow/src/main/java/org/springframework/webflow/execution/RequestContextHolder.java index 9e9c3362..a4d78a0a 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/execution/RequestContextHolder.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/execution/RequestContextHolder.java @@ -15,6 +15,8 @@ */ package org.springframework.webflow.execution; +import org.springframework.core.NamedThreadLocal; + /** * Simple holder class that associates a {@link RequestContext} instance with the current thread. The RequestContext * will not be inherited by any child threads spawned by the current thread. @@ -28,7 +30,7 @@ package org.springframework.webflow.execution; */ public class RequestContextHolder { - private static final ThreadLocal requestContextHolder = new ThreadLocal(); + private static final ThreadLocal requestContextHolder = new NamedThreadLocal("Flow RequestContext"); /** * Associate the given RequestContext with the current thread.