Commit Graph
921 Commits
Author SHA1 Message Date
Jacopo Cappellato 2aab9001fc Removed some trivial padding for info messages at startup that required the usage of an external (freemarker) util class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621820 13f79535-47bb-0310-9956-ffa450edef68
2014-09-01 15:03:25 +00:00
Jacques Le Roux 425ce1c003 A patch from Nick Ho for "Add/Revise Traditional Chinese (zh-TW) translations in framework" https://issues.apache.org/jira/browse/OFBIZ-5737
more added/updated translations patch files for zh-TW locale

jleroux: 
I added the label
<value xml:lang="zh_TW">服務執行程式拋出一個異常</value>
by hand
Only 1 label was not added:
<value xml:lang="zh_TW">代號</value>
Because of the fuzziness and presence of several possibilities


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621688 13f79535-47bb-0310-9956-ffa450edef68
2014-09-01 06:51:33 +00:00
Adrian Crum 6c927d1112 Removed unnecessary public keywords from the LocalDispatcher interface.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621595 13f79535-47bb-0310-9956-ffa450edef68
2014-08-31 14:53:31 +00:00
Adrian Crum fc272da011 Remove reference to DispatchContext from ModelServiceReader. The DispatchContext reference was only being used to get a Delegator reference, so we will use that instead.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621574 13f79535-47bb-0310-9956-ffa450edef68
2014-08-31 09:58:09 +00:00
Adrian Crum 1ac6edcab2 JavaDocs - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621571 13f79535-47bb-0310-9956-ffa450edef68
2014-08-31 09:08:36 +00:00
Adrian Crum 8f080966d3 Remove Javolution from DispatchContext.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621475 13f79535-47bb-0310-9956-ffa450edef68
2014-08-30 15:56:59 +00:00
Adrian Crum 8bcc227a48 Some work on ServiceDispatcher.java:
1. Remove Javolution.
2. Replace DCL design pattern with ConcurrentHashMap.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621466 13f79535-47bb-0310-9956-ffa450edef68
2014-08-30 14:47:53 +00:00
Adrian Crum 1f41988f38 GenericDispatcherFactory.java FIXME comment.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621454 13f79535-47bb-0310-9956-ffa450edef68
2014-08-30 13:01:39 +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
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
Scott Gray e35bb8ec7e Replace FastMap with HashMap and remove imports
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1616931 13f79535-47bb-0310-9956-ffa450edef68
2014-08-09 09:54:01 +00:00
Scott Gray ba907be142 Replace FastList with ArrayList
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1616928 13f79535-47bb-0310-9956-ffa450edef68
2014-08-09 09:43:15 +00:00
Scott Gray 545851bebb Replace the ServiceXaWrapper with a simpler Synchronization implementation. Helps pave the way for use of alternative transaction management libraries that don't work well with our XA wrapper implementations. Still DebugXaResource to go.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1616925 13f79535-47bb-0310-9956-ffa450edef68
2014-08-09 09:00:39 +00:00
Jacopo Cappellato 3583bfe285 Misc minor cleanups to log messages.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1616751 13f79535-47bb-0310-9956-ffa450edef68
2014-08-08 13:19:09 +00:00
Jacopo Cappellato 066d782950 Misc minor cleanups to log messages.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1616744 13f79535-47bb-0310-9956-ffa450edef68
2014-08-08 13:16:46 +00:00
Jacopo Cappellato 37d586c160 Converted some startup messages from "important" to "info".
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1616431 13f79535-47bb-0310-9956-ffa450edef68
2014-08-07 07:52:23 +00:00
Jacques Le Roux 77f16816da Check properties values
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1611311 13f79535-47bb-0310-9956-ffa450edef68
2014-07-17 10:09:35 +00:00
Jacques Le Roux f302a9a297 Format a bit more BJ's code
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1611246 13f79535-47bb-0310-9956-ffa450edef68
2014-07-17 04:51:37 +00:00
Jacques Le Roux 406f8ea616 No functional change: forgot to save this formatting just before committing r1611002
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1611200 13f79535-47bb-0310-9956-ffa450edef68
2014-07-16 21:38:48 +00:00
Jacques Le Roux 149ba3a471 An updated ands slightly modified patch from BJ Freeman for "allow assignment of port for the Javamail container." https://issues.apache.org/jira/browse/1967
currently no property for setting the port to read email from in the javamail container.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1611002 13f79535-47bb-0310-9956-ffa450edef68
2014-07-16 13:29:19 +00:00
Jacopo Cappellato e439b5b6a6 This is a slightly modified version of the work contributed by Simone Viani in OFBIZ-5619: when a service model was cloned (e.g. when runSync/call-service are invoked passing the require-new-transaction flag) the service was executed with use-transaction set to true, even if the called service is defined to not use it. Also added some checks to make sure that if require-new-transaction is true then also use-transaction must be true.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1609155 13f79535-47bb-0310-9956-ffa450edef68
2014-07-09 13:56:39 +00:00
Jacques Le Roux 5a981e746a A patch from Leon for "No lock can be acquired after ofbiz application crashes." https://issues.apache.org/jira/browse/OFBIZ-5626
We have a service which semaphore set to "fail". Someday, while it was running, the whole ofbiz crashed. 
After the restart, the service is unable to run anymore since the lock file (database record in ServiceSemaphore entity) is already there.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604363 13f79535-47bb-0310-9956-ffa450edef68
2014-06-21 13:27:20 +00:00
Scott Gray b463bdd84b Fix bug that causes a service to keep retrying after a deadlock occurs until lockRetriesRemaining reached zero
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1580620 13f79535-47bb-0310-9956-ffa450edef68
2014-03-23 21:41:57 +00:00
Jacopo Cappellato 34d36b583e Fixed MissingPropertyException happening when success method was called in the context of Groovy services: thanks to Paolo Piersant for the bug report and fix.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1569743 13f79535-47bb-0310-9956-ffa450edef68
2014-02-19 14:09:09 +00:00
Jacques Le Roux 9188f42b39 Reverts 1564543, SOAP tests fail with axis2 1.6.2, keep 1.5.2
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1564661 13f79535-47bb-0310-9956-ffa450edef68
2014-02-05 08:04:59 +00:00
Jacques Le Roux cad1df87cc Updates axis2-kernel, axis2-transport-http & axis2-transport-local to 1.6.2
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1564543 13f79535-47bb-0310-9956-ffa450edef68
2014-02-04 22:41:27 +00:00
Jacques Le Roux c5f187beb6 A patch from Michael Ende for "SimpleMethod parameters doesnt work with prefix" https://issues.apache.org/jira/browse/OFBIZ-5371
I experienced some problems when a form submitted parameters with prefix directly to a SimpleMethod (through the controller request). 
In this case the prefix is not stripped from the parameter name. The patch updates the method ModelService.java:makePrefixMap().

