You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2017/02/10 20:40:39 UTC
svn commit: r1782522 - in /ofbiz/branches/release16.11: ./
framework/base/src/main/java/org/apache/ofbiz/base/util/UtilURL.java
Author: jleroux
Date: Fri Feb 10 20:40:39 2017
New Revision: 1782522
URL: http://svn.apache.org/viewvc?rev=1782522&view=rev
Log:
"Applied fix from trunk for revision: 1782520"
------------------------------------------------------------------------
r1782520 | jleroux | 2017-02-10 21:38:46 +0100 (ven. 10 f�vr. 2017) | 40 lignes
Fixed: Reinstate url cache in UtilURL.fromResource
(OFBIZ-9208)
Adrian created the following commit to cache URL objects
Revision: 1649979
Author: adrianc
Date: 07 January 2015 00:24:28
Message:
Some optimizations for URL lookups.
----
Modified : /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilProperties.java
Modified : /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilURL.java
and was later reverted in this commit
Revision: 1650347
Author: adrianc
Date: 08 January 2015 17:53:59
Message:
Some small fixups for some of my previous commits.
----
Modified : /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityClassLoader.java
Modified : /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilURL.java
We have found in one of our production servers that line 98 in UtilURL.java
url = loader.getResource(resourceName);
has caused locking and looking at the stack trace (from jstack). There are
numerous threads waiting on locks from within this method
I propose the cache gets added back (we have done this as a patch on our systems
with no ill effect)
FYI - The commits are in reference to the EntityClassLoader which is not used
and does not work see OFBIZ-6210
Thanks: Gareth Carter for report and suggestion
------------------------------------------------------------------------
Modified:
ofbiz/branches/release16.11/ (props changed)
ofbiz/branches/release16.11/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilURL.java
Propchange: ofbiz/branches/release16.11/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb 10 20:40:39 2017
@@ -10,4 +10,4 @@
/ofbiz/branches/json-integration-refactoring:1634077-1635900
/ofbiz/branches/multitenant20100310:921280-927264
/ofbiz/branches/release13.07:1547657
-/ofbiz/trunk:1770481,1770490,1770540,1771440,1771448,1771516,1771935,1772346,1772880,1774772,1775441,1779724,1780659,1781109,1781125,1781979,1782498
+/ofbiz/trunk:1770481,1770490,1770540,1771440,1771448,1771516,1771935,1772346,1772880,1774772,1775441,1779724,1780659,1781109,1781125,1781979,1782498,1782520
Modified: ofbiz/branches/release16.11/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilURL.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilURL.java?rev=1782522&r1=1782521&r2=1782522&view=diff
==============================================================================
--- ofbiz/branches/release16.11/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilURL.java (original)
+++ ofbiz/branches/release16.11/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilURL.java Fri Feb 10 20:40:39 2017
@@ -97,8 +97,7 @@ public final class UtilURL {
}
url = loader.getResource(resourceName);
if (url != null) {
- // Do not cache URLs from ClassLoader - interferes with EntityClassLoader operation
- //urlMap.put(resourceName, url);
+ urlMap.put(resourceName, url);
return url;
}
url = ClassLoader.getSystemResource(resourceName);