Commit Graph
921 Commits
Author SHA1 Message Date
Adam Heath 70b72b96a9 Use System.currentTimeMillis() instead of new Date.getTime().
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585784 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 02:13:02 +00:00
Adam Heath d9732f5d00 While tracking down memory usage(using java 1.6 and jhat), I noticed
a significant amount being referenced from the xml definition files.
Interning the strings that are found reduced this usage noticably.
Each string found in an xml file ends up sharing the original array
from the incoming buffer, so more than is nescessary is held in
memory.
Additionally, several strings(for example, partyId) are referenced
several times.  Interning them reduces the memory even further.

Closes https://issues.apache.org/jira/browse/OFBIZ-1291


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585761 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 00:02:59 +00:00
Adam Heath abd5c3b0d6 Used LinkedHashMap/LinkedHashSet, from collections 1.2, instead of
using local variants.  Deprecated OrderedMap/OrderedSet.  The filed
patch removed them, but that might break downstream code, so I'll
leave them in for now.  Closes
https://issues.apache.org/jira/browse/OFBIZ-1324


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585679 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:37:37 +00:00
Adam Heath 80398ba47a Don't use string addition in getMessage(), use a StringBuilder
instead.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585567 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 16:41:32 +00:00
David E. Jones ca526c3957 Some improvements to how sequencing is done, including a new method in the GenericDelegator that does a sequence and create all in one, including a single retry with bank refresh on failure because of duplicate ID just in case two sequencers somehow get the same ID bank; in theory that is impossible but it has been observed in production and this is part of the 2 part solution to handle the problem more elegantly than having to restart the servers, and to try to find out just how two sequencers got the same bank of values; this includes changing a number of key code blocks to use the combined sequence and create for retry, and a little bit of code cleanup too
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@582142 13f79535-47bb-0310-9956-ffa450edef68
2007-10-05 09:02:49 +00:00
David E. Jones c5ff0fc828 Added result-to-result feature for seca rules, based on patch from Adrian Crum but changed to be more consistent with context-to-result, AND to only copy over values that are valid for the service that triggered the eca; Jira #OFBIZ-1237
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@579424 13f79535-47bb-0310-9956-ffa450edef68
2007-09-26 01:32:37 +00:00
Andrew Zeneski b330fea32e fixed bug where runtime data was not being deleted
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@578274 13f79535-47bb-0310-9956-ffa450edef68
2007-09-21 21:03:19 +00:00
Andrew Zeneski ebfbea1b9a uses nested trys
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@578273 13f79535-47bb-0310-9956-ffa450edef68
2007-09-21 21:03:03 +00:00
Andrew Zeneski 1ef6a9f731 changed where semaphores are released (in finally block to make sure it is run even in the case of an exception) implemented per-service configurable settings for wait/sleep (sleep in milliseconds; wait in seconds) semaphore-wait-seconds="300" (default) is 5 minutes. The max time a service will wait before failing to run.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@577141 13f79535-47bb-0310-9956-ffa450edef68
2007-09-19 04:04:08 +00:00
David E. Jones f63513b53f Refactored to use a loop instead of recursion for the retries so the stack doesn't get so huge; also added notes about some things that need to be done on this semaphore stuff
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@577139 13f79535-47bb-0310-9956-ffa450edef68
2007-09-19 03:06:55 +00:00
Andrew Zeneski b1478118c4 changed so the purgeOldJobs service can only run one at a time to prevent locking on the job sandbox table; when it is running on multiple application servers at the same time
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@577097 13f79535-47bb-0310-9956-ffa450edef68
2007-09-18 22:56:19 +00:00
David E. Jones 4c02885546 Added global-commit-post-run event that gets a context after the service and eca rules run
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@576815 13f79535-47bb-0310-9956-ffa450edef68
2007-09-18 10:04:50 +00:00
David E. Jones 1aeaa42a42 Added test of global-commit and global-rollback, also commented out the failing tests so that these will all succeed, as solutions are found for these other tests they should be added back in, those are the lock wait timeout tests
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@576730 13f79535-47bb-0310-9956-ffa450edef68
2007-09-18 06:46:04 +00:00
Scott Gray 05432d31b3 typo
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@576324 13f79535-47bb-0310-9956-ffa450edef68
2007-09-17 09:23:32 +00:00
David E. Jones 19ab65004c Small improvement and quieting of log message
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@575446 13f79535-47bb-0310-9956-ffa450edef68
2007-09-13 20:49:44 +00:00
David E. Jones 4c56bd82d9 Fixed a couple of issues with the tx tests, for deadlock the problem was with the test, also changed to hide error with the rollback only set and attempt to commit so doesn't show up as error or failure in test case
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@575366 13f79535-47bb-0310-9956-ffa450edef68
2007-09-13 16:47:36 +00:00
Andrew Zeneski d4c785dad4 implemented ServiceSemaphore; built in locking to prevent services (when defined) from running at the same time; uses database record to work with a cluser of application servers. Three modes are available:
None - Does no locking
Wait - Waits for the previous service to complete (currently up to 5 minutes)
Fail - Fails when the same service is already running