The idea of the prefixMap is: 
If you have some fields like packageweight_1(value=55), packageweight_2(value=65) ... in a form and in a service you need a map called packageweight with the following key values 

packageweight{1=55;2=56;...}

The Problem is that the function makePrefixMap doesn't replace the Prefix.

For Example:
On the "Complete" button of the Facility->Shipment screen we call an event and not the completePack service directly.
The event checks some user rights and after that he call the completePack service. If we call the service from an event there throws an NumberFormatException because the packeweight-PrefixMap contains the prefixes.

This is my event description:
 <simple-method method-name="completePackCheckPermission"
        short-description="Check if this user has permission to create a picklist role"
        login-required="true">
        <check-permission permission="LOGISTICS_CREATE">
            <alt-permission permission="LOGISTICS_ADMIN"/>
            <fail-property resource="EcommerceLogisticsErrorUiLabels" property="NoPermissionForUsage" />
        </check-permission>
        <check-errors />

        <session-to-field field="packingSession"/>
        <set field="parameters.packingSession" from-field="packingSession"/>

        <set-service-fields service-name="completePack" to-map="serviceParameters"
            map="parameters" />
        <call-service service-name="completePack" in-map-name="serviceParameters" />
        <return />
    </simple-method>

jleroux: I'm not quite sure there are no side-effects, but I was not able to find one. So I will wait some time before backporting...



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1559814 13f79535-47bb-0310-9956-ffa450edef68
2014-01-20 19:38:45 +00:00
Adrian Crum 27d57465bf Small rewrite in JobManager.java to fix a bug where jobs could be duplicated under certain conditions. https://issues.apache.org/jira/browse/OFBIZ-5496
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1558774 13f79535-47bb-0310-9956-ffa450edef68
2014-01-16 12:48:44 +00:00
Adrian Crum fac4fd0c42 Elaborate on my previous comment.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542464 13f79535-47bb-0310-9956-ffa450edef68
2013-11-16 04:32:01 +00:00
Adrian Crum b34da96480 FIXME comments, no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542463 13f79535-47bb-0310-9956-ffa450edef68
2013-11-16 04:21:39 +00:00
Adrian Crum 2d2a3fa96e Replace DCL pattern with AtomicReference in JmsListenerFactory.
https://issues.apache.org/jira/browse/OFBIZ-4455


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542442 13f79535-47bb-0310-9956-ffa450edef68
2013-11-16 01:30:56 +00:00
Jacques Le Roux 90d37ce794 After my main external backup disk crashed, my main Eclipse workspace crashed also.
While rebuilding it, it seems I inadvertently pushed a OK button somewhere...
This reverts r1541470 and all pending stuff which should not have slipped in

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1541485 13f79535-47bb-0310-9956-ffa450edef68
2013-11-13 12:01:48 +00:00
Jacques Le Roux d0bd4e8617 This was committed by error
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1541470 13f79535-47bb-0310-9956-ffa450edef68
2013-11-13 11:07:04 +00:00
Scott Gray 287cec6e55 Remove null comparison because jobV can't be null at the given location
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1540551 13f79535-47bb-0310-9956-ffa450edef68
2013-11-10 21:06:50 +00:00
Scott Gray 338b68301b global ECAs weren't honoring the run-as-user attribute defined on action elements
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1539645 13f79535-47bb-0310-9956-ffa450edef68
2013-11-07 14:06:54 +00:00
Jacques Le Roux 7adfe90d71 Fixes <<Services allow arbitrary HTML for parameters with allow-html set to "safe">> https://issues.apache.org/jira/browse/OFBIZ-5254
After r751990, <<allow-html="any">> and <<allow-html="safe">> are the same: they do nothing! The only difference is the warning message from the OWASP Antisamy IntrusionDetector, which is both, as Christoph noted "giving you a false sense of security" or as I wrote "disturbing, wrong and useless". So there are no longer any reasons for differencing "safe" and "any".

