diff options
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/IceBox/Admin.java | 58 | ||||
-rw-r--r-- | java/src/IceInternal/PropertyNames.java | 19 |
2 files changed, 52 insertions, 25 deletions
diff --git a/java/src/IceBox/Admin.java b/java/src/IceBox/Admin.java index d83b4d1cc15..796b62a9aea 100644 --- a/java/src/IceBox/Admin.java +++ b/java/src/IceBox/Admin.java @@ -59,41 +59,51 @@ public final class Admin return 0; } - Ice.Properties properties = communicator().getProperties(); + Ice.ObjectPrx base = communicator().propertyToProxy("IceBoxAdmin.ServiceManager.Proxy"); - Ice.Identity managerIdentity = new Ice.Identity(); - managerIdentity.category = properties.getPropertyWithDefault("IceBox.InstanceName", "IceBox"); - managerIdentity.name = "ServiceManager"; - - String managerProxy; - if(properties.getProperty("Ice.Default.Locator").length() == 0) + if(base == null) { - String managerEndpoints = properties.getProperty("IceBox.ServiceManager.Endpoints"); - if(managerEndpoints.length() == 0) + // + // The old deprecated way to retrieve the service manager proxy + // + + Ice.Properties properties = communicator().getProperties(); + + Ice.Identity managerIdentity = new Ice.Identity(); + managerIdentity.category = properties.getPropertyWithDefault("IceBox.InstanceName", "IceBox"); + managerIdentity.name = "ServiceManager"; + + String managerProxy; + if(properties.getProperty("Ice.Default.Locator").length() == 0) { - System.err.println(appName() + ": property `IceBox.ServiceManager.Endpoints' is not set"); - return 1; + String managerEndpoints = properties.getProperty("IceBox.ServiceManager.Endpoints"); + if(managerEndpoints.length() == 0) + { + System.err.println(appName() + ": property `IceBoxAdmin.ServiceManager.Proxy' is not set"); + return 1; + } + + managerProxy = "\"" + communicator().identityToString(managerIdentity) + "\" :" + managerEndpoints; } - - managerProxy = "\"" + communicator().identityToString(managerIdentity) + "\" :" + managerEndpoints; - } - else - { - String managerAdapterId = properties.getProperty("IceBox.ServiceManager.AdapterId"); - if(managerAdapterId.length() == 0) + else { - System.err.println(appName() + ": property `IceBox.ServiceManager.AdapterId' is not set"); - return 1; + String managerAdapterId = properties.getProperty("IceBox.ServiceManager.AdapterId"); + if(managerAdapterId.length() == 0) + { + System.err.println(appName() + ": property `IceBoxAdmin.ServiceManager.Proxy' is not set"); + return 1; + } + + managerProxy = "\"" + communicator().identityToString(managerIdentity) + "\" @" + managerAdapterId; } - - managerProxy = "\"" + communicator().identityToString(managerIdentity) + "\" @" + managerAdapterId; + + base = communicator().stringToProxy(managerProxy); } - Ice.ObjectPrx base = communicator().stringToProxy(managerProxy); IceBox.ServiceManagerPrx manager = IceBox.ServiceManagerPrxHelper.checkedCast(base); if(manager == null) { - System.err.println(appName() + ": `" + managerProxy + "' is not running"); + System.err.println(appName() + ": `" + base.toString() + "' is not an IceBox::ServiceManager"); return 1; } diff --git a/java/src/IceInternal/PropertyNames.java b/java/src/IceInternal/PropertyNames.java index 0786a86d5a0..2ffa86d977f 100644 --- a/java/src/IceInternal/PropertyNames.java +++ b/java/src/IceInternal/PropertyNames.java @@ -7,7 +7,7 @@ // // ********************************************************************** // -// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Sep 26 17:22:42 2007 +// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Sep 26 19:26:30 2007 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -146,6 +146,21 @@ public final class PropertyNames null }; + public static final Property IceBoxAdminProps[] = + { + new Property("IceBoxAdmin\\.ServiceManager\\.Proxy\\.EndpointSelection", false, null), + new Property("IceBoxAdmin\\.ServiceManager\\.Proxy\\.ConnectionCached", false, null), + new Property("IceBoxAdmin\\.ServiceManager\\.Proxy\\.PreferSecure", false, null), + new Property("IceBoxAdmin\\.ServiceManager\\.Proxy\\.LocatorCacheTimeout", false, null), + new Property("IceBoxAdmin\\.ServiceManager\\.Proxy\\.Locator", false, null), + new Property("IceBoxAdmin\\.ServiceManager\\.Proxy\\.Router", false, null), + new Property("IceBoxAdmin\\.ServiceManager\\.Proxy\\.CollocationOptimization", true, "IceBoxAdmin.ServiceManager.Proxy.CollocationOptimized"), + new Property("IceBoxAdmin\\.ServiceManager\\.Proxy\\.CollocationOptimized", false, null), + new Property("IceBoxAdmin\\.ServiceManager\\.Proxy\\.ThreadPerConnection", false, null), + new Property("IceBoxAdmin\\.ServiceManager\\.Proxy", false, null), + null + }; + public static final Property IceGridAdminProps[] = { new Property("IceGridAdmin\\.AuthenticateUsingSSL", false, null), @@ -590,6 +605,7 @@ public final class PropertyNames { IceProps, IceBoxProps, + IceBoxAdminProps, IceGridAdminProps, IceGridProps, IcePatch2Props, @@ -605,6 +621,7 @@ public final class PropertyNames { "Ice", "IceBox", + "IceBoxAdmin", "IceGridAdmin", "IceGrid", "IcePatch2", |