You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2013/11/17 13:57:26 UTC
svn commit: r1542718 - in /ofbiz/branches/release13.07/framework:
entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java
service/src/org/ofbiz/service/ServiceDispatcher.java
Author: adrianc
Date: Sun Nov 17 12:57:26 2013
New Revision: 1542718
URL: http://svn.apache.org/r1542718
Log:
Merged revision(s) 1542463 from ofbiz/trunk:
FIXME comments, no functional change.
Merged revision(s) 1542464 from ofbiz/trunk:
Elaborate on my previous comment.
Merged revision(s) 1542495 from ofbiz/trunk:
Fixed a bug in EntityDataLoadContainer.java - do not use System.exit, throw an exception instead. Also moved help text to the exception message because it was not being logged before shutdown.
Modified:
ofbiz/branches/release13.07/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java
ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/ServiceDispatcher.java
Modified: ofbiz/branches/release13.07/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java?rev=1542718&r1=1542717&r2=1542718&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java (original)
+++ ofbiz/branches/release13.07/framework/entityext/src/org/ofbiz/entityext/data/EntityDataLoadContainer.java Sun Nov 17 12:57:26 2013
@@ -88,6 +88,7 @@ public class EntityDataLoadContainer imp
this.name = name;
this.configFile = configFile;
// disable job scheduler, JMS listener and startup services
+ // FIXME: This is not thread-safe.
ServiceDispatcher.enableJM(false);
ServiceDispatcher.enableJMS(false);
ServiceDispatcher.enableSvcs(false);
@@ -173,22 +174,22 @@ public class EntityDataLoadContainer imp
createConstraints = true;
}
} else if ("help".equalsIgnoreCase(argumentName)) {
- Debug.logInfo("--------------------------------------", module);
- Debug.logInfo("java -jar ofbiz.jar -install [options]", module);
- Debug.logInfo("-component=[name] .... only load from a specific component", module);
- Debug.logInfo("-delegator=[name] .... use the defined delegator (default-no-eca", module);
- Debug.logInfo("-group=[name] ........ override the entity group (org.ofbiz)", module);
- Debug.logInfo("-file=[path] ......... load a single file from location, several files separated by commas.", module);
- Debug.logInfo("-createfks ........... create dummy (placeholder) FKs", module);
- Debug.logInfo("-maintainTxs ......... maintain timestamps in data file", module);
- Debug.logInfo("-inserts ............. use mostly inserts option", module);
- Debug.logInfo("-repair-columns ........... repair column sizes", module);
- Debug.logInfo("-drop-pks ............ drop primary keys", module);
- Debug.logInfo("-create-pks .......... create primary keys", module);
- Debug.logInfo("-drop-constraints..... drop indexes and foreign keys before loading", module);
- Debug.logInfo("-create-constraints... create indexes and foreign keys after loading (default is true w/ drop-constraints)", module);
- Debug.logInfo("-help ................ display this information", module);
- System.exit(1);
+ String helpStr = "\n--------------------------------------\n" +
+ "java -jar ofbiz.jar -install [options]\n" +
+ "-component=[name] .... only load from a specific component\n" +
+ "-delegator=[name] .... use the defined delegator (default-no-eca)\n" +
+ "-group=[name] ........ override the entity group (org.ofbiz)\n" +
+ "-file=[path] ......... load a single file from location, several files separated by commas\n" +
+ "-createfks ........... create dummy (placeholder) FKs\n" +
+ "-maintainTxs ......... maintain timestamps in data file\n" +
+ "-inserts ............. use mostly inserts option\n" +
+ "-repair-columns ........... repair column sizes\n" +
+ "-drop-pks ............ drop primary keys\n" +
+ "-create-pks .......... create primary keys\n" +
+ "-drop-constraints..... drop indexes and foreign keys before loading\n" +
+ "-create-constraints... create indexes and foreign keys after loading (default is true w/ drop-constraints)\n" +
+ "-help ................ display this information\n";
+ throw new ContainerException(helpStr);
}
// special case
Modified: ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/ServiceDispatcher.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/ServiceDispatcher.java?rev=1542718&r1=1542717&r2=1542718&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/ServiceDispatcher.java (original)
+++ ofbiz/branches/release13.07/framework/service/src/org/ofbiz/service/ServiceDispatcher.java Sun Nov 17 12:57:26 2013
@@ -73,6 +73,8 @@ public class ServiceDispatcher {
protected static final Map<RunningService, ServiceDispatcher> runLog = new ConcurrentLinkedHashMap.Builder<RunningService, ServiceDispatcher>().maximumWeightedCapacity(lruLogSize).build();
protected static Map<String, ServiceDispatcher> dispatchers = FastMap.newInstance();
+ // FIXME: These fields are not thread-safe. They are modified by EntityDataLoadContainer.
+ // We need a better design - like have this class query EntityDataLoadContainer if data is being loaded.
protected static boolean enableJM = true;
protected static boolean enableJMS = true;
protected static boolean enableSvcs = true;