This
* Deprecates "safe" (making it clear in the XSD documentation), keeping only "none" and "any". This is for backward compatibility, else we could completely remove the misleading "safe". Note that "none" is the default.
* Replaces in services definition all allow-html="safe" by allow-html="any"
* Remove from ModelService.java (near line 587) the code which throws the OWASP Antisamy IntrusionDetector message in log

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1536324 13f79535-47bb-0310-9956-ffa450edef68
2013-10-28 12:12:43 +00:00
Jacques Le Roux c386f6ab30 Set different ports for testing in a CI environment (e.g. Jenkins) https://issues.apache.org/jira/browse/OFBIZ-4794
*What's for?*
Finally, OOTB the port offset is interesting in 2 cases:
# To eventually run Sonar on OFBiz sources https://issues.apache.org/jira/browse/INFRA-3590
# To simultaneously run the demos without having to change much things, just one parameter (this will need to have the same commited in R13.07... to be discussed...)

Of course, It can be used for other purposes outside of the ASF context...

*How it's done?*
Basically, I just added a portoffset integer parameter to 3 ant targets (of course this JVM param can also be used in a Java call from command line): start, start-pos, start-both,

The portoffset parameter is set to zero by default in ClassLoaderContainer.java. 
If a value is passed, it's then grabed by Config.java and passed to ClassLoaderContainer.java, where it's set to this value.

 The portoffset is then used to change in one shoot all the default ports values defined (in config or hardcoded), and the admin port value
