Author: lektran
Date: Mon Sep 17 02:47:50 2007
New Revision: 576331
URL:
http://svn.apache.org/viewvc?rev=576331&view=revLog:
Applied patch from myself based on comments from David E Jones in an issue reported by Pham Hoai Van OFBIZ-152, Removed the boolean keepLocalReaders and any references to it since the false setting is no longer supported.
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=576331&r1=576330&r2=576331&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Mon Sep 17 02:47:50 2007
@@ -75,8 +75,6 @@
public static final String module = GenericDelegator.class.getName();
- /** set this to true for better performance; set to false to be able to reload definitions at runtime throught the cache manager */
- public static final boolean keepLocalReaders = true;
protected ModelReader modelReader = null;
protected ModelGroupReader modelGroupReader = null;
@@ -137,10 +135,8 @@
//if (Debug.infoOn()) Debug.logInfo("Creating new Delegator with name \"" + delegatorName + "\".", module);
this.delegatorName = delegatorName;
- if (keepLocalReaders) {
- modelReader = ModelReader.getModelReader(delegatorName);
- modelGroupReader = ModelGroupReader.getModelGroupReader(delegatorName);
- }
+ modelReader = ModelReader.getModelReader(delegatorName);
+ modelGroupReader = ModelGroupReader.getModelGroupReader(delegatorName);
cache = new Cache(delegatorName);
@@ -265,32 +261,14 @@
*@return ModelReader that corresponds to this delegator
*/
public ModelReader getModelReader() {
- if (keepLocalReaders) {
- return this.modelReader;
- } else {
- try {
- return ModelReader.getModelReader(delegatorName);
- } catch (GenericEntityException e) {
- Debug.logError(e, "Error loading entity model", module);
- return null;
- }
- }
+ return this.modelReader;
}
/** Gets the instance of ModelGroupReader that corresponds to this delegator
*@return ModelGroupReader that corresponds to this delegator
*/
public ModelGroupReader getModelGroupReader() {
- if (keepLocalReaders) {
- return this.modelGroupReader;
- } else {
- try {
- return ModelGroupReader.getModelGroupReader(delegatorName);
- } catch (GenericEntityException e) {
- Debug.logError(e, "Error loading entity group model", module);
- return null;
- }
- }
+ return this.modelGroupReader;
}
/** Gets the instance of ModelEntity that corresponds to this delegator and the specified entityName