[hornetq-commits] JBoss hornetq SVN: r12283 - trunk/hornetq-core/src/main/java/org/hornetq/api/core/client.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Mar 9 17:39:17 EST 2012


Author: clebert.suconic
Date: 2012-03-09 17:39:17 -0500 (Fri, 09 Mar 2012)
New Revision: 12283

Modified:
   trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/HornetQClient.java
Log:
JBPAPP-8366 & JBPAPP-8377 - fixing leaks and duplicated resources 

Modified: trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/HornetQClient.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/HornetQClient.java	2012-03-09 21:11:33 UTC (rev 12282)
+++ trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/HornetQClient.java	2012-03-09 22:39:17 UTC (rev 12283)
@@ -115,6 +115,19 @@
    }
 
    /**
+    * Create a ServerLocator which creates session factories using a static list of transportConfigurations, the ServerLocator is not updated automatically
+    * as the cluster topology changes, and no HA backup information is propagated to the client
+    * 
+    * @param ha The Locator will support topology updates and ha (this required the server to be clustered, otherwise the first connection will timeout)
+    * @param transportConfigurations
+    * @return the ServerLocator
+    */
+   public static ServerLocator createServerLocator(final boolean ha, TransportConfiguration... transportConfigurations)
+   {
+      return new ServerLocatorImpl(ha, transportConfigurations);
+   }
+   
+   /**
     * Create a ServerLocator which creates session factories from a set of live servers, no HA backup information is propagated to the client
     *
     * The UDP address and port are used to listen for live servers in the cluster
@@ -128,7 +141,23 @@
       return new ServerLocatorImpl(false, groupConfiguration);
    }
 
+   
    /**
+    * Create a ServerLocator which creates session factories from a set of live servers, no HA backup information is propagated to the client
+    *
+    * The UDP address and port are used to listen for live servers in the cluster
+    *
+    * @param ha The Locator will support topology updates and ha (this required the server to be clustered, otherwise the first connection will timeout)
+    * @param discoveryAddress The UDP group address to listen for updates
+    * @param discoveryPort the UDP port to listen for updates
+    * @return the ServerLocator
+    */
+   public static ServerLocator createServerLocator(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration)
+   {
+      return new ServerLocatorImpl(ha, groupConfiguration);
+   }
+
+   /**
     * Create a ServerLocator which will receive cluster topology updates from the cluster as servers
     * leave or join and new backups are appointed or removed.
     * <p>



More information about the hornetq-commits mailing list