concurrent modification type bugs with the keySet/entrySet/values
collections. I saw an exception in AbstractEntityConditionCache, so
I'll back this out until I have a chance to fix it properly.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885343 13f79535-47bb-0310-9956-ffa450edef68
reflect items added/removed. However, most membership tests directly
access the underlying cache anyways, so this isn't a big deal.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885275 13f79535-47bb-0310-9956-ffa450edef68
* remove duplicate ()
* remove casts no longer needed
I'm doing these last tasks around isEmpty and isNotEmpty mostly to be sure that nothing has slipped in. Despite I have been very careful, I prefer double check.
+ one typo in ofbizSelenium help (not sure this file is used yet though, seems to be missing some parts which are commented out, for now I guess)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885093 13f79535-47bb-0310-9956-ffa450edef68
The jvm doesn't guarantee anything about ++ operations; they are *not*
single commands. This is even more of a problem with 64 bit longs on a
32 bit jvm, where even a read or a write to/from a long may be multiple
commands. It is entirely possible that a write to a long might be
partially read by another thread.
The fix is either to protected all the stats with a synchronized block,
either a single one, or one per stat, or to use the new java 1.5 atomic
variables. The latter is much better, because most of the time no one
is reading the stats, so there is hardly ever any contention.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884984 13f79535-47bb-0310-9956-ffa450edef68
* Mostly parameterize UtilFormatOut.formatPrice() from general.properties
* I removed unused currency.decimal.format calls in CheckOutEvents class
* Also removed unused priceNumberFormat in UtilFormatOut class
Still have to fix 11 harcoded "##0.00" in ftl files using ofbizCurrency
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884023 13f79535-47bb-0310-9956-ffa450edef68
This commit adds UtilValidate.is(Not)Empty for CharSequence; and uses it in EntitySaxReader.java and everywhere else it might still be used (because of my changes)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883634 13f79535-47bb-0310-9956-ffa450edef68
This is the first step to making utilCacheTable concurrent, and
non-blocking. To do so, the constructor has to have no side-effects.
This means it can't modify utilCacheTable itself; this will be moved to
the helper function created above.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883217 13f79535-47bb-0310-9956-ffa450edef68
CacheLineTable and LRUMap do not synchronize on the same lock
* CacheLineTable synchronization use the CacheLineTable instance monitor
* LRUMap synchronization use the LRUMap instance monitor
the LRUMap (memoryTable) can be updated concurrently by 2 differents threads
* one in the CacheLineTable #put or CacheLineTable#remove
* another in the CacheLineTable#get
this leads to the corruption of the LRUMap which is not thread-safe
the CacheLineTable#get should be synchronized or the LRUMap should be replaced by a thead safe collection
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@882072 13f79535-47bb-0310-9956-ffa450edef68
In a certain scenario the application freezes, no more AJP connector threads are available.
After analysis the lock seems to come from very slow response time in GenericDelegator.clearAllCaches and particularily in CacheLineTable.keySet.
Furthermore, looking at org.ofbiz.base.util.cache.UtilCache, the class seems to have some synchronisation problems:
1) utilCacheTable.put calls are not synchronized
2) findCache synchronizes access to utilCacheTable while only getting an element which has big performance impact since utilCacheTable is static
3) clearExpiredFromAllCaches and clearAllCaches does not synchronize while clearCachesThatStartWith does, why ?
The patch synchronizes correctly the access to utilCacheTable and optimises findCache
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@881194 13f79535-47bb-0310-9956-ffa450edef68
that is compatible with features used by ofbiz. Has support for
DELETE, INSERT, INSERT SELECT, SELECT, UPDATE, and VIEW.
Modified the delegator side of the above to handle the new
interfaces. Now supports complex alias. Only SELECT is supported,
and the parseCondition code is disabled for the time being.
The plan(sic) here is to obviously support the other sql statements.
Then, to have a jdbc wrapper around all this, so external tools, that
only know how to talk jdbc, can actually talk directly to the
delegator.
Plus, many more people can understand sql syntax. This allows them
to do things with ofbiz, that they would find much more difficult if
they had to write <view-entity> definitions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@880835 13f79535-47bb-0310-9956-ffa450edef68