labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simo...@apache.org
Subject svn commit: r741819 - in /labs/magma/trunk: foundation-beans/src/main/java/org/apache/magma/beans/ foundation-i18n/src/main/java/org/apache/magma/i18n/ website-email/src/main/java/org/apache/magma/email/
Date Sat, 07 Feb 2009 02:18:34 GMT
Author: simoneg
Date: Sat Feb  7 02:18:33 2009
New Revision: 741819

URL: http://svn.apache.org/viewvc?rev=741819&view=rev
Log:
LABS-282 : using CycleThreadLocal to centralize on Cycle.

Modified:
    labs/magma/trunk/foundation-beans/src/main/java/org/apache/magma/beans/BeansHandlerAspect.aj
    labs/magma/trunk/foundation-i18n/src/main/java/org/apache/magma/i18n/CurrentLocale.java
    labs/magma/trunk/website-email/src/main/java/org/apache/magma/email/AddWebBasedEmailMethods.aj

Modified: labs/magma/trunk/foundation-beans/src/main/java/org/apache/magma/beans/BeansHandlerAspect.aj
URL: http://svn.apache.org/viewvc/labs/magma/trunk/foundation-beans/src/main/java/org/apache/magma/beans/BeansHandlerAspect.aj?rev=741819&r1=741818&r2=741819&view=diff
==============================================================================
--- labs/magma/trunk/foundation-beans/src/main/java/org/apache/magma/beans/BeansHandlerAspect.aj
(original)
+++ labs/magma/trunk/foundation-beans/src/main/java/org/apache/magma/beans/BeansHandlerAspect.aj
Sat Feb  7 02:18:33 2009
@@ -19,11 +19,12 @@
 import java.lang.ref.SoftReference;
 import java.lang.reflect.Method;
 
+import org.apache.magma.basics.startup.CycleThreadLocal;
 import org.aspectj.lang.reflect.MethodSignature;
 
 public aspect BeansHandlerAspect perthis(calledHandler(MagmaBeanSupport)) {
 
-	private ThreadLocal<SoftReference<BeanHandler>> tl = new ThreadLocal<SoftReference<BeanHandler>>();
+	private CycleThreadLocal<SoftReference<BeanHandler>> tl = new CycleThreadLocal<SoftReference<BeanHandler>>();
 	
 	pointcut calledHandler(MagmaBeanSupport bean) : execution(public BeanHandler MagmaBeanSupport+.handler())
&& this(bean);
 	

Modified: labs/magma/trunk/foundation-i18n/src/main/java/org/apache/magma/i18n/CurrentLocale.java
URL: http://svn.apache.org/viewvc/labs/magma/trunk/foundation-i18n/src/main/java/org/apache/magma/i18n/CurrentLocale.java?rev=741819&r1=741818&r2=741819&view=diff
==============================================================================
--- labs/magma/trunk/foundation-i18n/src/main/java/org/apache/magma/i18n/CurrentLocale.java
(original)
+++ labs/magma/trunk/foundation-i18n/src/main/java/org/apache/magma/i18n/CurrentLocale.java
Sat Feb  7 02:18:33 2009
@@ -6,6 +6,7 @@
 
 import org.apache.magma.basics.LocalizableString;
 import org.apache.magma.basics.context.RunningContext;
+import org.apache.magma.basics.startup.CycleThreadLocal;
 import org.apache.magma.settings.Settings;
 
 /**
@@ -17,7 +18,7 @@
 
 	private static Map<Locale, LocaleHolder> holders = new HashMap<Locale, LocaleHolder>();
 	
-	private static ThreadLocal<LocaleHolder> current = new ThreadLocal<LocaleHolder>();
+	private static CycleThreadLocal<LocaleHolder> current = new CycleThreadLocal<LocaleHolder>();
 	
 	/**
 	 * Sets the current {@link Thread} locale.

Modified: labs/magma/trunk/website-email/src/main/java/org/apache/magma/email/AddWebBasedEmailMethods.aj
URL: http://svn.apache.org/viewvc/labs/magma/trunk/website-email/src/main/java/org/apache/magma/email/AddWebBasedEmailMethods.aj?rev=741819&r1=741818&r2=741819&view=diff
==============================================================================
--- labs/magma/trunk/website-email/src/main/java/org/apache/magma/email/AddWebBasedEmailMethods.aj
(original)
+++ labs/magma/trunk/website-email/src/main/java/org/apache/magma/email/AddWebBasedEmailMethods.aj
Sat Feb  7 02:18:33 2009
@@ -10,6 +10,7 @@
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.magma.basics.MagmaException;
+import org.apache.magma.basics.startup.CycleThreadLocal;
 import org.apache.magma.website.Head;
 import org.apache.magma.website.HtmlProducer;
 import org.apache.magma.website.utils.URLRewritingStream;
@@ -17,7 +18,7 @@
 
 public aspect AddWebBasedEmailMethods {
 
-	private static ThreadLocal<String> absoluteBaseUrl = new ThreadLocal<String>();
+	private static CycleThreadLocal<String> absoluteBaseUrl = new CycleThreadLocal<String>();
 	
 	before(HttpServletRequest req) : 
 		HandlerSetup.inRequest() &&



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message