[jboss-cvs] JBoss Messaging SVN: r6425 - in trunk: examples/jms and 18 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Apr 14 13:56:31 EDT 2009


Author: timfox
Date: 2009-04-14 13:56:30 -0400 (Tue, 14 Apr 2009)
New Revision: 6425

Added:
   trunk/examples/jms/client-side-load-balancing/
   trunk/examples/jms/client-side-load-balancing/build.xml
   trunk/examples/jms/client-side-load-balancing/readme.html
   trunk/examples/jms/client-side-load-balancing/server0/
   trunk/examples/jms/client-side-load-balancing/server0/client-jndi.properties
   trunk/examples/jms/client-side-load-balancing/server0/jbm-configuration.xml
   trunk/examples/jms/client-side-load-balancing/server0/jbm-jms.xml
   trunk/examples/jms/client-side-load-balancing/server0/jbm-queues.xml
   trunk/examples/jms/client-side-load-balancing/server0/jbm-security.xml
   trunk/examples/jms/client-side-load-balancing/server0/jbm-standalone-beans.xml
   trunk/examples/jms/client-side-load-balancing/server1/
   trunk/examples/jms/client-side-load-balancing/server1/client-jndi.properties
   trunk/examples/jms/client-side-load-balancing/server1/jbm-configuration.xml
   trunk/examples/jms/client-side-load-balancing/server1/jbm-jms.xml
   trunk/examples/jms/client-side-load-balancing/server1/jbm-queues.xml
   trunk/examples/jms/client-side-load-balancing/server1/jbm-security.xml
   trunk/examples/jms/client-side-load-balancing/server1/jbm-standalone-beans.xml
   trunk/examples/jms/client-side-load-balancing/server2/
   trunk/examples/jms/client-side-load-balancing/server2/client-jndi.properties
   trunk/examples/jms/client-side-load-balancing/server2/jbm-configuration.xml
   trunk/examples/jms/client-side-load-balancing/server2/jbm-jms.xml
   trunk/examples/jms/client-side-load-balancing/server2/jbm-queues.xml
   trunk/examples/jms/client-side-load-balancing/server2/jbm-security.xml
   trunk/examples/jms/client-side-load-balancing/server2/jbm-standalone-beans.xml
   trunk/examples/jms/client-side-load-balancing/src/
   trunk/examples/jms/client-side-load-balancing/src/org/
   trunk/examples/jms/client-side-load-balancing/src/org/jboss/
   trunk/examples/jms/client-side-load-balancing/src/org/jboss/jms/
   trunk/examples/jms/client-side-load-balancing/src/org/jboss/jms/example/
   trunk/examples/jms/client-side-load-balancing/src/org/jboss/jms/example/ClientSideLoadBalancingExample.java
Modified:
   trunk/.classpath
   trunk/examples/jms/application-layer-failover/build.xml
   trunk/examples/jms/durable-subscription/build.xml
   trunk/examples/jms/http-transport/build.xml
   trunk/examples/jms/large-message/build.xml
   trunk/examples/jms/paging/build.xml
   trunk/examples/jms/queue-message-redistribution/build.xml
   trunk/examples/jms/topic-selector-example2/build.xml
   trunk/examples/jms/transactional/build.xml
   trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java
Log:
more example stuff

Modified: trunk/.classpath
===================================================================
--- trunk/.classpath	2009-04-14 16:32:37 UTC (rev 6424)
+++ trunk/.classpath	2009-04-14 17:56:30 UTC (rev 6425)
@@ -23,8 +23,9 @@
 	<classpathentry kind="src" path="examples/jms/application-layer-failover/src"/>
 	<classpathentry kind="src" path="examples/jms/clustered-queue/src"/>
 	<classpathentry kind="src" path="examples/jms/clustered-topic/src"/>
+	<classpathentry kind="src" path="examples/jms/clustered-durable-subscription/src"/>
 	<classpathentry kind="src" path="examples/jms/queue-message-redistribution/src"/>
-	<classpathentry kind="src" path="examples/jms/clustered-durable-subscription/src"/>
+	<classpathentry kind="src" path="examples/jms/client-side-load-balancing/src"/>
 	<classpathentry kind="src" path="examples/jms/browser/src"/>
 	<classpathentry kind="src" path="examples/jms/durable-subscription/src"/>
 	<classpathentry kind="src" path="examples/jms/common/src"/>

Modified: trunk/examples/jms/application-layer-failover/build.xml
===================================================================
--- trunk/examples/jms/application-layer-failover/build.xml	2009-04-14 16:32:37 UTC (rev 6424)
+++ trunk/examples/jms/application-layer-failover/build.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -28,7 +28,7 @@
 <!-- =========================================================================================== -->
 
 
-<project default="run" name="JBoss Messaging JMS Automatic Failover Example">
+<project default="run" name="JBoss Messaging JMS Application Layer Failover Example">
 
    <import file="../common/build.xml"/>
 

