Commit Graph
8242 Commits
Author SHA1 Message Date
Jacopo Cappellato fcdf07a0e6 Improved code that manages the cache:
* protected some UtilCache objects (static fields) by making them private and final

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343815 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 16:18:02 +00:00
Jacopo Cappellato a203b75d3d Improved code that manages the cache:
* protected the UtilCache object (static field) by making it private and final
* removed unnecessary synchronization



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343792 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 15:52:14 +00:00
Jacopo Cappellato 9d80b40c8d Improved code that manages the cache:
* protected the UtilCache object (static field) by making it private and final
* removed unnecessary synchronization



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343785 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 15:40:17 +00:00
Jacopo Cappellato 06267026e8 Improved code that manages the cache:
* protected the UtilCache object (static field) by making it private and final
* removed unnecessary synchronization
* refactored code to be more inline with best practices for thread safefy: removed the method readNotificationGroups() (that was only used by the same class in one place) that was called with a lock held and inlined its logic into the colling method; this simplifies thecode and its readability



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343783 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 15:37:03 +00:00
Jacopo Cappellato 36737ad059 Improved code that manages the cache:
* protected the UtilCache object (static field) by making it private and final
* removed unnecessary synchronization



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343729 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 14:01:45 +00:00
Jacopo Cappellato 4eb06e3e00 Improved code that manages the cache:
* protected the UtilCache object (static field) by making it private and final
* removed unnecessary synchronization



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343728 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 13:57:19 +00:00
Jacopo Cappellato 126a9d40d5 Improved code that manages the cache:
* protected the UtilCache object (static field) by making it private and final
* removed unnecessary synchronization



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343727 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 13:52:32 +00:00
Jacopo Cappellato 2130bc14e8 Improved code that manages the cache:
* protected the UtilCache object (static field) by making it private and final
* removed unnecessary synchronization



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343724 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 13:46:49 +00:00
Jacopo Cappellato e316284fc9 Improved code that manages the cache:
* protected the UtilCache object (static field) by making it private and final
* replaced some put with putIfAbsentAndGet to slightly simplify the code



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343717 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 13:33:29 +00:00
Jacopo Cappellato 9fe920a3f7 Improved code that manages the cache:
* removed unnecessary synchronization
* protected the UtilCache object (static field) by making it private and final
* replaced non atomic containsKey+put+get with get + putIfAbsentAndGet
* replaced containsKey + null check + get with get + null check



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343692 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 12:10:54 +00:00
Jacopo Cappellato c4c79f58e8 Improved code that manages the cache:
* removed unnecessary synchronization
* protected the UtilCache object (static field) by making it private and final



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343662 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 10:54:16 +00:00
Adam Heath d9a34a8c8c Deprecate EntityUtil.getRelated(ByAnd|OrderBy)(|Cache), replaced with
the single getRelated variant.

EntityUtil.getRelatedByAnd(String, Map) replaced by
EntityUtil.getRelated(String, Map, List, boolean)

EntityUtil.getRelatedByAndCache(String, Map) replaced by
EntityUtil.getRelated(String, Map, List, boolean)

EntityUtil.getRelatedOrderBy(String, List) replaced by
EntityUtil.getRelated(String, Map, List, boolean)

EntityUtil.getRelatedOrderByCache(String, List) replaced by
EntityUtil.getRelated(String, Map, List, boolean)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343532 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:21:38 +00:00
Adam Heath 4a0f383a5a Deprecate GenericValue.getRelated(ByAnd|OrderBy)(|Cache), replaced with
the single getRelated variant.

GenericValue.getRelatedByAnd(String, Map) replaced by
GenericValue.getRelated(String, Map, List, boolean)

GenericValue.getRelatedByAndCache(String, Map) replaced by
GenericValue.getRelated(String, Map, List, boolean)

GenericValue.getRelatedOrderBy(String, List) replaced by
GenericValue.getRelated(String, Map, List, boolean)

GenericValue.getRelatedOrderByCache(String, List) replaced by
GenericValue.getRelated(String, Map, List, boolean)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343531 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:21:21 +00:00
Adam Heath e3c2dac101 DEPRECATION: framework: GenericValue.getRelated(ByAnd|OrderBy)(|Cache)
replaced by the single getRelated variant.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343527 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:20:26 +00:00
Adam Heath fb698e509b Deprecate all GenericValue.getRelated and GenericValue.getRelatedCache,
and add a version that takes a cache parameter.

Continuing the simplication of the entity api, this is the final step to
replacing all the GenericValue.getRelated(and cache versions as well)
with a variant that takes a boolean useCache parameter.