use the semaphore="none|wait|fail" in the service definition (none is the default when the attribute is not defined)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@575074 13f79535-47bb-0310-9956-ffa450edef68
2007-09-12 20:58:44 +00:00
David E. Jones 882124675e Fixed problem with service engine and TransactionUtil where if rollback only was set in a service it could not run sub-services even in their own transaction; the test case for this now passes with no problems
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@574514 13f79535-47bb-0310-9956-ffa450edef68
2007-09-11 08:52:18 +00:00
David E. Jones 84580f87fb Added service to test case that is currently not working where a service with a transaction with rollback only set can't call a service in its own transaction
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@574493 13f79535-47bb-0310-9956-ffa450edef68
2007-09-11 07:15:30 +00:00
David E. Jones a21616fbca Added mode to error message... it's REALLY annoying to not know in/out for parameter validation errors
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@574451 13f79535-47bb-0310-9956-ffa450edef68
2007-09-11 05:06:28 +00:00
David E. Jones 20d6259e82 Added some tougher variations on the deadlock retry test case to make sure both threads succeed in the end; note that this appears to be failure for the non-retry thread so the retry code and/or the test cases need a little more work
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@573973 13f79535-47bb-0310-9956-ffa450edef68
2007-09-09 09:39:13 +00:00
David E. Jones 3249854cee A few refinements to the deadlock retry test case, but the main part of this is the actual implementation of the deadlock retry in the service engine, and the implementation of that makes the deadlock test case pass now; this is a bit of rework in some low level code so this needs some good testing beyond the few general tests already done
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@573956 13f79535-47bb-0310-9956-ffa450edef68
2007-09-09 08:13:25 +00:00
David E. Jones afefce6020 These failure cases are now running properly, though for the first lock wait timeout I still don't like the error results because it is hard to identify for retry purposes; whatever the case, here they are; NOTE these WILL all fail right now and that is expected, these are in anticipation of new Service Engine features to automatically recover from these errors
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@573813 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 10:32:18 +00:00
David E. Jones fc67258517 Redid transaction management for poller; noticed that this is using a dangerous pattern so changed to use the one more common and help catch some corner cases, and make SURE the transaction gets closed; based on observation in a production server that this code appears to have locked a bunch of stuff and then the commit never happened, so the poller was dead until that went away
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@573800 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 08:25:19 +00:00
David E. Jones 3ad47cf2b7 Added sequence-bank-size for certain higher traffic entities
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@573786 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 05:33:55 +00:00
Andrew Zeneski c2c2de5580 dispatcher was ignore the results of pre-auth and pre-in-validate eca responses
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@573300 13f79535-47bb-0310-9956-ffa450edef68
2007-09-06 15:35:35 +00:00
David E. Jones 1d6d5edea5 Refactor of service def attribute default-value stuff, fixes the corner case found in OFBIZ-1226; was able to get through test case that previously erred out
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@573140 13f79535-47bb-0310-9956-ffa450edef68
2007-09-06 03:25:29 +00:00
David E. Jones e3feec113a Fixed issue reported by Si in #OFBIZ-1226, and added comment to services.xsd to explain how this is used; BTW, the commit that caused this problem broke rule #1 of first do no harm, that broke existing functionality to add something new that didn't work either
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@573126 13f79535-47bb-0310-9956-ffa450edef68
2007-09-06 00:47:47 +00:00
David E. Jones c5e71667f6 Added some test cases for deadlock and lock wait timeout errors to be used when developing auto retry feature in service engine; note that this isn't implemented yet so these (usually not used) test cases will fail, if that becommes a problem we can comment them out in the test def xml file
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@572280 13f79535-47bb-0310-9956-ffa450edef68
2007-09-03 10:45:24 +00:00
David E. Jones eba6f60b7b Fixed NPE caused by passing in a null context, now creates an empty one for use throughout the call
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@572275 13f79535-47bb-0310-9956-ffa450edef68
2007-09-03 10:38:34 +00:00
Andrew Zeneski 431a0c4f34 few small moficiations (better error checking) to the javamail container
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@571262 13f79535-47bb-0310-9956-ffa450edef68
2007-08-30 18:12:02 +00:00
David E. Jones 529ac4df28 Changed so that when set and action elements are interleaved they run in the order specified instead of all set ops and then all actions ops
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@570283 13f79535-47bb-0310-9956-ffa450edef68
2007-08-28 00:48:50 +00:00
David E. Jones 20916970e7 Small improvement for the messages when an ECA rule evals to true or false
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@569763 13f79535-47bb-0310-9956-ffa450edef68
2007-08-26 04:32:02 +00:00
Andrew Zeneski 3cd7c25f6f implemented a simple date based ECA condition
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@569693 13f79535-47bb-0310-9956-ffa450edef68
2007-08-25 16:02:35 +00:00
Andrew Zeneski 09bc5c770b fixed default-value which was using the string instead of the converted object
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@569692 13f79535-47bb-0310-9956-ffa450edef68
2007-08-25 16:02:19 +00:00
David E. Jones fecd5e035f Small change to avoid warning messages
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@567519 13f79535-47bb-0310-9956-ffa450edef68
2007-08-20 02:00:58 +00:00
Jacques Le Roux 9245703ffc A patch from Adrian Crum "Improved Time Zone Support, Part 2" (https://issues.apache.org/jira/browse/OFBIZ-1164)
Please see comments in Jira issue.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@564957 13f79535-47bb-0310-9956-ffa450edef68
2007-08-11 18:40:45 +00:00
David E. Jones 3fe03469ce Changed from info to verbose, interesting data but information content low
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@564153 13f79535-47bb-0310-9956-ffa450edef68
2007-08-09 09:00:46 +00:00
David E. Jones ede990f68e Changed a few noisy error messages to verbose
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@562592 13f79535-47bb-0310-9956-ffa450edef68
2007-08-03 21:37:58 +00:00
Jacques Le Roux 174bcd8621 A patch from Shi Yusen "zh properties in progress" (https://issues.apache.org/jira/browse/OFBIZ-617)
The framework part was still waiting to be commited

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@556459 13f79535-47bb-0310-9956-ffa450edef68
2007-07-15 21:40:04 +00:00
David E. Jones e91a6c47d5 Added timeZone as an automatic attribute for all services; should fix problems introduced by OFBIZ-1117
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@553183 13f79535-47bb-0310-9956-ffa450edef68
2007-07-04 11:42:45 +00:00
Scott Gray 7085c4efcd Fixed a bug where an additional listener is attached to the mail store on every call to checkMessages, OFBIZ-124
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@552216 13f79535-47bb-0310-9956-ffa450edef68
2007-06-30 21:46:22 +00:00
David E. Jones 07b48643c5 As noted needing to be done by Jacques Le Roux did a search/replace on source=1.4 and changed to 1.5
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@541997 13f79535-47bb-0310-9956-ffa450edef68
2007-05-27 15:55:18 +00:00
David E. Jones 7d70c41c12 Did a big search/replace to change all xsd file refs from www.ofbiz.org to ofbiz.apache.org
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@539504 13f79535-47bb-0310-9956-ffa450edef68
2007-05-18 15:47:14 +00:00
Andrew Zeneski edd5aae89a fixed Job Manager so that disabled setting still loads the manager and performs async tasks, just does not enable the poller
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@538659 13f79535-47bb-0310-9956-ffa450edef68
2007-05-16 17:36:19 +00:00
Andrew Zeneski d57b1edf24 fixed LRU synchronization issues
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@536399 13f79535-47bb-0310-9956-ffa450edef68
2007-05-09 03:34:44 +00:00
Hans Bakker 72132f3013 Bunch of NL updates by Perry Smit from morevalue.nl
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@536128 13f79535-47bb-0310-9956-ffa450edef68
2007-05-08 08:57:35 +00:00
Andrew Zeneski ad4915d17d added rmi trust store
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@534994 13f79535-47bb-0310-9956-ffa450edef68
2007-05-03 21:53:41 +00:00
Andrew Zeneski 7cbcc85cbd refactored x509 implementations; now it will use the certificate to determine the userlogin; tomcat changed to ignore cert files (just pass through) so all checking can be handled by ofbiz; login worker updated to use new method of cert checking; added isser entity to configure what issuers are allowed to sign login certs (the certificate must also be included in a trust store) new component based trust/cert stores configured in ofbiz-component.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@531272 13f79535-47bb-0310-9956-ffa450edef68
2007-04-22 20:56:58 +00:00
Andrew Zeneski 8c9e6bd5c6 implemented simple service stream handler; allows reading the inputstream of a request from inside a service; useful for processing non-standard requests
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@526262 13f79535-47bb-0310-9956-ffa450edef68
2007-04-06 19:30:22 +00:00