Added: trunk/examples/jms/client-side-load-balancing/build.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/build.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/build.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+      <!ENTITY libraries SYSTEM "../../../thirdparty/libraries.ent">
+      ]>
+
+<!-- =========================================================================================== -->
+<!--                                                                                             -->
+<!-- JBoss, Home of Professional Open Source                                                     -->
+<!-- Copyright 2005, JBoss Inc., and individual contributors as indicated                        -->
+<!-- by the @authors tag. See the copyright.txt in the distribution for a                        -->
+<!-- full listing of individual contributors.                                                    -->
+<!--                                                                                             -->
+<!-- This is free software; you can redistribute it and/or modify it                             -->
+<!-- under the terms of the GNU Lesser General Public License as                                 -->
+<!-- published by the Free Software Foundation; either version 2.1 of                            -->
+<!-- the License, or (at your option) any later version.                                         -->
+<!--                                                                                             -->
+<!-- This software is distributed in the hope that it will be useful,                            -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of                              -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU                            -->
+<!-- Lesser General Public License for more details.                                             -->
+<!--                                                                                             -->
+<!-- You should have received a copy of the GNU Lesser General Public                            -->
+<!-- License along with this software; if not, write to the Free                                 -->
+<!-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA                          -->
+<!-- 02110-1301 USA, or see the FSF site: http://www.fsf.org.                                    -->
+<!--                                                                                             -->
+<!-- =========================================================================================== -->
+
+
+<project default="run" name="JBoss Messaging JMS Client Side Load Balancing Example">
+
+   <import file="../common/build.xml"/>
+
+   <target name="run">
+      <antcall target="runExample">
+         <param name="example.classname" value="org.jboss.jms.example.ClientSideLoadBalancingExample"/>
+         <param name="jbm.example.beans.file" value="server0 server1 server2"/>
+      </antcall>
+   </target>
+
+   <target name="runRemote">
+      <antcall target="runExample">
+         <param name="example.classname" value="org.jboss.jms.example.ClientSideLoadBalancingExample"/>
+         <param name="jbm.example.runServer" value="false"/>
+      </antcall>
+   </target>
+
+</project>

