1. The only exception caught was GenericEntityException, so any other thrown exception was missed - meaning the transaction was committed and GenericDelegator acted as if nothing was wrong.
2. The commit was performed in the finally block, so it was ALWAYS performed - even after an exception was thrown and the transaction was rolled back.
We managed to get away with this all along because typically there is a wrapping transaction that clears it all up. But still, the Delegator code needs to handle transactions correctly.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527810 13f79535-47bb-0310-9956-ffa450edef68
should be preferred as valid responses, instead of always assuming that
none means do nothing.
This fixes the issue reported in OFBIZ-5304.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527754 13f79535-47bb-0310-9956-ffa450edef68
I believe the original intention was to perform the validation check after the EV_VALIDATE ECAs were run, but the primary key was being used in three method calls before that happened - so those methods could have been passed an invalid primary key.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527609 13f79535-47bb-0310-9956-ffa450edef68
Remove useless and confusing websiteId in web.xml files
I did not remove some others, but I believe they don't make sense as they are.
Take for instance those data
<WebSite webSiteId="EBAY_STORE1" siteName="eBay Store1" standardContentPrefix="http://demo.ofbiz.org" productStoreId="90101"/>
<WebSite webSiteId="EBAY_STORE2" siteName="eBay Store2" standardContentPrefix="http://demo.ofbiz.org" productStoreId="90102"/>
<WebSite webSiteId="GOOGLEBASE" standardContentPrefix="http://demo.ofbiz.org" productStoreId="9000" />
Sorry but http://demo.ofbiz.org/ leads nowhere!
And do we need to keep those referring to productStoreId="9000" in web.xml files? They have not their own webapps
<WebSite webSiteId="CmsSite" siteName="CMS Web Site"/>
<WebSite webSiteId="OfbizSite" siteName="OFBiz Web Site"/>
<WebSite webSiteId="GOOGLECHECKOUT" productStoreId="9000" />
<WebSite webSiteId="GOOGLECHECKOUT" productStoreId="9000" />
I think we should keep in web.xml files, only ecommerce/clone and webPos (uses POS store)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526686 13f79535-47bb-0310-9956-ffa450edef68
Correct following trivial issues:
1. in lookupDescriptionLoaded.prototype.update, not assign the form when try to get filed object by its name
2. in setSourceColor, variable "target" should be given parameter "src"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526456 13f79535-47bb-0310-9956-ffa450edef68
Actually it does paginate but the value is not dependent on widget property widget.form.defaultViewSize which default value is 20. It uses a default value of 50 which is defined by
<set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="3"/>
You can easily test it using https://localhost:8443/manufacturing/control/FindRouting?VIEW_SIZE=3
This is legacy from pre Apache era. I found 143 cases where a default-value is defined in screens for VIEW_SIZE.
I did not look into details for the 143 cases but I believe most are also legacy.
There are few default values: 10, 20, 30, 50, 500 and even an extreme case of 10000 for InventoryItemTotalsExport!
There is only one comment for LookupBulkAddProducts which is also legacy: <!-- 10 rows seems more appropriate given screen size, etc. -->
I suggest to OOTB replace all those by the widget.form.defaultViewSize value.
Things will then be consistent and easily changeable on a global scale using the widget property.
Or if really needed forcing the default-value as it's done now.
So this would be applied on the 143 cases (I checked, viewSizeDefaultValue does not exist in any screen)
<property-to-field resource="widget" property="widget.form.defaultViewSize" field="viewSizeDefaultValue"/>
<set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526387 13f79535-47bb-0310-9956-ffa450edef68
*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
* Deprecates methods in Delegator interface and class
* Deprecates cache clear related variable and methods in EntitySaxReader class
* Deprecates cache clear related variables in minilang related delegator classes
* In simple-method schema annotations, marks do-cache-clear attribute as deprecated
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524704 13f79535-47bb-0310-9956-ffa450edef68
The quickInitDataWarehouse BI button used these dates (set in BI main screen)
<set field="fromDate" value="2008-01-01 00:00:00.0" type="Timestamp"/>
<set field="thruDate" value="2010-01-01 00:00:00.0" type="Timestamp"/>
This generated 1000+ records. I set 10 years ahead (from sept. 2013) in a new bi.properties file used by the BI main screen. So it generates only 3000+ records (and others related in BI DB) which is still reasonable. A message, placed at the top of the Order Reports page, informs users that for 4 Birt reports s/he needs 1st to run the data warehouse init using the BI button. Also this message clarifies the range, to be certain that in 10 years people will still easily know what to change...
I have also replaced a lot of labels and added English and French translations (by-product: some labels cleaning in CommonUiLabels.xml)
I did not do the same for the accounting paymentReport and ViewFacilityInventoryHistoryReport facility Birt reports which only need translation.
I noticed that there are no ways to get to ViewFacilityInventoryHistoryReport from UI though!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1521589 13f79535-47bb-0310-9956-ffa450edef68
framework/build.xml
applications/build.xml
specialpurpose/build.xml
are only used to define the filelist properties (as before) with the list of components to be built.
The main build file simply refers to these lists to build/doc/clean OFBiz; as before, if applications' or specialpurpose's build.xml files are absent, the folders are ignored.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1520744 13f79535-47bb-0310-9956-ffa450edef68
* removed redundant targets (e.g. clean-xtras)
* removed unused targets and settings
* moved runtime related targets from framework to main build file
* moved the search index runtime folder from runtime/data/indexes to runtime/indexes to prevent the removal of indexes when clean-data is executed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1520510 13f79535-47bb-0310-9956-ffa450edef68
public void setResolveHosts(boolean resolveHosts)
Deprecated. Unused, removed in Tomcat 8. See org.apache.catalina.connector.Connector.setEnableLookups(boolean).
and according to the above notes I have enabled the same behavior using the enableLookups flag in the Connectors.
This change resolves a warning during compilation but requires more testing.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1519577 13f79535-47bb-0310-9956-ffa450edef68
This is related with r1361130, where the birt component was moved from framework to specialpurpose.
The fix is to create the possibility of a loose coupling from applications controllers to specialpurpose controllers. For that an if-present attribute is added to the include element. When used, if the included controller does not exist, instead of an error and a stack trace, a warning is thrown (only in English, for developers) suggesting to checkout the component from trunk. Indeed, in the current case, this situation should only arise in release after 12.04 where the birt component, like all others but the ecommerce component, had been removed. This can be used in other cases, but for now only the component level is covered.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1518777 13f79535-47bb-0310-9956-ffa450edef68