Revision: 18157
          http://sourceforge.net/p/gate/code/18157
Author:   johann_p
Date:     2014-07-04 18:04:12 +0000 (Fri, 04 Jul 2014)
Log Message:
-----------
Make sure the correct gate config, user config and session files are
always used, no matter if we use the GATE from GCP or the one 
set from the gcp-direct.sh script

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     2014-07-04 17:48:57 UTC 
(rev 18156)
+++ gcp/trunk/src/gate/cloud/batch/BatchRunner.java     2014-07-04 18:04:12 UTC 
(rev 18157)
@@ -566,15 +566,20 @@
       int numThreads = Integer.parseInt(args[0]);
 
       String gateDotHome = System.getProperty("gate.home.override");
-      File gateHome = null;
-      if(gateDotHome == null) {
-        gateHome = new File(gcpHome,"gate-home");
-      } else {
+      File gcpGate = new File(gcpHome,"gate-home");
+      File gateHome = gcpGate;
+      if(gateDotHome != null) {
         gateHome = new File(gateDotHome);
       }
       Gate.setGateHome(gateHome);
-      Gate.setUserConfigFile(new File(gcpHome, "user-gate.xml"));
-      Gate.setUserSessionFile(new File(gcpHome, "empty.session"));
+      if(gateDotHome != null) { // if we use our own GATE
+        Gate.setSiteConfigFile(new File(gcpGate,"gate.xml"));
+        Gate.setUserConfigFile(new File(gcpGate, "user-gate.xml"));
+        Gate.setUserSessionFile(new File(gcpGate, "empty.session"));
+      } else { // we use the GCP GATE
+        Gate.setUserConfigFile(new File(gateHome, "user-gate.xml"));
+        Gate.setUserSessionFile(new File(gateHome, "empty.session"));
+      }
       Gate.init();
       
       BatchRunner instance = new BatchRunner(numThreads);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to