Added: trunk/examples/jms/client-side-load-balancing/readme.html
===================================================================
--- trunk/examples/jms/client-side-load-balancing/readme.html	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/readme.html	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,175 @@
+<html>
+  <head>
+    <title>JBoss Messaging JMS Load Balanced Queue Example/title>
+    <link rel="stylesheet" type="text/css" href="../common/common.css">
+  </head>
+  <body>
+     <h1>JBoss Messaging JMS Load Balanced Queue Example</h1>
+     <br>
+     <p>This example demonstrates a JMS queue deployed on two different nodes. The two nodes are configured to form a cluster.</p>
+     <p>We then create a consumer on the queue on each node, and we create a producer on only one of the nodes.</p>
+     <p>We then send some messages via the producer, and we verify that <b>both</b> consumers receive the sent messages
+     in a round-robin fashion.</p>
+     <p>In other words, JBoss Messaging <b>load balances</b> the sent messages across all consumers on the cluster</p>
+     <p>This example uses JNDI to lookup the JMS Queue and ConnectionFactory objects. If you prefer not to use
+     JNDI, these could be instantiated directly.</p>     
+     <p>Here's the relevant snippet from the server configuration, which tells the server to form a cluster between the two nodes
+     and to load balance the messages between the nodes.</p>     
+     <pre>
+     <code>
+   &lt;cluster-connection name="my-cluster"&gt;
+      &lt;address&gt;jms&lt;/address&gt;
+	   &lt;retry-interval&gt;500&lt;/retry-interval&gt;
+	   &lt;use-duplicate-detection&gt;true&lt;/use-duplicate-detection&gt;
+	   &lt;forward-when-no-consumers&gt;true&lt;/forward-when-no-consumers&gt;
+	   &lt;max-hops&gt;1&lt;/max-hops&gt;
+	   &lt;discovery-group-ref discovery-group-name="my-discovery-group"/&gt;
+   &lt;/cluster-connection&gt;
+   </code>
+     </pre>    
+     <p>For more information on JBoss Messaging load balancing, and clustering in general, please see the clustering
+     section of the user manual.</p>      
+     <h2>Example step-by-step</h2>
+     <p><i>To run the example, simply type <code>ant</code> from this directory</i></p>
+     <br>
+     <ol>
+        <li> Get an initial context for looking up JNDI from server 0.</li>
+        <pre>
+           <code>
+   ic0 = getContext(0);
+   </code>
+        </pre>
+
+        <li>Look-up the JMS Queue object from JNDI</li>
+        <pre>
+           <code>Queue queue = (Queue)ic0.lookup("/queue/exampleQueue");</code>
+        </pre>
+
+        <li>Look-up a JMS Connection Factory object from JNDI on server 0</li>
+        <pre>
+           <code>ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("/ConnectionFactory");</code>
+        </pre>
+
+        <li>Get an initial context for looking up JNDI from server 1.</li>
+        <pre>
+           <code>ic1 = getContext(1);</code>
+        </pre>
+
+        <li>Look-up a JMS Connection Factory object from JNDI on server 1</li>
+        <pre>
+           <code>ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("/ConnectionFactory");
+           </code>
+        </pre>
+
+        <li>We create a JMS Connection connection0 which is a connection to server 0</li>
+        <pre>
+          <code>
+   connection0 = cf0.createConnection();
+          </code>
+        </pre>
+        
+        <li>We create a JMS Connection connection1 which is a connection to server 1</li>
+        <pre>
+          <code>
+   connection1 = cf1.createConnection();
+          </code>
+        </pre>
+
+        <li>We create a JMS Session on server 0</li>
+        <pre>
+           <code>
+   Session session0 = connection0.createSession(false, Session.AUTO_ACKNOWLEDGE);
+           </code>
+        </pre>
+        
+        <li>We create a JMS Session on server 1</li>
+        <pre>
+           <code>
+   Session session1 = connection1.createSession(false, Session.AUTO_ACKNOWLEDGE);
+            </code>
+        </pre>
+
+        <li>We start the connections to ensure delivery occurs on them</li>
+        <pre>
+           <code>
+   connection0.start();
+
+   connection1.start();
+           </code>
+        </pre>
+
+        <li>We create JMS MessageConsumer objects on server 0 and server 1</li>
+        <pre>
+           <code>
+   MessageConsumer consumer0 = session0.createConsumer(queue);
+
+   MessageConsumer consumer1 = session1.createConsumer(queue);
+           </code>
+        </pre>
+
+        <li>We create a JMS MessageProducer object on server 0.</li>
+        <pre>
+           <code>
+   MessageProducer producer = session0.createProducer(queue);</code>
+        </pre>
+
+        <li>We send some messages to server 0.</li>
+        <pre>
+           <code>
+	final int numMessages = 10;
+
+	for (int i = 0; i < numMessages; i++)
+	{
+	   TextMessage message = session0.createTextMessage("This is text message " + i);
+	      
+	   producer.send(message);
+	
+	   System.out.println("Sent message: " + message.getText());
+	}
+           </code>
+        </pre>
+        
+        <li>We now consume those messages on *both* server 0 and server 1.
+         We note the messages have been distributed between servers in a round robin fashion.
+         JBoss Messaging has <b>load balanced</b> the messages between the available consumers on the different nodes.
+         JBoss Messaging can be configured to always load balance messages to all nodes, or to only balance messages
+         to nodes which have consumers with no or matching selectors. See the user manual for more details.</li>
+         JMS Queues implement point-to-point message where each message is only ever consumed by a
+         maximum of one consumer.
+        <pre>
+           <code>
+	for (int i = 0; i < numMessages; i += 2)
+	{
+	   TextMessage message0 = (TextMessage)consumer0.receive(5000);
+	
+	   System.out.println("Got message: " + message0.getText() + " from node 0");
+	
+	   TextMessage message1 = (TextMessage)consumer1.receive(5000);
+	
+	   System.out.println("Got message: " + message1.getText() + " from node 1");
+	}
+           </code>
+        </pre> 
+
+        <li>And finally (no pun intended), <b>always</b> remember to close your JMS resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
+
+        <pre>
+           <code>
+	finally
+	{
+	   if (connection0 != null)
+	   {
+	      connection0.close();
+	   }
+	      
+	   if (connection1 != null)
+	   {
+	      connection1.close();
+	   }
+	}
+           </code>
+        </pre>
+
+     </ol>
+  </body>
+</html>
\ No newline at end of file

Added: trunk/examples/jms/client-side-load-balancing/server0/client-jndi.properties
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server0/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server0/client-jndi.properties	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Added: trunk/examples/jms/client-side-load-balancing/server0/jbm-configuration.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server0/jbm-configuration.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server0/jbm-configuration.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,43 @@
+<deployment xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-configuration.xsd">
+   <configuration>
+
+      <clustered>true</clustered>
+
+      <!-- Connectors -->
+
+      <connector name="netty-connector">
+         <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
+         <param key="jbm.remoting.netty.port" value="5445" type="Integer"/>
+      </connector>
+
+      <!-- Acceptors -->
+
+      <acceptor name="netty-acceptor">
+         <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+         <param key="jbm.remoting.netty.port" value="5445" type="Integer"/>
+      </acceptor>
+
+      <!-- Clustering configuration -->
+
+      <broadcast-group name="my-broadcast-group">
+         <group-address>231.7.7.7</group-address>
+         <group-port>9876</group-port>
+         <broadcast-period>100</broadcast-period>
+         <connector-ref connector-name="netty-connector"/>
+      </broadcast-group>
+
+      <discovery-group name="my-discovery-group">
+         <group-address>231.7.7.7</group-address>
+         <group-port>9876</group-port>
+         <refresh-timeout>10000</refresh-timeout>
+      </discovery-group>
+
+      <!-- Other config -->
+
+      <journal-min-files>2</journal-min-files>
+
+   </configuration>
+
+</deployment>

