diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-06-05 15:02:07 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-06-05 15:02:07 +0200 |
| commit | d4fa3bd9dd48f4d5e26850a23f5ba48a9c10ad64 (patch) | |
| tree | 5ad7bfbce8ba9df9aad53ef33a8b908ca0680fc4 /src/main/java/com/c2kernel/process/UserCodeProcess.java | |
| parent | 8bb86312d4f07dcb343ca2d212f4020906dbdb52 (diff) | |
LDAP refactored behind interfaces. All functions of LDAP now hidden
behind interfaces: Authenticator, Lookup and NextKeyManager (LDAP
property storage was already a ClusterStorage). Gateway holds additional
objects, and
Fixes #26 #191. Refs #27 (needs additional work for read perms and auth
tokens)
Diffstat (limited to 'src/main/java/com/c2kernel/process/UserCodeProcess.java')
| -rw-r--r-- | src/main/java/com/c2kernel/process/UserCodeProcess.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/c2kernel/process/UserCodeProcess.java b/src/main/java/com/c2kernel/process/UserCodeProcess.java index 47742aa..0d35025 100644 --- a/src/main/java/com/c2kernel/process/UserCodeProcess.java +++ b/src/main/java/com/c2kernel/process/UserCodeProcess.java @@ -9,8 +9,8 @@ import com.c2kernel.common.InvalidTransitionException; import com.c2kernel.entity.C2KLocalObject;
import com.c2kernel.entity.agent.Job;
import com.c2kernel.entity.proxy.AgentProxy;
-import com.c2kernel.entity.proxy.ProxyObserver;
import com.c2kernel.entity.proxy.MemberSubscription;
+import com.c2kernel.entity.proxy.ProxyObserver;
import com.c2kernel.persistency.ClusterStorage;
import com.c2kernel.scripting.ErrorInfo;
import com.c2kernel.scripting.ScriptErrorException;
@@ -38,12 +38,12 @@ public class UserCodeProcess extends StandardClient implements ProxyObserver<Job HashMap<String, ErrorInfo> errors = new HashMap<String, ErrorInfo>();
HashMap<String, C2KLocalObject> jobs;
- public UserCodeProcess(String agentName, String agentPass) {
+ public UserCodeProcess(String agentName, String agentPass, String resource) {
// login - try for a while in case server hasn't imported our user yet
for (int i=1;i<6;i++) {
try {
Logger.msg("Login attempt "+i+" of 5");
- agent = Gateway.connect(agentName, agentPass);
+ agent = Gateway.connect(agentName, agentPass, resource);
break;
} catch (Exception ex) {
Logger.error("Could not log in.");
@@ -209,7 +209,7 @@ public class UserCodeProcess extends StandardClient implements ProxyObserver<Job }
public static UserCodeProcess getInstance() throws UnknownHostException {
- return new UserCodeProcess(InetAddress.getLocalHost().getHostName(), "uc");
+ return new UserCodeProcess(InetAddress.getLocalHost().getHostName(), "uc", Gateway.getProperties().getProperty("AuthResource", "Cristal"));
}
static public void main(String[] args)
|
