From 14ad3ebcdf21de937959c3e84cb0d45c243d9db8 Mon Sep 17 00:00:00 2001 From: Andy Taylor Date: Wed, 13 Jan 2016 10:32:20 +0000 Subject: [PATCH] fix example compilation --- .../jms/example/ClientSideLoadBalancingExample.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/features/clustered/client-side-load-balancing/src/main/java/org/apache/activemq/artemis/jms/example/ClientSideLoadBalancingExample.java b/examples/features/clustered/client-side-load-balancing/src/main/java/org/apache/activemq/artemis/jms/example/ClientSideLoadBalancingExample.java index 1281017797..41a3a648b2 100644 --- a/examples/features/clustered/client-side-load-balancing/src/main/java/org/apache/activemq/artemis/jms/example/ClientSideLoadBalancingExample.java +++ b/examples/features/clustered/client-side-load-balancing/src/main/java/org/apache/activemq/artemis/jms/example/ClientSideLoadBalancingExample.java @@ -16,6 +16,8 @@ */ package org.apache.activemq.artemis.jms.example; +import org.apache.activemq.artemis.core.client.impl.ClientSessionInternal; + import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.JMSException; @@ -67,9 +69,9 @@ public class ClientSideLoadBalancingExample { Session sessionB = connectionB.createSession(false, Session.AUTO_ACKNOWLEDGE); Session sessionC = connectionC.createSession(false, Session.AUTO_ACKNOWLEDGE); - System.out.println("Session A - " + ((org.apache.activemq.artemis.core.client.impl.DelegatingSession) ((org.apache.activemq.artemis.jms.client.ActiveMQSession) sessionA).getCoreSession()).getConnection().getRemoteAddress()); - System.out.println("Session B - " + ((org.apache.activemq.artemis.core.client.impl.DelegatingSession) ((org.apache.activemq.artemis.jms.client.ActiveMQSession) sessionB).getCoreSession()).getConnection().getRemoteAddress()); - System.out.println("Session C - " + ((org.apache.activemq.artemis.core.client.impl.DelegatingSession) ((org.apache.activemq.artemis.jms.client.ActiveMQSession) sessionC).getCoreSession()).getConnection().getRemoteAddress()); + System.out.println("Session A - " + ((ClientSessionInternal) ((org.apache.activemq.artemis.jms.client.ActiveMQSession) sessionA).getCoreSession()).getConnection().getRemoteAddress()); + System.out.println("Session B - " + ((ClientSessionInternal)((org.apache.activemq.artemis.jms.client.ActiveMQSession) sessionB).getCoreSession()).getConnection().getRemoteAddress()); + System.out.println("Session C - " + ((ClientSessionInternal)((org.apache.activemq.artemis.jms.client.ActiveMQSession) sessionC).getCoreSession()).getConnection().getRemoteAddress()); // Step 6. We create JMS MessageProducer objects on the sessions MessageProducer producerA = sessionA.createProducer(queue);