summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/process/Gateway.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/c2kernel/process/Gateway.java')
-rw-r--r--src/main/java/com/c2kernel/process/Gateway.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/com/c2kernel/process/Gateway.java b/src/main/java/com/c2kernel/process/Gateway.java
index 0c97a77..af24fe2 100644
--- a/src/main/java/com/c2kernel/process/Gateway.java
+++ b/src/main/java/com/c2kernel/process/Gateway.java
@@ -136,9 +136,6 @@ public class Gateway
Language.isTranlated=true;
Language.mTableOfTranslation = FileStringUtility.loadLanguageFile(languageFile);
}
-
- // if client, run module startup scripts. Otherwise bootstrap will do it after all imports
- if (!AbstractMain.runningAsWrapper) mModules.runScripts("startup");
}
/**
@@ -215,7 +212,7 @@ public class Gateway
} catch (Exception ex) {
Logger.error(ex);
- throw new InvalidDataException("Cannot authenticate. Name and/or password invalid.", "");
+ throw new InvalidDataException("Cannot connect server process. Please check config.", "");
}
@@ -250,6 +247,11 @@ public class Gateway
AgentPath agentPath = mLookup.getAgentPath(agentName);
AgentProxy userProxy = (AgentProxy) mProxyManager.getProxy(agentPath);
userProxy.setAuthObj(auth);
+
+ // Run module startup scripts. Server does this during bootstrap
+ mModules.setUser(userProxy);
+ mModules.runScripts("startup");
+
return userProxy;
}