diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2013-09-20 14:54:39 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2013-09-20 14:54:39 +0200 |
| commit | e5118d5e313c3194c286946cc09e7b8aea099565 (patch) | |
| tree | 679a68e27eb547d5b659e05cd4de998dd4fe2ae9 | |
| parent | 28b878fe7ff77be9441d3d8843ed355fbd7629ea (diff) | |
Pass c2kprops in as argument for ORB, so they can be overridden
| -rw-r--r-- | src/main/java/com/c2kernel/process/Gateway.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/com/c2kernel/process/Gateway.java b/src/main/java/com/c2kernel/process/Gateway.java index 8182bf8..53fa36f 100644 --- a/src/main/java/com/c2kernel/process/Gateway.java +++ b/src/main/java/com/c2kernel/process/Gateway.java @@ -135,19 +135,18 @@ public class Gateway // start entity proxy server
EntityProxyManager.initServer();
- // Init ORB - set various config to sys properties
- java.util.Properties sysProps = System.getProperties();
+ // Init ORB - set various config
String serverName = getProperty("ItemServer.name");
if (serverName != null)
- sysProps.put("com.sun.CORBA.ORBServerHost", serverName);
+ mC2KProps.put("com.sun.CORBA.ORBServerHost", serverName);
String serverPort = getProperty("ItemServer.iiop", "1500");
- sysProps.put("com.sun.CORBA.ORBServerPort", serverPort);
+ mC2KProps.put("com.sun.CORBA.ORBServerPort", serverPort);
//TODO: externalize this (or replace corba completely)
- sysProps.put("com.sun.CORBA.POA.ORBServerId", "1");
- sysProps.put("com.sun.CORBA.POA.ORBPersistentServerPort", serverPort);
+ mC2KProps.put("com.sun.CORBA.POA.ORBServerId", "1");
+ mC2KProps.put("com.sun.CORBA.POA.ORBPersistentServerPort", serverPort);
//Standard initialisation of the ORB
- mORB = org.omg.CORBA.ORB.init(new String[0], sysProps);
+ mORB = org.omg.CORBA.ORB.init(new String[0], mC2KProps);
Logger.msg("Gateway.init() - ORB initialised. ORB is " + mORB.getClass().getName() );
@@ -359,7 +358,7 @@ public class Gateway {
if (orbDestroyed) throw new RuntimeException("Gateway has been closed. ORB is destroyed.");
if (mORB == null)
- mORB = org.omg.CORBA.ORB.init(new String[0], null);
+ mORB = org.omg.CORBA.ORB.init(new String[0], mC2KProps);
return mORB;
}
|