Added: trunk/examples/jms/client-side-load-balancing/server0/jbm-jms.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server0/jbm-jms.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server0/jbm-jms.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,18 @@
+<deployment xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-jms.xsd ">
+   <!--the connection factory used by the example-->
+   <connection-factory name="ConnectionFactory">
+      <discovery-group-ref discovery-group-name="my-discovery-group"/>
+      <entry name="ConnectionFactory"/>
+      <entry name="XAConnectionFactory"/>
+      <entry name="java:/ConnectionFactory"/>
+      <entry name="java:/XAConnectionFactory"/>     
+   </connection-factory>
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue">
+      <entry name="/queue/exampleQueue"/>
+   </queue>
+
+</deployment>
\ No newline at end of file

Added: trunk/examples/jms/client-side-load-balancing/server0/jbm-queues.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server0/jbm-queues.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server0/jbm-queues.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,15 @@
+<settings xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-queues.xsd ">
+
+   <!--security for example queue-->
+   <security match="jms.queue.exampleQueue">
+      <permission type="createDurableQueue" roles="guest"/>
+      <permission type="deleteDurableQueue" roles="guest"/>
+      <permission type="createTempQueue" roles="guest"/>
+      <permission type="deleteTempQueue" roles="guest"/>
+      <permission type="consume" roles="guest"/>
+      <permission type="send" roles="guest"/>
+   </security>
+
+</settings>

Added: trunk/examples/jms/client-side-load-balancing/server0/jbm-security.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server0/jbm-security.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server0/jbm-security.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,7 @@
+<deployment xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-security.xsd ">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</deployment>
\ No newline at end of file

Added: trunk/examples/jms/client-side-load-balancing/server0/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server0/jbm-standalone-beans.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server0/jbm-standalone-beans.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>
+
+   <!-- JNDI server. Disable this if you don't want JNDI -->
+   <bean name="JNDIServer" class="org.jnp.server.Main">
+      <property name="namingInfo">
+         <inject bean="Naming"/>
+      </property>
+      <property name="port">1099</property>
+      <property name="bindAddress">localhost</property>
+      <property name="rmiPort">1098</property>
+      <property name="rmiBindAddress">localhost</property>
+   </bean>
+   
+   <!-- MBean server -->
+   <bean name="MBeanServer" class="javax.management.MBeanServer">
+      <constructor factoryClass="java.lang.management.ManagementFactory"
+                   factoryMethod="getPlatformMBeanServer"/>
+   </bean> 
+
+   <!-- The core configuration -->
+   <bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
+
+	<!-- The security manager -->
+   <bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+      <start ignored="true"/>
+      <stop ignored="true"/>
+   </bean>
+
+	<!-- The core server -->
+   <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl"> 
+      <constructor>
+         <parameter>
+            <inject bean="Configuration"/>
+         </parameter>
+         <parameter>
+            <inject bean="MBeanServer"/>
+         </parameter>
+         <parameter>
+            <inject bean="JBMSecurityManager"/>
+         </parameter>        
+      </constructor>         
+   </bean>
+   
+   <!-- The JMS server -->
+   <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+      <constructor>         
+         <parameter>
+            <inject bean="MessagingServer"/>
+         </parameter>
+      </constructor>
+   </bean>
+
+
+</deployment>
\ No newline at end of file

Added: trunk/examples/jms/client-side-load-balancing/server1/client-jndi.properties
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server1/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server1/client-jndi.properties	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:2099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Added: trunk/examples/jms/client-side-load-balancing/server1/jbm-configuration.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server1/jbm-configuration.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server1/jbm-configuration.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,43 @@
+<deployment xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-configuration.xsd">
+   <configuration>
+
+      <clustered>true</clustered>
+
+      <!-- Connectors -->
+
+      <connector name="netty-connector">
+         <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
+         <param key="jbm.remoting.netty.port" value="5446" type="Integer"/>
+      </connector>
+
+      <!-- Acceptors -->
+
+      <acceptor name="netty-acceptor">
+         <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+         <param key="jbm.remoting.netty.port" value="5446" type="Integer"/>
+      </acceptor>
+
+      <!-- Clustering configuration -->
+
+      <broadcast-group name="my-broadcast-group">
+         <group-address>231.7.7.7</group-address>
+         <group-port>9876</group-port>
+         <broadcast-period>100</broadcast-period>
+         <connector-ref connector-name="netty-connector"/>
+      </broadcast-group>
+
+      <discovery-group name="my-discovery-group">
+         <group-address>231.7.7.7</group-address>
+         <group-port>9876</group-port>
+         <refresh-timeout>10000</refresh-timeout>
+      </discovery-group>
+
+      <!-- Other config -->
+
+      <journal-min-files>2</journal-min-files>
+
+   </configuration>
+
+</deployment>

