summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/process
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/c2kernel/process')
-rw-r--r--src/main/java/com/c2kernel/process/Gateway.java6
-rw-r--r--src/main/java/com/c2kernel/process/StandardServer.java5
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.");