GenericValue.getRelated(String) is replaced by
GenericValue.getRelated(String, Map, List, boolean).

GenericValue.getRelated(String, List) is replaced by
GenericValue.getRelated(String, Map, List, boolean).

GenericValue.getRelated(String, Map, List) is replaced by
GenericValue.getRelated(String, Map, List, boolean).

GenericValue.getRelatedCache(String) is replaced by
GenericValue.getRelated(String, Map, List, boolean).

GenericValue.getRelatedCache(String, Map, List) is replaced by
GenericValue.getRelated(String, Map, List, boolean).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343526 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:20:19 +00:00
Adam Heath 83d37a796b DEPRECATION: framework: GenericValue.getRelated/getRelatedCache variants replaced with a single getRelated variant that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343509 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:17:17 +00:00
Adam Heath 21c0cef59e DEPRECATION: Add a new GenericValue.getRelated() variant that takes a
boolean useCache parameter.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343508 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:16:57 +00:00
Adam Heath fb3e3bb557 Deprecate all Delegator.getRelated and Delegator.getRelatedCache
and add a version that takes a cache parameter.

This Continuing the simplication of the entity api, this is the final step to
replacing all the GenericValue.getRelated(and cache versions as well)
with a variant that takes a boolean useCache parameter.

Delegator.getRelated(String, Map, List, GenericValue) is replaced by
Delegator.getRelated(String, Map, List, GenericValue, boolean).

Delegator.getRelatedCache(String, GenericValue) is replaced by
Delegator.getRelated(String, Map, List, GenericValue, boolean).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343507 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:16:51 +00:00
Adam Heath c9eaf52fc9 FEATURE: Add new Delegator.getRelated that takes a boolean useCache
parameter; all internal calls from GenericDelegator and GenericValue
have been modified to use the new method.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343506 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:16:42 +00:00
Adam Heath 5bc50ed5f2 Deprecate GenericValue.getRelatedOne/getRelatedOneCache, and add
a version that takes a cache parameter.

Yet again, another simplication of the delegator api.  This replaces
all simple getRelatedOne type methods with a single version that takes
all possible arguments.

GenericValue.getRelatedOne(String) is replaced by
GenericValue.getRelatedOne(String, boolean).

GenericValue.getRelatedOneCache(String) is replaced by
GenericValue.getRelatedOne(String, boolean).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343504 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:16:26 +00:00
Adam Heath 1aa422773b DEPRECATION: framework: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343478 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:11:19 +00:00
Adam Heath 9e8ddebcac FEATURE: Add GenericValue.getRelatedOne that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343477 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:10:58 +00:00
Adam Heath 7cf7538567 Deprecate all Delegator.getRelatedOne/getRelatedOneCache, and add a
version that takes a cache parameter.

This commit finishes the Delegator.getRelatedOne set of changes; the
previous methods are now deprecated, and the new ones should be used
going forward.

Delegator.getRelatedOne(String, GenericValue) is replaced by
Delegator.getRelatedOne(String, GenericValue, boolean).

