version that takes a cache parameter.
This commit finishes the Delegator.getRelatedOne set of changes; the
previous methods are now deprecated, and the new ones should be used
going forward.
Delegator.getRelatedOne(String, GenericValue) is replaced by
Delegator.getRelatedOne(String, GenericValue, boolean).
Delegator.getRelatedOneCache(String, GenericValue) is replaced by
Delegator.getRelatedOne(String, GenericValue, boolean).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343476 13f79535-47bb-0310-9956-ffa450edef68
Rework internal GenericDelegator methods to call the new method, but no
other external classes directly call this new one yet.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343475 13f79535-47bb-0310-9956-ffa450edef68
TransactionUtil.doNewTransaction was starting a new transaction, then
immediately suspending it. This caused confusion in calling code that
tried to use doNewTransaction. Fortunately, this was not used very
much,
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343469 13f79535-47bb-0310-9956-ffa450edef68
NoTransaction; it used to be Callable. NoTransaction implements
Callable. This change requires a recompile, but is otherwise
compatible with calling code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343468 13f79535-47bb-0310-9956-ffa450edef68
* replaced putIfAbsent + get with putIfAbsentAndGet to avoid the risk of a NPE if the cache entry is removed (or expired) between the two calls
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343287 13f79535-47bb-0310-9956-ffa450edef68
* protected the UtilCache object (static field) by making it private and final
* instead of using the "put" method, use the "putIfAbsentAndGet" method to prevent the risk of adding the new value if another concurrent thread added it in the meantime
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343278 13f79535-47bb-0310-9956-ffa450edef68
* removed unnecessary synchronization
* protected the UtilCache object (static field) by making it private and final
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343277 13f79535-47bb-0310-9956-ffa450edef68
* some misc formatting and changes to comments
* removed the old and unused configuration for minerva
* added a new file appender for Tomcat where all Tomcat internal logging is now redirected
* changed internal logging for FOP from info to warn to be consistent with the settings of other external components (Tomcat, Geronimo Transaction Manager, Freemarker)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343269 13f79535-47bb-0310-9956-ffa450edef68
---- exception report ----------------------------------------------------------
ERROR: Cannot do a find that returns an EntityListIterator with no transaction in place. Wrap this call in a transaction.
Exception: java.lang.Exception
Message: Stack Trace
---- stack trace ---------------------------------------------------------------
java.lang.Exception: Stack Trace
org.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1751)
org.ofbiz.order.order.OrderServices$1.call(OrderServices.java:5610)
org.ofbiz.order.order.OrderServices$1.call(OrderServices.java:5605)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343088 13f79535-47bb-0310-9956-ffa450edef68
1) "Deleted row in FilterOrderList.groovy" https://issues.apache.org/jira/browse/OFBIZ-3431
2) "getOrders() in OrderListState does not work" https://issues.apache.org/jira/browse/OFBIZ-4883
As I had some doubt about the origin of the issues and wanted to check if they were real and would not hide something else or have side-effect, I did a complete historical review.
1) Could have been hidden using groovy safe navigation
ie
facilityId = orderHeader.originFacilityId ?: productStore?.inventoryFacilityId;
instead of
facilityId = orderHeader.originFacilityId ?: productStore.inventoryFacilityId;
But anyway it was wrong from the start when I introduced the feature http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/filterorderlist.bsh?view=markup&pathrev=465376
(related to https://issues.apache.org/jira/browse/OFBIZ-644)
The facilityId was useless. I remember I extracted it from a client specific feature and certainly forgot to remove this part (useless at least in OFBiz code) when I merged with Leon's code.
2) Was Erwan wrong C/P or typo at http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java?r1=1305309&r2=1305308&pathrev=1305309
Thanks to Chatree Srichart and Nils Pförtner for reports (actually I found OFBIZ-3431 by chance while working on the issue)
Still, David was against this feature when I introduced it. And I must say that almost 6 years later I tend to agree with him. I have since crossed the same kind of OO patterns written in OFBiz based application by good Java programmers. They breaks the "simple" ways used in OFBiz at the application level (of course not at the framework level where those patterns are useful) and often finish to be problems...
Quoting David:
<<In general I don't like the pattern used in this patch. It doesn't follow best practices or use the tools and patterns established in OFBiz to make all of our lives easier, during implementation but even more importantly during maintenance and customization. There are very good reasons we recommend using object oriented patterns written in Java on only very rare occasions. This is a good example of something that is not complex enough to justify, and it will be a maintenance problem in the future.>>
Anyway this code is there now, and it's actually not as simple to replace...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342980 13f79535-47bb-0310-9956-ffa450edef68
I removed log4j-over-slf4j from trunk at in order to have logs in official Trunk demo. THis is part of the JCR effort which should be removed from trunk anyway since Sascha recreated a new JCR branch. I let him handle the rest...
I guess [Bridging legacy APIs|http://www.slf4j.org/legacy.html] has not been followed in details
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342893 13f79535-47bb-0310-9956-ffa450edef68
Use Swiss geo data. To be consistent I have also renamed GeoData_CHE.xml to GeoData_CH.xml.
While at it I also renamed GeoData_IRL.xml to GeoData_IE.xml , renamed things internally, and extracted the North Ireland geo data from it to GeoData_UK.xml where it actually belongs
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342846 13f79535-47bb-0310-9956-ffa450edef68