diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-02-11 16:07:16 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-02-11 16:07:16 +0100 |
commit | 0a52973ce569827357cfa9ac0a2e96c09ffbf7cc (patch) | |
tree | f219b25bebeca4f1e9e58e7174fe7870675b6246 /java/src/IceInternal/Instance.java | |
parent | Add Makefile.mak rule to register assemblies in source dir. (diff) | |
download | ice-0a52973ce569827357cfa9ac0a2e96c09ffbf7cc.tar.bz2 ice-0a52973ce569827357cfa9ac0a2e96c09ffbf7cc.tar.xz ice-0a52973ce569827357cfa9ac0a2e96c09ffbf7cc.zip |
Fixed ICE-5215: IPv6 support enabled by default
Diffstat (limited to 'java/src/IceInternal/Instance.java')
-rw-r--r-- | java/src/IceInternal/Instance.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/java/src/IceInternal/Instance.java b/java/src/IceInternal/Instance.java index 7a505c4e721..68c5b7bf0f0 100644 --- a/java/src/IceInternal/Instance.java +++ b/java/src/IceInternal/Instance.java @@ -177,17 +177,18 @@ public final class Instance return _objectAdapterFactory; } - public synchronized int + public int protocolSupport() { - if(_state == StateDestroyed) - { - throw new Ice.CommunicatorDestroyedException(); - } - return _protocolSupport; } + public boolean + preferIPv6() + { + return _preferIPv6; + } + public synchronized ThreadPool clientThreadPool() { @@ -760,7 +761,7 @@ public final class Instance _proxyFactory = new ProxyFactory(this); boolean ipv4 = _initData.properties.getPropertyAsIntWithDefault("Ice.IPv4", 1) > 0; - boolean ipv6 = _initData.properties.getPropertyAsIntWithDefault("Ice.IPv6", 0) > 0; + boolean ipv6 = _initData.properties.getPropertyAsIntWithDefault("Ice.IPv6", 1) > 0; if(!ipv4 && !ipv6) { throw new Ice.InitializationException("Both IPV4 and IPv6 support cannot be disabled."); @@ -777,6 +778,7 @@ public final class Instance { _protocolSupport = Network.EnableIPv6; } + _preferIPv6 = _initData.properties.getPropertyAsInt("Ice.PreferIPv6Address") > 0; _endpointFactoryManager = new EndpointFactoryManager(this); EndpointFactory tcpEndpointFactory = new TcpEndpointFactory(this); _endpointFactoryManager.add(tcpEndpointFactory); @@ -1204,6 +1206,7 @@ public final class Instance private ObjectFactoryManager _servantFactoryManager; private ObjectAdapterFactory _objectAdapterFactory; private int _protocolSupport; + private boolean _preferIPv6; private ThreadPool _clientThreadPool; private ThreadPool _serverThreadPool; private EndpointHostResolver _endpointHostResolver; |