Added: trunk/examples/jms/client-side-load-balancing/server1/jbm-jms.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server1/jbm-jms.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server1/jbm-jms.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,18 @@
+<deployment xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-jms.xsd ">
+   <!--the connection factory used by the example-->
+   <connection-factory name="ConnectionFactory">
+      <discovery-group-ref discovery-group-name="my-discovery-group"/>
+      <entry name="ConnectionFactory"/>
+      <entry name="XAConnectionFactory"/>
+      <entry name="java:/ConnectionFactory"/>
+      <entry name="java:/XAConnectionFactory"/>      
+   </connection-factory>
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue">
+      <entry name="/queue/exampleQueue"/>
+   </queue>
+
+</deployment>
\ No newline at end of file

Added: trunk/examples/jms/client-side-load-balancing/server1/jbm-queues.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server1/jbm-queues.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server1/jbm-queues.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,15 @@
+<settings xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-queues.xsd ">
+
+   <!--security for example queue-->
+   <security match="jms.queue.exampleQueue">
+      <permission type="createDurableQueue" roles="guest"/>
+      <permission type="deleteDurableQueue" roles="guest"/>
+      <permission type="createTempQueue" roles="guest"/>
+      <permission type="deleteTempQueue" roles="guest"/>
+      <permission type="consume" roles="guest"/>
+      <permission type="send" roles="guest"/>
+   </security>
+
+</settings>

Added: trunk/examples/jms/client-side-load-balancing/server1/jbm-security.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server1/jbm-security.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server1/jbm-security.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,7 @@
+<deployment xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-security.xsd ">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</deployment>
\ No newline at end of file

Added: trunk/examples/jms/client-side-load-balancing/server1/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server1/jbm-standalone-beans.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server1/jbm-standalone-beans.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>
+
+   <!-- JNDI server. Disable this if you don't want JNDI -->
+   <bean name="JNDIServer" class="org.jnp.server.Main">
+      <property name="namingInfo">
+         <inject bean="Naming"/>
+      </property>
+      <property name="port">2099</property>
+      <property name="bindAddress">localhost</property>
+      <property name="rmiPort">2098</property>
+      <property name="rmiBindAddress">localhost</property>
+   </bean>
+   
+   <!-- MBean server -->
+   <bean name="MBeanServer" class="javax.management.MBeanServer">
+      <constructor factoryClass="java.lang.management.ManagementFactory"
+                   factoryMethod="getPlatformMBeanServer"/>
+   </bean> 
+
+   <!-- The core configuration -->
+   <bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
+
+	<!-- The security manager -->
+   <bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+      <start ignored="true"/>
+      <stop ignored="true"/>
+   </bean>
+
+	<!-- The core server -->
+   <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl"> 
+      <constructor>
+         <parameter>
+            <inject bean="Configuration"/>
+         </parameter>
+         <parameter>
+            <inject bean="MBeanServer"/>
+         </parameter>
+         <parameter>
+            <inject bean="JBMSecurityManager"/>
+         </parameter>        
+      </constructor>         
+   </bean>
+   
+   <!-- The JMS server -->
+   <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+      <constructor>         
+         <parameter>
+            <inject bean="MessagingServer"/>
+         </parameter>
+      </constructor>
+   </bean>
+
+</deployment>
\ No newline at end of file

Added: trunk/examples/jms/client-side-load-balancing/server2/client-jndi.properties
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server2/client-jndi.properties	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server2/client-jndi.properties	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:3099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Added: trunk/examples/jms/client-side-load-balancing/server2/jbm-configuration.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server2/jbm-configuration.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server2/jbm-configuration.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,43 @@
+<deployment xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-configuration.xsd">
+   <configuration>
+
+      <clustered>true</clustered>
+
+      <!-- Connectors -->
+
+      <connector name="netty-connector">
+         <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
+         <param key="jbm.remoting.netty.port" value="5447" type="Integer"/>
+      </connector>
+
+      <!-- Acceptors -->
+
+      <acceptor name="netty-acceptor">
+         <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+         <param key="jbm.remoting.netty.port" value="5447" type="Integer"/>
+      </acceptor>
+
+      <!-- Clustering configuration -->
+
+      <broadcast-group name="my-broadcast-group">
+         <group-address>231.7.7.7</group-address>
+         <group-port>9876</group-port>
+         <broadcast-period>100</broadcast-period>
+         <connector-ref connector-name="netty-connector"/>
+      </broadcast-group>
+
+      <discovery-group name="my-discovery-group">
+         <group-address>231.7.7.7</group-address>
+         <group-port>9876</group-port>
+         <refresh-timeout>10000</refresh-timeout>
+      </discovery-group>
+
+      <!-- Other config -->
+
+      <journal-min-files>2</journal-min-files>
+
+   </configuration>
+
+</deployment>