This is done in following classes:
CatalinaContainer
NamingServiceContainer
ServiceEngine through ServiceLocation
RmiServiceContainer
XMLRPCClientEngine
XmlRpcTests

To avoid hardcoding locations in services definitions, I also created 2 service-locations: main-http and main-soap

*To summarize:* these changes will be used to run "ant start" with a portoffset value which will take care of all ports values, including admin port. For running R12.04 demo as stable we will still need to create a patch for the last time. R13.07 could have a similar patch applied since it's not yet released...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533839 13f79535-47bb-0310-9956-ffa450edef68
2013-10-19 22:07:35 +00:00
Jacques Le Roux a0c34848cf Makes the documentation more legible
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1529933 13f79535-47bb-0310-9956-ffa450edef68
2013-10-07 15:07:25 +00:00
Jacques Le Roux a878016f4e No functional changes, just better log info
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1528882 13f79535-47bb-0310-9956-ffa450edef68
2013-10-03 14:17:44 +00:00
Jacques Le Roux 0ef1ff543e Reverts revisions: 1525909 + 1526533 + 1526560, OFBIZ-4794 is not yet ready
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526583 13f79535-47bb-0310-9956-ffa450edef68
2013-09-26 15:44:40 +00:00
Jacques Le Roux c86a579cf8 Set different ports for testing in a CI environment (e.g. Jenkins) https://issues.apache.org/jira/browse/OFBIZ-4794
*What's for?*
OOTB the port offset is interesting in at least 3 cases:
# To simultaneously run tests on the same Buildbot machine. This is related to http://mail-archives.apache.org/mod_mbox/www-builds/201209.mbox/%3C002101cd991b$0a16de50$1e449af0$@16degrees.com.au%3E
# To simultaneously run the demos without having to change much things, just one parameter
# To eventually run Sonar on OFBiz sources https://issues.apache.org/jira/browse/INFRA-3590

*How it's done?*
Basically, I just added a portoffset integer parameter to some ant targets (of course this JVM param can also be used in a Java call from command line):
* in trunk and R13.07: start, start-batch, start-debug, start-pos, start-both, run-tests and run-test
* in R12.04 and R11.04: run-tests, run-test. I did not set start targets because anyway it would miss the admin port offset, withouh much changes. So can't be used to demonstrate. We will continue to use the current paches for those.

The portoffset parameter is set to zero by default in ClassLoaderContainer.java. 
If a value is passed, it's then grabed by Config.java and passed to ClassLoaderContainer.java, where it's set to this value.

 The portoffset is then used to change in one shoot all the default ports values defined (in config or hardcoded), and the admin port value in R13.07 and trunk.
This is done in following classes:
CatalinaContainer
NamingServiceContainer
ServiceEngine through ServiceLocation
RmiServiceContainer
XMLRPCClientEngine
XmlRpcTests

To avoid hardcoding locations in services definitions, I also had to create some service-locations: main-local-soap and main-remote-soap 

*What are the constraints?*
* For demos: the offset should not be applied to trunk because <service-location name="main-remote-soap" location="http://demo-trunk.ofbiz.apache.org:8080/webtools/control/SOAPService"/> is used for tests by trunk *and all releases*. It's useless to apply to trunk anyway,  offsetting port in releases is enough.
* I did not take into account the Ideal payment harcoded port values in IdealPaymentServiceTest.java. Weirdly I did not cross error during tests, though it seems there are tests using an harcoded port in url.

*What is the status?*
Locally (on Win XP)  I ran many tests combinations with <<ant load-demo run-tests>>.  
Applying the portoffset on a sole running test instance has no effects. I have still some fails (no errors) but those are not related to my changes, they appear also without.
But when I run a combination of any releases/trunk but with R11.04, I get a time out error with testSOAPSimpleService, that I can't explain so far. 
If I run the trunk alone with the portoffset no errors occur. Same if I run a release with portoffset and only testSOAPSimpleService in trunk (w/ or w/o portoffset)

