Author: jacopoc
Date: Wed Aug 21 06:35:04 2013
New Revision: 1516095
URL: http://svn.apache.org/r1516095
Log:
Applied fix from trunk for revision: 1516094
===
Fixed bug introduced in rev 1490678 (removal of cached DOM tree code and
refactoring for thread-safety): after that commit it was not possible to define
entity data readers at runtime, this fix re-enables the feature.
Modified:
ofbiz/branches/release13.07/ (props changed)
ofbiz/branches/release13.07/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml
(props changed)
ofbiz/branches/release13.07/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy
(props changed)
ofbiz/branches/release13.07/applications/product/script/org/ofbiz/product/test/InventoryTests.xml
(props changed)
ofbiz/branches/release13.07/framework/common/widget/HelpScreens.xml
(props changed)
ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/config/model/EntityDataReader.java
ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java
ofbiz/branches/release13.07/framework/security/data/PasswordSecurityData.xml
(props changed)
ofbiz/branches/release13.07/tools/mergefromtrunk.bat (props changed)
ofbiz/branches/release13.07/tools/mergefromtrunk.sh (props changed)
Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1516094
Propchange:
ofbiz/branches/release13.07/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml
('svn:mergeinfo' removed)
Propchange:
ofbiz/branches/release13.07/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy
('svn:mergeinfo' removed)
Propchange:
ofbiz/branches/release13.07/applications/product/script/org/ofbiz/product/test/InventoryTests.xml
('svn:mergeinfo' removed)
Propchange: ofbiz/branches/release13.07/framework/common/widget/HelpScreens.xml
('svn:mergeinfo' removed)
Modified:
ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/config/model/EntityDataReader.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/config/model/EntityDataReader.java?rev=1516095&r1=1516094&r2=1516095&view=diff
==============================================================================
---
ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/config/model/EntityDataReader.java
(original)
+++
ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/config/model/EntityDataReader.java
Wed Aug 21 06:35:04 2013
@@ -39,6 +39,14 @@ public final class EntityDataReader {
private final String name; // type = xs:string
private final List<Resource> resourceList; // <resource>
+ public EntityDataReader(String name) throws GenericEntityConfException {
+ if (name == null || name.isEmpty()) {
+ throw new GenericEntityConfException("EntityDataReader name cannot
be empty");
+ }
+ this.name = name;
+ this.resourceList = Collections.emptyList();
+ }
+
EntityDataReader(Element element) throws GenericEntityConfException {
String lineNumberText =
EntityConfigUtil.createConfigFileLineNumberText(element);
String name = element.getAttribute("name").intern();
Modified:
ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java?rev=1516095&r1=1516094&r2=1516095&view=diff
==============================================================================
---
ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java
(original)
+++
ofbiz/branches/release13.07/framework/entity/src/org/ofbiz/entity/util/EntityDataLoader.java
Wed Aug 21 06:35:04 2013
@@ -114,6 +114,11 @@ public class EntityDataLoader {
EntityDataReader entityDataReaderInfo = null;
try {
entityDataReaderInfo =
EntityConfigUtil.getEntityDataReader(readerName);
+ if (entityDataReaderInfo == null) {
+ // create a reader name defined at runtime
+ Debug.logInfo("Could not find entity-data-reader
named: " + readerName + ". Creating a new reader with this name. ", module);
+ entityDataReaderInfo = new
EntityDataReader(readerName);
+ }
} catch (GenericEntityConfException e) {
Debug.logWarning(e, "Exception thrown while getting entity
data reader config: ", module);
}
Propchange:
ofbiz/branches/release13.07/framework/security/data/PasswordSecurityData.xml
('svn:mergeinfo' removed)
Propchange: ofbiz/branches/release13.07/tools/mergefromtrunk.bat
('svn:mergeinfo' removed)
Propchange: ofbiz/branches/release13.07/tools/mergefromtrunk.sh
('svn:mergeinfo' removed)