Added: trunk/examples/jms/client-side-load-balancing/server2/jbm-jms.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server2/jbm-jms.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server2/jbm-jms.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,18 @@
+<deployment xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-jms.xsd ">
+   <!--the connection factory used by the example-->
+   <connection-factory name="ConnectionFactory">
+      <discovery-group-ref discovery-group-name="my-discovery-group"/>
+      <entry name="ConnectionFactory"/>
+      <entry name="XAConnectionFactory"/>
+      <entry name="java:/ConnectionFactory"/>
+      <entry name="java:/XAConnectionFactory"/>     
+   </connection-factory>
+
+   <!--the queue used by the example-->
+   <queue name="exampleQueue">
+      <entry name="/queue/exampleQueue"/>
+   </queue>
+
+</deployment>
\ No newline at end of file

Added: trunk/examples/jms/client-side-load-balancing/server2/jbm-queues.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server2/jbm-queues.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server2/jbm-queues.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,15 @@
+<settings xmlns="urn:jboss:messaging"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-queues.xsd ">
+
+   <!--security for example queue-->
+   <security match="jms.queue.exampleQueue">
+      <permission type="createDurableQueue" roles="guest"/>
+      <permission type="deleteDurableQueue" roles="guest"/>
+      <permission type="createTempQueue" roles="guest"/>
+      <permission type="deleteTempQueue" roles="guest"/>
+      <permission type="consume" roles="guest"/>
+      <permission type="send" roles="guest"/>
+   </security>
+
+</settings>

Added: trunk/examples/jms/client-side-load-balancing/server2/jbm-security.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server2/jbm-security.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server2/jbm-security.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,7 @@
+<deployment xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-security.xsd ">
+   <!-- the default user.  this is used where username is null-->
+   <defaultuser name="guest" password="guest">
+      <role name="guest"/>
+   </defaultuser>
+</deployment>
\ No newline at end of file

Added: trunk/examples/jms/client-side-load-balancing/server2/jbm-standalone-beans.xml
===================================================================
--- trunk/examples/jms/client-side-load-balancing/server2/jbm-standalone-beans.xml	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/server2/jbm-standalone-beans.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>
+
+   <!-- JNDI server. Disable this if you don't want JNDI -->
+   <bean name="JNDIServer" class="org.jnp.server.Main">
+      <property name="namingInfo">
+         <inject bean="Naming"/>
+      </property>
+      <property name="port">3099</property>
+      <property name="bindAddress">localhost</property>
+      <property name="rmiPort">3098</property>
+      <property name="rmiBindAddress">localhost</property>
+   </bean>
+   
+   <!-- MBean server -->
+   <bean name="MBeanServer" class="javax.management.MBeanServer">
+      <constructor factoryClass="java.lang.management.ManagementFactory"
+                   factoryMethod="getPlatformMBeanServer"/>
+   </bean> 
+
+   <!-- The core configuration -->
+   <bean name="Configuration" class="org.jboss.messaging.core.config.impl.FileConfiguration"/>
+
+	<!-- The security manager -->
+   <bean name="JBMSecurityManager" class="org.jboss.messaging.core.security.impl.JBMSecurityManagerImpl">
+      <start ignored="true"/>
+      <stop ignored="true"/>
+   </bean>
+
+	<!-- The core server -->
+   <bean name="MessagingServer" class="org.jboss.messaging.core.server.impl.MessagingServerImpl"> 
+      <constructor>
+         <parameter>
+            <inject bean="Configuration"/>
+         </parameter>
+         <parameter>
+            <inject bean="MBeanServer"/>
+         </parameter>
+         <parameter>
+            <inject bean="JBMSecurityManager"/>
+         </parameter>        
+      </constructor>         
+   </bean>
+   
+   <!-- The JMS server -->
+   <bean name="JMSServerManager" class="org.jboss.messaging.jms.server.impl.JMSServerManagerImpl">
+      <constructor>         
+         <parameter>
+            <inject bean="MessagingServer"/>
+         </parameter>
+      </constructor>
+   </bean>
+
+
+</deployment>
\ No newline at end of file

