diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-06-12 19:59:32 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-06-12 19:59:32 +0200 |
| commit | 2a324c450839410293c5d5e2c56dc291b4a98634 (patch) | |
| tree | 5933f63473dca9b02765dd5e9b39a972f12c6a4a /src/main/java/com/c2kernel/process | |
| parent | 14e2fe28c2b7ecaae53a10d1aa7aa4b921b6efbc (diff) | |
Refactored LDAP into its own module.
Diffstat (limited to 'src/main/java/com/c2kernel/process')
| -rw-r--r-- | src/main/java/com/c2kernel/process/Gateway.java | 6 | ||||
| -rw-r--r-- | src/main/java/com/c2kernel/process/StandardServer.java | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/com/c2kernel/process/Gateway.java b/src/main/java/com/c2kernel/process/Gateway.java index 82d3894..3f0ffe2 100644 --- a/src/main/java/com/c2kernel/process/Gateway.java +++ b/src/main/java/com/c2kernel/process/Gateway.java @@ -145,13 +145,14 @@ public class Gateway *
* @throws InvalidDataException - error initialising
*/
- static public void startServer() throws InvalidDataException {
+ static public void startServer(Authenticator auth) throws InvalidDataException {
try {
// check top level directory contexts
mLookup.initializeDirectory();
// init next key manager
mNextKeyManager = (NextKeyManager)mC2KProps.getInstance("NextKeyManager");
+ mNextKeyManager.open(auth);
// start entity proxy server
mProxyServer = new ProxyServer(mC2KProps.getProperty("ItemServer.name"));
@@ -196,7 +197,7 @@ public class Gateway * @throws InvalidDataException - bad params
* @throws ClusterStorageException - error starting storages
*/
- static public void connect()
+ static public Authenticator connect()
throws InvalidDataException,
ClusterStorageException
{
@@ -210,6 +211,7 @@ public class Gateway mStorage = new TransactionManager(auth);
mProxyManager = new ProxyManager();
+ return auth;
} catch (Exception ex) {
Logger.error(ex);
throw new InvalidDataException("Cannot connect server process. Please check config.", "");
diff --git a/src/main/java/com/c2kernel/process/StandardServer.java b/src/main/java/com/c2kernel/process/StandardServer.java index e283cb6..43f8afa 100644 --- a/src/main/java/com/c2kernel/process/StandardServer.java +++ b/src/main/java/com/c2kernel/process/StandardServer.java @@ -13,6 +13,7 @@ package com.c2kernel.process; import org.tanukisoftware.wrapper.WrapperListener;
import org.tanukisoftware.wrapper.WrapperManager;
+import com.c2kernel.process.auth.Authenticator;
import com.c2kernel.utils.Logger;
/**************************************************************************
@@ -46,13 +47,13 @@ public class StandardServer extends AbstractMain implements WrapperListener Gateway.init(readC2KArgs(args));
// connect to LDAP as root
- Gateway.connect();
+ Authenticator auth = Gateway.connect();
//start console
Logger.initConsole("ItemServer");
//initialize the server objects
- Gateway.startServer();
+ Gateway.startServer(auth);
Logger.msg(5, "StandardServer::standardInitialisation - complete.");
|
