Revision: 18661
http://sourceforge.net/p/gate/code/18661
Author: ian_roberts
Date: 2015-05-01 15:01:43 +0000 (Fri, 01 May 2015)
Log Message:
-----------
Always respect -Dgate.home=... even when run via gcp-cli.jar
Modified Paths:
--------------
gcp/trunk/src/gate/cloud/batch/BatchRunner.java
Modified: gcp/trunk/src/gate/cloud/batch/BatchRunner.java
===================================================================
--- gcp/trunk/src/gate/cloud/batch/BatchRunner.java 2015-05-01 15:01:14 UTC
(rev 18660)
+++ gcp/trunk/src/gate/cloud/batch/BatchRunner.java 2015-05-01 15:01:43 UTC
(rev 18661)
@@ -687,31 +687,18 @@
log.info("Initial used memory:
"+((runtime.totalMemory()-runtime.freeMemory())/MB)+"M");
try {
- // we set gate home differently depending on which invocation mode
- // we have: if we got invoked from gcpcli, we want to use the gate
- // home that is in the gcp home, otherwise we want to use the one
- // provided by the gate.home property or otherwise the one in gcp home
File gateHome = null;
- // If we use the GCP gate, this is false, otherwise this is true
- boolean useOwnGate = false;
File gcpGate = new File(gcpHome,"gate-home");
- if(invokedByGcpCli) {
- gateHome = gcpGate;
+ if(System.getProperty("gate.home") != null) {
+ gateHome = new File(System.getProperty("gate.home"));
} else {
- if(System.getProperty("gate.home") != null) {
- useOwnGate = true;
- gateHome = new File(System.getProperty("gate.home"));
- } else {
- gateHome = new File(gcpHome,"gate-home");
- }
+ gateHome = new File(gcpHome,"gate-home");
}
Gate.setGateHome(gateHome);
- // depending on which gate we ended up using, we set the config/session
files
- if(useOwnGate) {
- // if we use our own GATE, we have to set the site wide config file
- // and we have to set the user config to the one in gcpHome
- Gate.setSiteConfigFile(new File(gcpGate,"gate.xml"));
- }
+ // use the site and user config files from gcp/gate-home even
+ // if we are using another location for the actual GATE home
+ // dir.
+ Gate.setSiteConfigFile(new File(gcpGate,"gate.xml"));
// we always set the user config file to the one in gcp gate
Gate.setUserConfigFile(new File(gcpGate, "user-gate.xml"));
// we always set the session file to a non-existent file in gcpGate
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs