diff --git a/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java b/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java index 05f227cdab..8ef78faf0e 100644 --- a/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java +++ b/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java @@ -57,7 +57,6 @@ public class EmbeddedExample extends ActiveMQExample System.out.println("Started Embedded JMS Server"); JMSServerManager jmsServerManager = jmsServer.getJMSServerManager(); - jmsServerManager.addQueueToJndi("exampleQueue", "queue/exampleQueue"); List connectors = new ArrayList(); connectors.add("in-vm"); jmsServerManager.createConnectionFactory("ConnectionFactory", false, JMSFactoryType.CF, connectors, "ConnectionFactory"); diff --git a/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/jms/example/SymmetricClusterExample.java b/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/jms/example/SymmetricClusterExample.java index de4eb5e2c6..235226a49f 100644 --- a/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/jms/example/SymmetricClusterExample.java +++ b/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/jms/example/SymmetricClusterExample.java @@ -82,8 +82,10 @@ public class SymmetricClusterExample extends ActiveMQExample // connection factory directly we avoid having to worry about a JNDI look-up. // In an app server environment you could use HA-JNDI to lookup from the clustered JNDI servers without // having to know about a specific one. - UDPBroadcastGroupConfiguration udpCfg = new UDPBroadcastGroupConfiguration("231.7.7.7", 9876, null, -1); - DiscoveryGroupConfiguration groupConfiguration = new DiscoveryGroupConfiguration(ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT, udpCfg); + UDPBroadcastGroupConfiguration udpCfg = new UDPBroadcastGroupConfiguration(); + udpCfg.setGroupAddress("231.7.7.7").setGroupPort(9876); + DiscoveryGroupConfiguration groupConfiguration = new DiscoveryGroupConfiguration(); + groupConfiguration.setBroadcastEndpointFactoryConfiguration(udpCfg); ConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithHA(groupConfiguration, JMSFactoryType.CF);