Delegator.getRelatedOneCache(String, GenericValue) is replaced by
Delegator.getRelatedOne(String, GenericValue, boolean).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343476 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:10:52 +00:00
Adam Heath 221b2c0312 FEATURE: Add Delegator.getRelatedOne variant that takes a boolean useCache parameter.
Rework internal GenericDelegator methods to call the new method, but no
other external classes directly call this new one yet.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343475 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:10:44 +00:00
Adam Heath 3482d929e7 OPTIMIZE: Replace Delegator.getRelatedOne calls with
GenericValue.getRelatedOne.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343474 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:10:37 +00:00
Adam Heath ce8e0a2c24 FIX: Found a local case of findByPrimaryKey usage.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343471 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:09:53 +00:00
Adam Heath 1ba97a3210 FIX: This is the correct fix for 1343088;
TransactionUtil.doNewTransaction was starting a new transaction, then
immediately suspending it.  This caused confusion in calling code that
tried to use doNewTransaction.  Fortunately, this was not used very
much,

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343469 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 03:55:05 +00:00
Adam Heath a2d4b1b5e3 OPTIMIZE: Change return type of noTransaction(Callable) to
NoTransaction; it used to be Callable.  NoTransaction implements
Callable.  This change requires a recompile, but is otherwise
compatible with calling code.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343468 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 03:54:58 +00:00
Adam Heath b829aa5d60 FEATURE: Change NoTransaction.call() to throw GenericEntityException
instead of Exception.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343467 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 03:54:51 +00:00
Jacopo Cappellato aa62961e63 Corrected param name in javadoc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343303 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 15:53:41 +00:00
Jacopo Cappellato 3eecd00954 Enhanced unit test for UtilCache.putIfAbsentAndGet method to better explain its behaviour: it returns the reference to the same object passed as argument only if the key was not already found in cache.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343291 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 15:39:02 +00:00
Jacopo Cappellato 247c205188 Improved code that manages the cache:
* replaced putIfAbsent + get with putIfAbsentAndGet to avoid the risk of a NPE if the cache entry is removed (or expired) between the two calls



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343287 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 15:32:28 +00:00
Jacopo Cappellato 074c282c0c Improved code that manages the cache:
* protected the UtilCache object (static field) by making it private and final
* instead of using the "put" method, use the "putIfAbsentAndGet" method to prevent the risk of adding the new value if another concurrent thread added it in the meantime



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343278 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 15:25:46 +00:00
Jacopo Cappellato 733bb64592 Improved code that manages the cache:
* removed unnecessary synchronization  
 * protected the UtilCache object (static field) by making it private and final


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343277 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 15:02:39 +00:00
Jacopo Cappellato ed9474669c Removed an unused UtilCache static field.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343273 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 14:51:32 +00:00
Jacopo Cappellato ee53c9452b Some cleanups and changes to logging configuration:
* some misc formatting and changes to comments
* removed the old and unused configuration for minerva
* added a new file appender for Tomcat where all Tomcat internal logging is now redirected 
* changed internal logging for FOP from info to warn to be consistent with the settings of other external components (Tomcat, Geronimo Transaction Manager, Freemarker)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343269 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 14:41:50 +00:00
Jacopo Cappellato 0fb93cc33b Removed a bunch of unused jars imported from the Tomcat distribution and replaced with the ones in the "Embedded" distribution.
For details about the upgrade process for future Tomcat releases see my notes:
  https://cwiki.apache.org/confluence/display/OFBTECH/How+to+upgrade+the+embedded+Tomcat


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343263 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 14:22:15 +00:00
Jacopo Cappellato 7c91aaa74f OFBIZ-4901 Upgraded icu4j from version 4.4 to version 49.1; thanks to Deepak Dixit for the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343261 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 14:05:29 +00:00
Adrian Crum 1002cfb510 Mini-language JavaDocs. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343174 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 09:30:49 +00:00
Jacques Le Roux 6075bed667 Missed this because I had some other changes pending
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343154 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 07:15:42 +00:00
Jacques Le Roux b48ff3a62c Closes "Move SHARK to Attic" https://issues.apache.org/jira/browse/OFBIZ-4795
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343064 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 15:47:32 +00:00
Jacques Le Roux 7730a12e22 Renames nekohtml.jar to nekohtml-1.9.7.jar (found in MANIFEST) see http://nekohtml.sourceforge.net/index.html
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343038 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 12:33:17 +00:00
Adrian Crum 28c894cd6f Overhauled Mini-language <find-by-and> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343035 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 12:06:41 +00:00
Jacques Le Roux baa73733d2 Where it shows that maintaining help is not that easy. Unlike Javadoc you don't have under eyes when changing things
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343030 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 10:41:13 +00:00
Jacques Le Roux 720578ecf3 Replaces all remaining title="${uiLabelMap.CommonEmptyHeader}" by title=" ", and specific case in ListPartyCommEvents
This closes the CommonEmptyHeader chapter

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343016 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 08:41:47 +00:00
Jacques Le Roux 621a487c35 Closes "Logs not generating on linux" https://issues.apache.org/jira/browse/OFBIZ-4877
I removed log4j-over-slf4j from trunk at in order to have logs in official Trunk demo. THis is part of the JCR effort which should be removed from trunk anyway since Sascha recreated a new JCR branch. I let him handle the rest...

I guess [Bridging legacy APIs|http://www.slf4j.org/legacy.html] has not been followed in details 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342893 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 13:05:35 +00:00
Jacques Le Roux e3e7491611 I just learned today that now for regions to be associated with a state a country needs a CountryAddressFormat. I guess this is related Sascha's changes for GBR (he introduced the GROUP_MEMBER notion), but I could be wrong
This fixes Swiss cantons wich now appears at https://localhost:8443/example/control/FormWidgetExamples#DropDownFieldsExampleForm_stateProvinceGeoId_title

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342874 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 10:03:04 +00:00
Jacques Le Roux 5f732182bd Forgot to save pending change in Eclipse, thanks to Adrian who noticed it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342871 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 09:35:02 +00:00
Adrian Crum 2bab33d7aa Overhauled Mini-language <filter-list-by-date> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342854 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 05:01:00 +00:00
Adrian Crum 19870304f9 Added a missing license header.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342850 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 04:11:41 +00:00