Added: trunk/examples/jms/client-side-load-balancing/src/org/jboss/jms/example/ClientSideLoadBalancingExample.java
===================================================================
--- trunk/examples/jms/client-side-load-balancing/src/org/jboss/jms/example/ClientSideLoadBalancingExample.java	                        (rev 0)
+++ trunk/examples/jms/client-side-load-balancing/src/org/jboss/jms/example/ClientSideLoadBalancingExample.java	2009-04-14 17:56:30 UTC (rev 6425)
@@ -0,0 +1,187 @@
+/*
+   * JBoss, Home of Professional Open Source
+   * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
+   * by the @authors tag. See the copyright.txt in the distribution for a
+   * full listing of individual contributors.
+   *
+   * This is free software; you can redistribute it and/or modify it
+   * under the terms of the GNU Lesser General Public License as
+   * published by the Free Software Foundation; either version 2.1 of
+   * the License, or (at your option) any later version.
+   *
+   * This software is distributed in the hope that it will be useful,
+   * but WITHOUT ANY WARRANTY; without even the implied warranty of
+   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   * Lesser General Public License for more details.
+   *
+   * You should have received a copy of the GNU Lesser General Public
+   * License along with this software; if not, write to the Free
+   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+   */
+package org.jboss.jms.example;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+
+/**
+ * This example demonstrates how subsequent connections created from a single connection factory can be load
+ * balanced across the different nodes of the cluster.
+ * 
+ * In this example there are three nodes and we use a round-robin client side load-balancing
+ * policy.
+ * 
+ * Note that the three nodes are deliberately not connected as a cluster so we don't have any server-side
+ * load balancing going on.
+ *
+ * @author <a href="tim.fox at jboss.com>Tim Fox</a>
+ */
+public class ClientSideLoadBalancingExample extends JMSExample
+{
+   public static void main(String[] args)
+   {
+      new ClientSideLoadBalancingExample().run(args);
+   }
+
+   public boolean runExample() throws Exception
+   {
+      InitialContext initialContext = null;
+      
+      Connection connectionA = null;
+      
+      Connection connectionB = null;
+      
+      Connection connectionC = null;
+
+      try
+      {
+         // Step 1. Get an initial context for looking up JNDI from server 0
+         initialContext = getContext(0);
+
+         // Step 2. Look-up the JMS Queue object from JNDI
+         Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+
+         // Step 3. Look-up a JMS Connection Factory object from JNDI on server 0
+         ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+         
+         // Wait a little while to make sure broadcasts from all nodes have reached the client
+         Thread.sleep(2000);
+
+         // Step 4. We create three connections, since we are using round-robin load-balancing this should
+         // result in each connection being connected to a different node of the cluster
+         
+         connectionA = connectionFactory.createConnection();
+         
+         connectionB = connectionFactory.createConnection();
+         
+         connectionC = connectionFactory.createConnection();
+         
+         // Step 8. We create a JMS Session on each of those connections
+         Session sessionA = connectionA.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         
+         Session sessionB = connectionB.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         
+         Session sessionC = connectionC.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+         // Step 10. We start the connections to ensure delivery occurs on them
+         connectionA.start();
+
+         connectionB.start();
+         
+         connectionC.start();
+
+         // Step 11. We create JMS MessageConsumer objects on the sessions
+         MessageConsumer consumerA = sessionA.createConsumer(queue);
+         
+         MessageConsumer consumerB = sessionB.createConsumer(queue);
+         
+         MessageConsumer consumerC = sessionC.createConsumer(queue);
+
+
+         Thread.sleep(1000);
+
+         // Step 12. We create JMS MessageProducer objects on the sessions
+         MessageProducer producerA = sessionA.createProducer(queue);
+         
+         MessageProducer producerB = sessionB.createProducer(queue);
+         
+         MessageProducer producerC = sessionC.createProducer(queue);
+
+         // Step 13. We send some messages on each producer
+
+         final int numMessages = 10;
+
+         for (int i = 0; i < numMessages; i++)
+         {
+            TextMessage messageA = sessionA.createTextMessage("A:This is text message " + i);
+
+            producerA.send(messageA);
+
+            System.out.println("Sent message: " + messageA.getText());
+            
+            TextMessage messageB = sessionB.createTextMessage("B:This is text message " + i);
+
+            producerB.send(messageB);
+
+            System.out.println("Sent message: " + messageB.getText());
+            
+            TextMessage messageC = sessionC.createTextMessage("C:This is text message " + i);
+
+            producerC.send(messageC);
+
+            System.out.println("Sent message: " + messageC.getText());            
+         }
+         
+         // Step 14. We now consume the messages from each node. The connections must be on different nodes
+         // since if they shared nodes then the consumers would receive the messages sent from different connections.
+
+         for (int i = 0; i < numMessages; i ++)
+         {
+            TextMessage messageA = (TextMessage)consumerA.receive(5000);
+
+            System.out.println("Got message: " + messageA.getText() + " from node A");
+            
+            TextMessage messageB = (TextMessage)consumerB.receive(5000);
+
+            System.out.println("Got message: " + messageB.getText() + " from node B");
+            
+            TextMessage messageC = (TextMessage)consumerC.receive(5000);
+
+            System.out.println("Got message: " + messageC.getText() + " from node C");
+         }
+         
+         return true;
+      }
+      finally
+      {
+         // Step 15. Be sure to close our resources!
+
+         if (connectionA != null)
+         {
+            connectionA.close();
+         }
+         
+         if (connectionB != null)
+         {
+            connectionB.close();
+         }
+         
+         if (connectionC != null)
+         {
+            connectionC.close();
+         }
+        
+         if (initialContext != null)
+         {
+            initialContext.close();
+         }
+      }
+   }
+
+}

Modified: trunk/examples/jms/durable-subscription/build.xml
===================================================================
--- trunk/examples/jms/durable-subscription/build.xml	2009-04-14 16:32:37 UTC (rev 6424)
+++ trunk/examples/jms/durable-subscription/build.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -28,7 +28,7 @@
 <!-- =========================================================================================== -->
 
 
