diff --git a/samples/hazelcast-spring/src/main/java/sample/SessionConfig.java b/samples/hazelcast-spring/src/main/java/sample/SessionConfig.java index 1451d09f..e5642a90 100644 --- a/samples/hazelcast-spring/src/main/java/sample/SessionConfig.java +++ b/samples/hazelcast-spring/src/main/java/sample/SessionConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,8 @@ public class SessionConfig { int port = SocketUtils.findAvailableTcpPort(); config.getNetworkConfig() - .setPort(port); + .setPort(port) + .getJoin().getMulticastConfig().setEnabled(false); System.out.println("Hazelcast port #: " + port); diff --git a/samples/hazelcast/src/main/java/sample/Initializer.java b/samples/hazelcast/src/main/java/sample/Initializer.java index ee0258a6..f6a1b07c 100644 --- a/samples/hazelcast/src/main/java/sample/Initializer.java +++ b/samples/hazelcast/src/main/java/sample/Initializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,6 +52,7 @@ public class Initializer implements ServletContextListener { Config cfg = new Config(); NetworkConfig netConfig = new NetworkConfig(); netConfig.setPort(getAvailablePort()); + netConfig.getJoin().getMulticastConfig().setEnabled(false); cfg.setNetworkConfig(netConfig); SerializerConfig serializer = new SerializerConfig().setTypeClass(Object.class) .setImplementation(new ObjectStreamSerializer());