Author: trang_vu
Date: 2011-11-02 03:54:28 -0400 (Wed, 02 Nov 2011)
New Revision: 5143
Added:
ws/branches/2.1.x/patch/2.1.11-GA/WS-270/readme.txt
Modified:
ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/util/HierarchicalProperty.java
ws/branches/2.1.x/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderHelper.java
Log:
WS-270: Replace TimeZone.getTimeZone with the util method from the kernel
Fix description
* Avoided usage of method java.util.TimeZone.getTimeZone(String ID), now we use less
synchronized method implemented in kernel project instead.
Modified:
ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/util/HierarchicalProperty.java
===================================================================
---
ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/util/HierarchicalProperty.java 2011-11-02
07:19:05 UTC (rev 5142)
+++
ws/branches/2.1.x/exo.ws.commons/src/main/java/org/exoplatform/common/util/HierarchicalProperty.java 2011-11-02
07:54:28 UTC (rev 5143)
@@ -18,13 +18,14 @@
*/
package org.exoplatform.common.util;
+import org.exoplatform.commons.utils.Tools;
+
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
-import java.util.TimeZone;
import javax.xml.namespace.QName;
@@ -103,7 +104,7 @@
{
this(name, null);
SimpleDateFormat dateFormat = new SimpleDateFormat(formatPattern, Locale.ENGLISH);
- dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
+ dateFormat.setTimeZone(Tools.getTimeZone("GMT"));
this.value = dateFormat.format(dateValue.getTime());
}
Modified:
ws/branches/2.1.x/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderHelper.java
===================================================================
---
ws/branches/2.1.x/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderHelper.java 2011-11-02
07:19:05 UTC (rev 5142)
+++
ws/branches/2.1.x/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderHelper.java 2011-11-02
07:54:28 UTC (rev 5143)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.rest.impl.header;
+import org.exoplatform.commons.utils.Tools;
import org.exoplatform.services.rest.header.QualityValue;
import java.text.ParseException;
@@ -443,7 +444,7 @@
l.add(new SimpleDateFormat(RFC_1123_DATE_FORMAT, Locale.US));
l.add(new SimpleDateFormat(RFC_1036_DATE_FORMAT, Locale.US));
l.add(new SimpleDateFormat(ANSI_C_DATE_FORMAT, Locale.US));
- TimeZone tz = TimeZone.getTimeZone("GMT");
+ TimeZone tz = Tools.getTimeZone("GMT");
l.get(0).setTimeZone(tz);
l.get(1).setTimeZone(tz);
l.get(2).setTimeZone(tz);
Added: ws/branches/2.1.x/patch/2.1.11-GA/WS-270/readme.txt
===================================================================
--- ws/branches/2.1.x/patch/2.1.11-GA/WS-270/readme.txt (rev 0)
+++ ws/branches/2.1.x/patch/2.1.11-GA/WS-270/readme.txt 2011-11-02 07:54:28 UTC (rev
5143)
@@ -0,0 +1,67 @@
+Summary
+
+ * Status: Replace TimeZone.getTimeZone with the util method from the kernel to have
less contention
+ * CCP Issue: CCP-1118, Product Jira Issue: WS-270.
+ * Complexity: Low
+
+The Proposal
+Problem description
+
+What is the problem to fix?
+Under heavy load we realized that the method java.util.TimeZone.getTimeZone(String ID)
becomes a bottleneck so it is necessary to use the alternative provided by the kernel to
have less contention.
+
+Fix description
+
+How is the problem fixed?
+* Avoided usage of method java.util.TimeZone.getTimeZone(String ID), now we use less
synchronized method implemented in kernel project instead.
+
+Patch file: WS-270.patch
+
+Tests to perform
+
+Reproduction test
+
+ * Activate the Concurrent GC during run of benchmark
+
+Tests performed at DevLevel
+
+ * Functional testing for all projects (kernel, core, ws, jcr)
+
+Tests performed at QA/Support Level
+*
+Documentation changes
+
+Documentation changes:
+
+ * No
+
+Configuration changes
+
+Configuration changes:
+
+ * No
+
+Will previous configuration continue to work?
+
+ * Yes
+
+Risks and impacts
+
+Can this bug fix have any side effects on current client projects?
+
+ * No
+
+Is there a performance risk/cost?
+
+ * No
+
+Validation (PM/Support/QA)
+
+PM Comment
+* Patch validated.
+
+Support Comment
+*
+
+QA Feedbacks
+*
Show replies by date