*To summarize:* these changes will be used to run Buildot tests instances simultaneously . And, for coming releases, to run demos without having to create patches. Simply running ant start with a portoffset value which will take care of all ports values, including admin port. For running R12.04 demo as stable we will still need to create a patch for the last time.

*What I will to do for now:* commit the patches and test if I cross the same issue on Buildbot. If it's the same (99% chances it will) I will revert and will continue to locally try to find the reason . I believe this issue is unrelated to the changes I implemened.  And it's just because it's now possible to simultaneously run tests that it appears. 

BTW I just noticed that when you run R11.04 with R12.04, R12.04 takes almost all the CPU (XP is not very, while when running any combinations w/o R11.04 the CPU load is shared. 
Also there are far less tests in R11.04, which coul be the reason when I run it with another test run instance there are no issues.  Because R11.04 tests finish before the other instance gets to run testSOAPSimpleService.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1525909 13f79535-47bb-0310-9956-ffa450edef68
2013-09-24 14:47:30 +00:00
Jacopo Cappellato c33e39550c Implemented the ability to specify an event (success) message in Groovy events when success(GString) is invoked.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1520319 13f79535-47bb-0310-9956-ffa450edef68
2013-09-05 14:07:05 +00:00
Scott Gray 1326aa5e06 Fix typo
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1512565 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 05:16:25 +00:00
Scott Gray 955b6745f5 Fix bug preventing deadlock retries for groovy services, GenericEngine implementations and services should never modify the service context
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1509510 13f79535-47bb-0310-9956-ffa450edef68
2013-08-02 01:19:53 +00:00
Jacques Le Roux 107a6762b6 No functional change.
When I reverted r1311214 for "set different ports for testing in a CI environment (e.g. Jenkins)" https://issues.apache.org/jira/browse/OFBIZ-4794 I did not notice Jacopo's also changed some ports value at r1324614
This reverts r1324614 to have things consistent. I don't backport (only R12.04 is concerned) because as long as catalina/ofbiz-component.xml is consistent (port =+ 1) things are working

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1502121 13f79535-47bb-0310-9956-ffa450edef68
2013-07-11 05:38:47 +00:00
Adrian Crum 18b5135a31 Third pass at removing cached DOM tree code from EntityConfigUtil.java. I converted some of the code to use the new thread-safe models.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490938 13f79535-47bb-0310-9956-ffa450edef68
2013-06-08 09:34:47 +00:00
Adrian Crum 7b84188235 First pass at removing cached DOM tree code from EntityConfigUtil.java. I converted some of the code to use the new thread-safe models. I also fixed some concurrency problems in related classes by replacing DCL with java.util.concurrent classes. I discovered the new multi-threaded component loader was creating duplicate resources, so these changes fix that.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490541 13f79535-47bb-0310-9956-ffa450edef68
2013-06-07 08:39:44 +00:00
Adrian Crum 32f9d30ca7 A final pass through ServiceConfigUtil.java - moved some of the convenience method code to the call sites. The convenience methods don't add much now that the API is easier to use. Reorganized methods and added JavaDocs.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490116 13f79535-47bb-0310-9956-ffa450edef68
2013-06-06 03:29:50 +00:00
Adrian Crum 536a9e2f1f More work on ServiceConfigUtil.java - based on a patch from Christoph Neuroth with modifications by me. Client code now uses the new models and the DOM parsing static methods have been removed. The serviceengine.xml file handling is now thread-safe.
https://issues.apache.org/jira/browse/OFBIZ-5204


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490112 13f79535-47bb-0310-9956-ffa450edef68
2013-06-06 02:16:40 +00:00
Adrian Crum 06aea1b98a More work on ServiceConfigUtil.java - based on a patch from Christoph Neuroth with modifications by me. The static helper methods now use the models instead of parsing the DOM tree. This commit makes a small API change - the helper methods now throw an exception if there is a problem with the serviceengine.xml file. The original code would just hide the errors, so client code didn't know anything was wrong.
https://issues.apache.org/jira/browse/OFBIZ-5204


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490004 13f79535-47bb-0310-9956-ffa450edef68
2013-06-05 18:59:51 +00:00