Commit Graph
10472 Commits
Author SHA1 Message Date
Adrian Crum f4f119d057 Removed a deprecated constructor from GenericDelegator.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621437 13f79535-47bb-0310-9956-ffa450edef68
2014-08-30 09:12:00 +00:00
Adrian Crum 00d61094d0 Removed some references to GenericDelegator concrete class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621436 13f79535-47bb-0310-9956-ffa450edef68
2014-08-30 09:00:39 +00:00
Jacopo Cappellato e5018c0031 Misc minor enhancements to the testSequenceValueItemWithConcurrentThreads unit test.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621425 13f79535-47bb-0310-9956-ffa450edef68
2014-08-30 08:32:14 +00:00
Adrian Crum 724ec8bb49 Fixed bugs in GenericDelegator.java - storeByCondition and removeByCondition did not update the cache, resulting in stale cache entries.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621413 13f79535-47bb-0310-9956-ffa450edef68
2014-08-30 02:49:22 +00:00
Adrian Crum a71a1303fd Change how Mini-language simple methods are cached: Cache individual methods instead of the entire file.
The new approach will load all methods from a file into the cache - the same as before, but now individual methods can expire if unused.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621388 13f79535-47bb-0310-9956-ffa450edef68
2014-08-29 21:04:00 +00:00
Adrian Crum 1810b389c7 Fix unintended change in my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621386 13f79535-47bb-0310-9956-ffa450edef68
2014-08-29 20:58:25 +00:00
Adrian Crum b4db076bb4 Unit test to demonstrate the bug I found in GenericDelegator.java. Test is commented out.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621385 13f79535-47bb-0310-9956-ffa450edef68
2014-08-29 20:56:08 +00:00
Jacopo Cappellato 38f5c17d0d Fixed an issue affecting the thread safeness of the SequenceBank objects.
Added two unit tests to confirm the proper behavior of the SequenceUtil class; the second test fails without the fix committed with this revision.
Part of OFBIZ-2353.
This is just the first pass of my work to refactor the SequenceUtil.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621335 13f79535-47bb-0310-9956-ffa450edef68
2014-08-29 16:26:51 +00:00
Adrian Crum 9156158d93 Found a bug in GenericDelegator.java. No time to fix it now, so leaving a FIXME comment.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621122 13f79535-47bb-0310-9956-ffa450edef68
2014-08-28 11:36:39 +00:00
Jacopo Cappellato 582f00fdaf Completed the work to make the ServerHitBin class thread safe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621088 13f79535-47bb-0310-9956-ffa450edef68
2014-08-28 08:05:50 +00:00
Jacopo Cappellato 58f766c3b8 First part of the overhaul of ServerHitBin class: now ServerHitBin objects are thread-safe; however the ServerHitBin class isn't because of its static maps (more work is needed in order to fix this).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620907 13f79535-47bb-0310-9956-ffa450edef68
2014-08-27 15:10:12 +00:00
Jacopo Cappellato bc57bb04a0 A series of cleanups and changes in preparation for some work to attempt to fix the thread safety of the ServerHitBin class.
Also fixed a bug affecting multi-tenant systems: ServerHitBin entries had an additional #tenant suffix.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620831 13f79535-47bb-0310-9956-ffa450edef68
2014-08-27 09:23:55 +00:00
Jacopo Cappellato 41f9eb69d1 Small optimization to the ServerHitBin class: the bin length is now stored in a private final field.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620661 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 17:10:38 +00:00
Jacopo Cappellato 46dec2f2bd Removed some not required code and made some field final; however the class is still thread unsafe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620656 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 16:49:51 +00:00
Jacopo Cappellato 0574a1d798 Removed unused/unnecessary code from ServerHitBin; no functional changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620648 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 16:18:06 +00:00
Jacopo Cappellato 8390460a89 This was probably a bug due to copy-and-paste.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620633 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 15:20:59 +00:00
Jacopo Cappellato 6577a5b203 Moved the definition of public static maps at the top of the ServerHitBin class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620617 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 14:49:33 +00:00
Jacopo Cappellato 03a947f506 Made some methods in ServerHitBin private; moved the position of sevaral methods (no functional changes).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620616 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 14:47:33 +00:00
Jacopo Cappellato 27af86459c First pass in the cleanup of the ServerHitBin class: made private a bunch of fields and methods, removed some unused fields and methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620611 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 14:37:15 +00:00
Jacopo Cappellato 7495a309d6 Small optimization: instead of calling the InetAddress.getLocalHost() method every time a ServerHitBin record is created, use the address provided by VisitHandler.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620571 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 11:14:15 +00:00
Jacopo Cappellato 5d2d659d39 Small optimization: instead of calling the InetAddress.getLocalHost() method every time a ServerHit is created, use the address provided by VisitHandler.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620567 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 11:02:05 +00:00
Jacopo Cappellato c00fc92699 Merged framework-api-cleanup branch into trunk.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620538 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 09:16:52 +00:00
Jacopo Cappellato be81ed385d Small optimization: instead of calling the InetAddress.getLocalHost() method every time a Visit is created, do it once when the class is loaded.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620525 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 08:02:29 +00:00
Adrian Crum d81823384d Small code cleanup in UtilCache.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620249 13f79535-47bb-0310-9956-ffa450edef68
2014-08-25 00:37:24 +00:00
Adrian Crum 227ba5f9db Small improvement to UtilCache - allow a component to specify its own cache settings file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620244 13f79535-47bb-0310-9956-ffa450edef68
2014-08-25 00:02:45 +00:00
Adrian Crum c63cb8c89e Better encapsulation of entity engine multitenant setting.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620120 13f79535-47bb-0310-9956-ffa450edef68
2014-08-24 10:27:24 +00:00
Jacopo Cappellato 10aceb0cfe Trivial fix to a log statement.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1619799 13f79535-47bb-0310-9956-ffa450edef68
2014-08-22 13:12:51 +00:00
Jacopo Cappellato 52d0dc1568 Upgraded Derby (embedded dbms) to the latest bug fix release 10.10.2.0
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1619319 13f79535-47bb-0310-9956-ffa450edef68
2014-08-21 09:16:40 +00:00
Jacopo Cappellato 38b7048581 Upgraded two j2ee spec jars from Geronimo.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1619300 13f79535-47bb-0310-9956-ffa450edef68
2014-08-21 07:30:06 +00:00
Christian Geisert e8402b8164 OFBIZ-5514 correct calculation of seconds (instead of minutes) in EntitySyncServices.cleanSyncRemoveInfo(). Thanks to Roberto Benítez Monje for reporting
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1619098 13f79535-47bb-0310-9956-ffa450edef68
2014-08-20 13:28:06 +00:00
Jacopo Cappellato d8c412302f OFBIZ-5287: Upgrade to Log4j2
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1618831 13f79535-47bb-0310-9956-ffa450edef68
2014-08-19 10:36:01 +00:00
Ashish Vijaywargiya 8c673dff9e Applied fix for jira issue OFBIZ-5719 - Error to use <#if serviceParameter.value!> in setServiceParameterSync.ftl.
Thanks Wei for reporting the issue and providing the details for the fix. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1618537 13f79535-47bb-0310-9956-ffa450edef68
2014-08-18 05:00:29 +00:00
Adrian Crum 3fbbbd685a Remove console warnings related to method deprecation, https://issues.apache.org/jira/browse/OFBIZ-5718.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1618459 13f79535-47bb-0310-9956-ffa450edef68
2014-08-17 06:05:50 +00:00
Ashish Vijaywargiya 0dff62e4e9 Reverting the changes that I mistakenly committed in trunk r1618325.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1618368 13f79535-47bb-0310-9956-ffa450edef68
2014-08-16 14:43:05 +00:00
Adrian Crum aadc814ba3 Updated Commons CSV library to the official release version (the previous version was a release candidate).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1618332 13f79535-47bb-0310-9956-ffa450edef68
2014-08-16 11:22:36 +00:00
Ashish Vijaywargiya e4d68ed2f7 Applied the patch OFBIZ-4902_framework.patch from OFBIZ-4902 - Replace in Freemarker templates the deprecated built-ins: default, exists, if_exists.
Thanks http://ofbiz.us team for providing the patch work.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1618325 13f79535-47bb-0310-9956-ffa450edef68
2014-08-16 10:58:51 +00:00
Anil Patel 6886a4c7b7 [OFBIZ-5656] Thanks Pierre Smits for the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1618316 13f79535-47bb-0310-9956-ffa450edef68
2014-08-16 08:50:31 +00:00
Adrian Crum b6c4dd5315 Small fixup for my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617938 13f79535-47bb-0310-9956-ffa450edef68
2014-08-14 13:36:33 +00:00
Adrian Crum 4462994828 Fixed a bug in Start.java reported by Justen Walker (https://issues.apache.org/jira/browse/OFBIZ-5710):
The singleton pattern was broken by adding Commons Daemon support code to the class - resulting in multiple instances when using Commons Daemon.

I extracted the Commons Daemon code to a separate class - which delegates to the singleton Start instance. Users of Commons Daemon will need to update their scripts/etc to point to the new class instead of Start.

I also added a comment describing the design of Start.java, so hopefully this will help others maintain the code without breaking it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617936 13f79535-47bb-0310-9956-ffa450edef68
2014-08-14 13:27:39 +00:00
Adam Heath 9b66b02303 Remove creation of any delegator instance when a catalina container
starts; nothing was ever using the saved delegator instance anyways.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617818 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:39:00 +00:00
Adam Heath e4bbbc71cc We now have a real delegator container, that can be used to auto-start
many delegator instances.  Just specify the ones to load, separated by
commas or spaces.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617817 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:38:54 +00:00
Adam Heath dbe9fd76da Now that the thread-pool startup dead-locks are fixed, we can configure
the entirety of the delegator in a thread pool.  This will become a big
win very shortly, when multiple delegators are created at startup.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617816 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:38:48 +00:00
Adam Heath 65d560bc14 Use the BATCH thread pool for the helper initialization.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617815 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:38:41 +00:00
Adam Heath 19fdeb617a Initialize the DistributedCacheClear handler in a thread pool.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617814 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:38:36 +00:00
Adam Heath cc0d265276 Initialize the eca handler in asycnhronously. This requires the previous
patch, that initializes the eca handlers DispatchContext asynchronously.
With it, when the eca attempts to initialize, the DelegatorContext will
also initialize at the same time; this will end up calling back into the
same delegator, and a deadlock will occur.

When both are asynchronous, then the eca initialization will return
quickly, and upon first access, the DispatchContext future will be
waited for.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617813 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:38:30 +00:00
Adam Heath 647513604b Initialize the eca handler's DispatchContext asynchronously. This means
the eca handler will be available sooner, but might briefly pause the
first time it is used, while it waits for the DispatchContext to finish
initializing.

This patch is needed to prevent a deadlock when the eca handler itself
is initialized asynchronously in the delegator; see the next commit.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617812 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:38:24 +00:00
Adam Heath 58c866dfbd Add a simple Future implementation, that returns a constant,
non-changing value.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617811 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:38:18 +00:00
Adam Heath 61a8dabc7e Add a GLOBAL_BATCH thread pool. This is different than GLOBAL_EXECUTOR,
in that:

* BATCH does not block when all the coreThreads are busy, as would
  happen with EXECUTOR.  When all coreThreads are busy, new threads will
  be spawned.
* Scheduled jobs can *not* be submitted.

You can simulate the first problem, by modifying ExecutionPool, and
force-setting the threadCount to 1.  Then, submit something to the pool,
that will then itself submit more items into the pool.  Dead-lock will
occur.

BATCH should be used when it might be posslbe that more items could be
submitted by code you are calling.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617810 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:38:12 +00:00
Adam Heath 2aaa234042 Add a global fork-join thread pool, and switch a bunch of stuff over to
it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617809 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:38:01 +00:00
Adam Heath 111f90c057 Add a helper method for auto adjusting the threadCount.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617808 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:37:49 +00:00