-<project default="run" name="JBoss Messaging JMS Durable Subscriber Example">
+<project default="run" name="JBoss Messaging JMS Durable Subscription Example">
 
    <import file="../common/build.xml"/>
 

Modified: trunk/examples/jms/http-transport/build.xml
===================================================================
--- trunk/examples/jms/http-transport/build.xml	2009-04-14 16:32:37 UTC (rev 6424)
+++ trunk/examples/jms/http-transport/build.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -28,7 +28,7 @@
 <!-- =========================================================================================== -->
 
 
-<project default="run" name="JBoss Messaging JMS Queue Example">
+<project default="run" name="JBoss Messaging JMS HTTP Transport Example">
 
    <import file="../common/build.xml"/>
 

Modified: trunk/examples/jms/large-message/build.xml
===================================================================
--- trunk/examples/jms/large-message/build.xml	2009-04-14 16:32:37 UTC (rev 6424)
+++ trunk/examples/jms/large-message/build.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -28,7 +28,7 @@
 <!-- =========================================================================================== -->
 
 
-<project default="run" name="JBoss Messaging JMS Queue Example">
+<project default="run" name="JBoss Messaging Large Message Example">
 
    <import file="../common/build.xml"/>
 

Modified: trunk/examples/jms/paging/build.xml
===================================================================
--- trunk/examples/jms/paging/build.xml	2009-04-14 16:32:37 UTC (rev 6424)
+++ trunk/examples/jms/paging/build.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -28,7 +28,7 @@
 <!-- =========================================================================================== -->
 
 
-<project default="run" name="JBoss Messaging paging Example">
+<project default="run" name="JBoss Messaging Paging Example">
 
    <import file="../common/build.xml"/>
 

Modified: trunk/examples/jms/queue-message-redistribution/build.xml
===================================================================
--- trunk/examples/jms/queue-message-redistribution/build.xml	2009-04-14 16:32:37 UTC (rev 6424)
+++ trunk/examples/jms/queue-message-redistribution/build.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -28,7 +28,7 @@
 <!-- =========================================================================================== -->
 
 
-<project default="run" name="JBoss Messaging JMS Clustered Queue Example">
+<project default="run" name="JBoss Messaging JMS Queue Message Redistribution Example">
 
    <import file="../common/build.xml"/>
 

Modified: trunk/examples/jms/topic-selector-example2/build.xml
===================================================================
--- trunk/examples/jms/topic-selector-example2/build.xml	2009-04-14 16:32:37 UTC (rev 6424)
+++ trunk/examples/jms/topic-selector-example2/build.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -28,7 +28,7 @@
 <!-- =========================================================================================== -->
 
 
-<project default="run" name="JBoss Messaging JMS Selector Example 2">
+<project default="run" name="JBoss Messaging JMS Topic Selector Example 2">
 
    <import file="../common/build.xml"/>
 

Modified: trunk/examples/jms/transactional/build.xml
===================================================================
--- trunk/examples/jms/transactional/build.xml	2009-04-14 16:32:37 UTC (rev 6424)
+++ trunk/examples/jms/transactional/build.xml	2009-04-14 17:56:30 UTC (rev 6425)
@@ -28,7 +28,7 @@
 <!-- =========================================================================================== -->
 
 
-<project default="run" name="JBoss Messaging Transactional Example">
+<project default="run" name="JBoss Messaging JMS Transactional Example">
 
    <import file="../common/build.xml"/>
 

Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java	2009-04-14 16:32:37 UTC (rev 6424)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java	2009-04-14 17:56:30 UTC (rev 6425)
@@ -230,7 +230,7 @@
                                    final double retryIntervalMultiplier,
                                    final int reconnectAttempts,
                                    final boolean failoverOnServerShutdown) throws MessagingException
-   {
+   {            
       try
       {
          InetAddress groupAddress = InetAddress.getByName(discoveryGroupAddress);
@@ -792,7 +792,6 @@
 
       Iterator<Map.Entry<Pair<TransportConfiguration, TransportConfiguration>, ConnectionManager>> iter = connectionManagerMap.entrySet()
                                                                                                                               .iterator();
-
       while (iter.hasNext())
       {
          Map.Entry<Pair<TransportConfiguration, TransportConfiguration>, ConnectionManager> entry = iter.next();
@@ -810,7 +809,7 @@
          if (!connectionManagerMap.containsKey(connectorPair))
          {
             // Create a new ConnectionManager
-
+            
             ConnectionManager connectionManager = new ConnectionManagerImpl(connectorPair.a,
                                                                             connectorPair.b,
                                                                             failoverOnServerShutdown,
@@ -822,7 +821,7 @@
                                                                             retryIntervalMultiplier,
                                                                             reconnectAttempts);
 
-            connectionManagerMap.put(connectorPair, connectionManager);
+            connectionManagerMap.put(connectorPair, connectionManager);                       
          }
       }
 




More information about the jboss-cvs-commits mailing list