[jboss-cvs] JBoss Messaging SVN: r1646 - in branches/Branch_Client_Failover_Experiment: src/etc/server/default/deploy src/main/org/jboss/jms/client/delegate src/main/org/jboss/jms/server src/main/org/jboss/jms/server/connectionfactory src/main/org/jboss/jms/server/ha src/main/org/jboss/messaging/core/plugin src/main/org/jboss/messaging/core/plugin/postoffice/cluster tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster tests/src/org/jboss/test/messaging/jms

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 28 00:19:18 EST 2006


Author: clebert.suconic at jboss.com
Date: 2006-11-28 00:19:09 -0500 (Tue, 28 Nov 2006)
New Revision: 1646

Modified:
   branches/Branch_Client_Failover_Experiment/src/etc/server/default/deploy/connection-factories-service.xml
   branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java
   branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ConnectionFactoryManager.java
   branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java
   branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
   branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ha/ClusteredConnectionFactory.java
   branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/ClusteredPostOfficeService.java
   branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java
   branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/NodeAddressInfo.java
   branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeTest.java
   branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeWithDefaultRouterTest.java
   branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultRouterTest.java
   branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RecoveryTest.java
   branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RedistributionWithDefaultMessagePullPolicyTest.java
   branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/jms/AcknowledgementTest.java
Log:
Using MBean name instead of clientID

Modified: branches/Branch_Client_Failover_Experiment/src/etc/server/default/deploy/connection-factories-service.xml
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/etc/server/default/deploy/connection-factories-service.xml	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/src/etc/server/default/deploy/connection-factories-service.xml	2006-11-28 05:19:09 UTC (rev 1646)
@@ -14,11 +14,6 @@
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=socket</depends>
 
-      <constructor>
-         <!-- ClientId for the ConnectionFactory -->
-         <arg type="java.lang.String" value="SocketFactory"/>
-      </constructor>
-
       <attribute name="JNDIBindings">
          <bindings>
             <binding>/ConnectionFactory</binding>

Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -68,7 +68,9 @@
    protected Version serverVersion;
    protected int serverID;
    protected boolean clientPing;
-   protected String clientID;
+   
+   /** This is the serverSide objectID used on JMSInvoker */
+   protected String strObjectID;
 
    private boolean trace;
 
@@ -76,13 +78,13 @@
 
    // Constructors --------------------------------------------------
 
-   public ClientConnectionFactoryDelegate(int objectID, String clientID, String serverLocatorURI,
+   public ClientConnectionFactoryDelegate(int objectID, String strObjectID, String serverLocatorURI,
                                           Version serverVersion, int serverID,
                                           boolean clientPing)
    {
       super(objectID);
 
-      this.clientID = clientID;
+      this.strObjectID = strObjectID;
       this.serverLocatorURI = serverLocatorURI;
       this.serverVersion = serverVersion;
       this.serverID = serverID;
@@ -137,11 +139,9 @@
 
       md.addMetaData(Dispatcher.DISPATCHER,
                      Dispatcher.OID,
-                     clientID,
+                     strObjectID,
                      PayloadKey.AS_IS);
 
-      md.addMetaData("JMSConnectionFactory", "ClientID", this.clientID, PayloadKey.AS_IS);
-
       /*
        * If the method being invoked is createConnectionDelegate then we must invoke it on the same
        * remoting client subsequently used by the connection.
@@ -257,11 +257,6 @@
       return serverID;
    }
 
-   public String getClientID()
-   {
-      return clientID;
-   }
-
    public Version getVersionToUse()
    {
       Version clientVersion = Version.instance();
@@ -287,7 +282,7 @@
 
    public String toString()
    {
-      return "ConnectionFactoryDelegate[clientID" + clientID + "]";
+      return "ConnectionFactoryDelegate[strObjectID=" + strObjectID + "]";
    }
 
    // Protected -----------------------------------------------------

Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ConnectionFactoryManager.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ConnectionFactoryManager.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ConnectionFactoryManager.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -39,7 +39,7 @@
     *                     AOP subsystem, but not bound in JNDI.
     * @return an identifier that uniques identifies the registered ConnectionFactory.
     */
-   int registerConnectionFactory(String clientID, JNDIBindings jndiBindings,
+   int registerConnectionFactory(String clientID, String serverObjectID, JNDIBindings jndiBindings,
                                  String locatorURI, boolean clientPing,
                                  int prefetchSize,
                                  int defaultTempQueueFullSize,

Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactory.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -54,12 +54,10 @@
 
    // Constructors --------------------------------------------------
 
-   /**
-    * Since 1.2 ConnectionFactories need a clientID
    public ConnectionFactory()
    {
       this(null);
-   } */
+   }
 
    public ConnectionFactory(String clientID)
    {
@@ -109,7 +107,7 @@
          }
          
          connectionFactoryID = connectionFactoryManager.
-            registerConnectionFactory(clientID, jndiBindings, locatorURI, enablePing, prefetchSize,
+            registerConnectionFactory(clientID, this.getName(), jndiBindings, locatorURI, enablePing, prefetchSize,
                      defaultTempQueueFullSize, defaultTempQueuePageSize, defaultTempQueueDownCacheSize);
       
          InvokerLocator locator = new InvokerLocator(locatorURI);

Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -77,7 +77,8 @@
 
    // ConnectionFactoryManager implementation -----------------------
 
-   public synchronized void registerClusteredConnectionFactory(ClusteredPostOffice postOffice,
+   public synchronized void registerClusteredConnectionFactory(
+                                                     ClusteredPostOffice postOffice,
                                                      JNDIBindings jndiBindings) throws Exception
    {
 
@@ -116,6 +117,7 @@
 
 
    public synchronized int registerConnectionFactory(String clientID,
+                                                     String serverObjectID,
                                                      JNDIBindings jndiBindings,
                                                      String locatorURI,
                                                      boolean clientPing,
@@ -133,14 +135,14 @@
                                              defaultTempQueueDownCacheSize);
 
       ClientConnectionFactoryDelegate delegate =
-         new ClientConnectionFactoryDelegate(-1, clientID, locatorURI, serverPeer.getVersion(),
+         new ClientConnectionFactoryDelegate(-1, serverObjectID, locatorURI, serverPeer.getVersion(),
                                              serverPeer.getServerPeerID(), clientPing);
 
       ConnectionFactoryAdvised connFactoryAdvised = new ConnectionFactoryAdvised(endpoint);
 
-      JMSDispatcher.instance.registerTarget(clientID, connFactoryAdvised);
+      JMSDispatcher.instance.registerTarget(serverObjectID, connFactoryAdvised);
 
-      endpoints.put(clientID, endpoint);
+      endpoints.put(serverObjectID, endpoint);
 
       JBossConnectionFactory cf = new JBossConnectionFactory(delegate);
 
@@ -154,15 +156,15 @@
          }
       }
 
-      factories.put(clientID, cf);
+      factories.put(serverObjectID, cf);
 
       return id;
    }
 
-   public synchronized void unregisterConnectionFactory(String clientID) throws Exception
+   public synchronized void unregisterConnectionFactory(String serverObjectID) throws Exception
    {
       ServerConnectionFactoryEndpoint endpoint =
-         (ServerConnectionFactoryEndpoint)endpoints.get(clientID);
+         (ServerConnectionFactoryEndpoint)endpoints.get(serverObjectID);
 
       JNDIBindings jndiBindings = endpoint.getJNDIBindings();
       if (jndiBindings != null)
@@ -176,10 +178,10 @@
          }
       }
 
-      JMSDispatcher.instance.unregisterTarget(clientID);
+      JMSDispatcher.instance.unregisterTarget(serverObjectID);
 
-      endpoints.remove(clientID);
-      factories.remove(clientID);
+      endpoints.remove(serverObjectID);
+      factories.remove(serverObjectID);
    }
 
    public synchronized javax.jms.ConnectionFactory getConnectionFactory(int connectionFactoryID)
@@ -228,7 +230,8 @@
 
       for (int i = 0; i < addresses.length; i++)
       {
-         ConnectionFactoryDelegate delegateArray[] = addresses[i].getConnectionFactoryDelegates();
+         //ConnectionFactoryDelegate delegateArray[] = addresses[i].getConnectionFactoryDelegates();
+         ConnectionFactoryDelegate delegateArray[] = null;
 
          for (int j = 0; j < delegateArray.length; j++)
          {

Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ha/ClusteredConnectionFactory.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ha/ClusteredConnectionFactory.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/jms/server/ha/ClusteredConnectionFactory.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -43,6 +43,8 @@
 
    protected ObjectName clusteredPostOffice;
 
+   protected String connectionFactoryID;
+
    protected JNDIBindings jndiBindings;
 
    boolean started = false;
@@ -57,6 +59,16 @@
       super(clientID);
    }
 
+   public String getConnectionFactoryID()
+   {
+      return connectionFactoryID;
+   }
+
+   public void setConnectionFactoryID(String connectionFactoryID)
+   {
+      this.connectionFactoryID = connectionFactoryID;
+   }
+
    public void setJNDIBindings(Element e) throws Exception
    {
       jndiBindings = new JNDIBindings(e);

Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/ClusteredPostOfficeService.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/ClusteredPostOfficeService.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/ClusteredPostOfficeService.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -24,7 +24,6 @@
 import javax.management.ObjectName;
 import javax.transaction.TransactionManager;
 import org.jboss.jms.client.JBossConnectionFactory;
-import org.jboss.jms.delegate.ConnectionFactoryDelegate;
 import org.jboss.jms.selector.SelectorFactory;
 import org.jboss.jms.server.QueuedExecutorPool;
 import org.jboss.jms.server.ServerPeer;
@@ -230,11 +229,6 @@
 
          // Getting connectionDelegates information
          JBossConnectionFactory[] factories = (JBossConnectionFactory[]) serverPeer.getConnectionFactoryManager().getAllConnectionFactories();
-         ConnectionFactoryDelegate[] delegates = new ConnectionFactoryDelegate[factories.length];
-         for (int i=0;i<delegates.length;i++)
-         {
-            delegates[i] = factories[i].getDelegate();
-         }
 
          MessageStore ms = serverPeer.getMessageStore();
          
@@ -257,7 +251,7 @@
          FilterFactory ff = new SelectorFactory();
 
          postOffice =  new DefaultClusteredPostOffice(ds, tm, sqlProperties, createTablesOnStartup,
-                                               nodeId, delegates, officeName, ms,
+                                               nodeId, officeName, ms,
                                                pm, tr, ff, pool, 
                                                groupName,
                                                syncChannelConfig, asyncChannelConfig,

Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOffice.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -22,16 +22,30 @@
 package org.jboss.messaging.core.plugin.postoffice.cluster;
 
 import EDU.oswego.cs.dl.util.concurrent.QueuedExecutor;
-import java.io.*;
-import java.util.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
 import javax.sql.DataSource;
 import javax.transaction.TransactionManager;
-import org.jboss.jms.delegate.ConnectionFactoryDelegate;
 import org.jboss.jms.server.ConnectionFactoryManager;
 import org.jboss.jms.server.QueuedExecutorPool;
 import org.jboss.jms.server.connectionfactory.JNDIBindings;
 import org.jboss.logging.Logger;
-import org.jboss.messaging.core.*;
+import org.jboss.messaging.core.Delivery;
+import org.jboss.messaging.core.Filter;
+import org.jboss.messaging.core.FilterFactory;
+import org.jboss.messaging.core.MessageReference;
 import org.jboss.messaging.core.Queue;
 import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
 import org.jboss.messaging.core.plugin.contract.MessageStore;
@@ -42,10 +56,14 @@
 import org.jboss.messaging.core.tx.Transaction;
 import org.jboss.messaging.core.tx.TransactionRepository;
 import org.jboss.messaging.util.StreamUtils;
-import org.jgroups.*;
+import org.jgroups.Address;
 import org.jgroups.Channel;
+import org.jgroups.JChannel;
+import org.jgroups.MembershipListener;
 import org.jgroups.Message;
+import org.jgroups.MessageListener;
 import org.jgroups.Receiver;
+import org.jgroups.View;
 import org.jgroups.blocks.GroupRequest;
 import org.jgroups.blocks.MessageDispatcher;
 import org.jgroups.blocks.RequestHandler;
@@ -127,9 +145,6 @@
 
    private StatsSender statsSender;
 
-   /** Used for failover mapping */
-   private ConnectionFactoryDelegate[] connectionFactoryDelegates;
-   
    private boolean started;
       
    public DefaultClusteredPostOffice()
@@ -149,7 +164,7 @@
     */
    public DefaultClusteredPostOffice(DataSource ds, TransactionManager tm, Properties sqlProperties,
             boolean createTablesOnStartup,
-            int nodeId, ConnectionFactoryDelegate[] connectionFactoryDelegates, String officeName, MessageStore ms,
+            int nodeId, String officeName, MessageStore ms,
             PersistenceManager pm,
             TransactionRepository tr,
             FilterFactory filterFactory,
@@ -162,7 +177,7 @@
             ClusterRouterFactory rf,
             long statsSendPeriod) throws Exception
    {            
-      this(ds, tm, sqlProperties, createTablesOnStartup, nodeId, connectionFactoryDelegates, officeName, ms,
+      this(ds, tm, sqlProperties, createTablesOnStartup, nodeId, officeName, ms,
            pm, tr, filterFactory, pool, groupName, stateTimeout, castTimeout, redistributionPolicy,
            rf, statsSendPeriod);
       
@@ -175,7 +190,7 @@
     */
    public DefaultClusteredPostOffice(DataSource ds, TransactionManager tm, Properties sqlProperties,
                               boolean createTablesOnStartup,
-                              int nodeId, ConnectionFactoryDelegate[] connectionFactoryDelegates, String officeName, MessageStore ms,
+                              int nodeId, String officeName, MessageStore ms,
                               PersistenceManager pm,
                               TransactionRepository tr,
                               FilterFactory filterFactory,
@@ -188,7 +203,7 @@
                               ClusterRouterFactory rf,
                               long statsSendPeriod) throws Exception
    {            
-      this(ds, tm, sqlProperties, createTablesOnStartup, nodeId, connectionFactoryDelegates, officeName, ms,
+      this(ds, tm, sqlProperties, createTablesOnStartup, nodeId, officeName, ms,
            pm, tr, filterFactory, pool, groupName, stateTimeout, castTimeout, redistributionPolicy,
            rf, statsSendPeriod);
 
@@ -198,7 +213,7 @@
    
    private DefaultClusteredPostOffice(DataSource ds, TransactionManager tm, Properties sqlProperties,
                                boolean createTablesOnStartup,
-                               int nodeId, ConnectionFactoryDelegate[] connectionFactoryDelegates, String officeName, MessageStore ms,
+                               int nodeId, String officeName, MessageStore ms,
                                PersistenceManager pm,                               
                                TransactionRepository tr,
                                FilterFactory filterFactory,
@@ -212,8 +227,6 @@
       super (ds, tm, sqlProperties, createTablesOnStartup, nodeId, officeName, ms, pm, tr, filterFactory,
              pool);
                    
-      this.connectionFactoryDelegates = connectionFactoryDelegates;
-
       this.pm = pm;
       
       this.groupName = groupName;
@@ -283,7 +296,7 @@
       
       Address asyncAddress = asyncChannel.getLocalAddress();
 
-      NodeAddressInfo info = new NodeAddressInfo(nodeId, syncAddress, asyncAddress, connectionFactoryDelegates);
+      NodeAddressInfo info = new NodeAddressInfo(nodeId, syncAddress, asyncAddress);
       
       handleAddressNodeMapping(info, nodeId);
       

Modified: branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/NodeAddressInfo.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/NodeAddressInfo.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/NodeAddressInfo.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -21,9 +21,12 @@
  */
 package org.jboss.messaging.core.plugin.postoffice.cluster;
 
-import java.io.*;
-import org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate;
-import org.jboss.jms.delegate.ConnectionFactoryDelegate;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
 import org.jboss.messaging.util.Streamable;
 import org.jgroups.Address;
 import org.jgroups.stack.IpAddress;
@@ -45,21 +48,17 @@
 
    private int nodeId;
 
-   private ConnectionFactoryDelegate[] connectionFactoryDelegates;
-
    public NodeAddressInfo()
    {     
    }
    
-   NodeAddressInfo(int nodeId, Address syncChannelAddress, Address asyncChannelAddress, ConnectionFactoryDelegate[] connectionFactoryDelegates)
+   NodeAddressInfo(int nodeId, Address syncChannelAddress, Address asyncChannelAddress)
    {
       this.nodeId = nodeId;
 
       this.syncChannelAddress = syncChannelAddress;
       
       this.asyncChannelAddress = asyncChannelAddress;
-
-      this.connectionFactoryDelegates = connectionFactoryDelegates;
    }
 
 
@@ -79,10 +78,6 @@
    }
 
 
-   public ConnectionFactoryDelegate[] getConnectionFactoryDelegates() {
-      return connectionFactoryDelegates;
-   }
-
    public void read(DataInputStream in) throws Exception
    {
       nodeId = in.readInt();
@@ -98,8 +93,6 @@
       byte[] byteInput = new byte[in.readInt()];
 
       in.read(byteInput);
-
-      this.connectionFactoryDelegates = (ConnectionFactoryDelegate[])readRequest(byteInput);
    }
 
    public void write(DataOutputStream out) throws Exception
@@ -120,11 +113,6 @@
       
       asyncChannelAddress.writeTo(out);
 
-      byte[] byteOut = writeRequest(connectionFactoryDelegates);
-
-      out.writeInt(byteOut.length);
-
-      out.write(byteOut);
    }
 
 
@@ -157,14 +145,6 @@
       buffer.append("nodeId=" + nodeId + ", syncChannelAddress=" + syncChannelAddress +
            ", asyncChannelAddress=" + asyncChannelAddress +", ");
 
-      if (connectionFactoryDelegates!=null)
-      {
-         for (int i=0;i<connectionFactoryDelegates.length;i++)
-         {
-            buffer.append("delegate["+ i + "]=" + ((ClientConnectionFactoryDelegate)connectionFactoryDelegates[i]).getServerLocatorURI());
-         }
-      }
-
       return buffer.toString();
    }
 

Modified: branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeTest.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeTest.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeTest.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -31,7 +31,12 @@
 import org.jboss.messaging.core.local.PagingFilteredQueue;
 import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
 import org.jboss.messaging.core.plugin.postoffice.Binding;
-import org.jboss.messaging.core.plugin.postoffice.cluster.*;
+import org.jboss.messaging.core.plugin.postoffice.cluster.ClusterRouterFactory;
+import org.jboss.messaging.core.plugin.postoffice.cluster.DefaultClusteredPostOffice;
+import org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouterFactory;
+import org.jboss.messaging.core.plugin.postoffice.cluster.LocalClusteredQueue;
+import org.jboss.messaging.core.plugin.postoffice.cluster.MessagePullPolicy;
+import org.jboss.messaging.core.plugin.postoffice.cluster.NullMessagePullPolicy;
 import org.jboss.messaging.core.tx.Transaction;
 import org.jboss.test.messaging.core.SimpleFilter;
 import org.jboss.test.messaging.core.SimpleFilterFactory;
@@ -2237,7 +2242,7 @@
       
       DefaultClusteredPostOffice postOffice = 
          new DefaultClusteredPostOffice(sc.getDataSource(), sc.getTransactionManager(),
-                                 sc.getClusteredPostOfficeSQLProperties(), true, nodeId, null, "Clustered", ms, pm, tr, ff, pool,
+                                 sc.getClusteredPostOfficeSQLProperties(), true, nodeId, "Clustered", ms, pm, tr, ff, pool,
                                  groupName,
                                  JGroupsUtil.getControlStackProperties(),
                                  JGroupsUtil.getDataStackProperties(),

Modified: branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeWithDefaultRouterTest.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeWithDefaultRouterTest.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeWithDefaultRouterTest.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -26,7 +26,12 @@
 import org.jboss.messaging.core.FilterFactory;
 import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
 import org.jboss.messaging.core.plugin.postoffice.Binding;
-import org.jboss.messaging.core.plugin.postoffice.cluster.*;
+import org.jboss.messaging.core.plugin.postoffice.cluster.ClusterRouterFactory;
+import org.jboss.messaging.core.plugin.postoffice.cluster.DefaultClusteredPostOffice;
+import org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouterFactory;
+import org.jboss.messaging.core.plugin.postoffice.cluster.LocalClusteredQueue;
+import org.jboss.messaging.core.plugin.postoffice.cluster.MessagePullPolicy;
+import org.jboss.messaging.core.plugin.postoffice.cluster.NullMessagePullPolicy;
 import org.jboss.test.messaging.core.SimpleFilterFactory;
 import org.jboss.test.messaging.core.SimpleReceiver;
 import org.jboss.test.messaging.core.plugin.base.PostOfficeTestBase;
@@ -373,7 +378,7 @@
       
       DefaultClusteredPostOffice postOffice = 
          new DefaultClusteredPostOffice(sc.getDataSource(), sc.getTransactionManager(),
-                                 sc.getClusteredPostOfficeSQLProperties(), true, nodeId, null, "Clustered", ms, pm, tr, ff, pool,
+                                 sc.getClusteredPostOfficeSQLProperties(), true, nodeId, "Clustered", ms, pm, tr, ff, pool,
                                  groupName,
                                  JGroupsUtil.getControlStackProperties(),
                                  JGroupsUtil.getDataStackProperties(),

Modified: branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultRouterTest.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultRouterTest.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultRouterTest.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -24,9 +24,25 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
-import org.jboss.messaging.core.*;
+import org.jboss.messaging.core.Delivery;
+import org.jboss.messaging.core.DeliveryObserver;
+import org.jboss.messaging.core.Filter;
+import org.jboss.messaging.core.FilterFactory;
+import org.jboss.messaging.core.Message;
+import org.jboss.messaging.core.MessageReference;
+import org.jboss.messaging.core.Queue;
+import org.jboss.messaging.core.Receiver;
+import org.jboss.messaging.core.SimpleDelivery;
 import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
-import org.jboss.messaging.core.plugin.postoffice.cluster.*;
+import org.jboss.messaging.core.plugin.postoffice.cluster.ClusterRouter;
+import org.jboss.messaging.core.plugin.postoffice.cluster.ClusterRouterFactory;
+import org.jboss.messaging.core.plugin.postoffice.cluster.ClusteredQueue;
+import org.jboss.messaging.core.plugin.postoffice.cluster.DefaultClusteredPostOffice;
+import org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouter;
+import org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouterFactory;
+import org.jboss.messaging.core.plugin.postoffice.cluster.MessagePullPolicy;
+import org.jboss.messaging.core.plugin.postoffice.cluster.NullMessagePullPolicy;
+import org.jboss.messaging.core.plugin.postoffice.cluster.QueueStats;
 import org.jboss.messaging.core.tx.Transaction;
 import org.jboss.test.messaging.core.SimpleFilterFactory;
 import org.jboss.test.messaging.core.SimpleReceiver;
@@ -338,7 +354,7 @@
       
       DefaultClusteredPostOffice postOffice = 
          new DefaultClusteredPostOffice(sc.getDataSource(), sc.getTransactionManager(),
-                                 sc.getClusteredPostOfficeSQLProperties(), true, nodeId, null, "Clustered", ms, pm, tr, ff, pool,
+                                 sc.getClusteredPostOfficeSQLProperties(), true, nodeId, "Clustered", ms, pm, tr, ff, pool,
                                  groupName,
                                  JGroupsUtil.getControlStackProperties(),
                                  JGroupsUtil.getDataStackProperties(),

Modified: branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RecoveryTest.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RecoveryTest.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RecoveryTest.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -28,7 +28,12 @@
 import org.jboss.messaging.core.MessageReference;
 import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
 import org.jboss.messaging.core.plugin.postoffice.Binding;
-import org.jboss.messaging.core.plugin.postoffice.cluster.*;
+import org.jboss.messaging.core.plugin.postoffice.cluster.ClusterRouterFactory;
+import org.jboss.messaging.core.plugin.postoffice.cluster.DefaultClusteredPostOffice;
+import org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouterFactory;
+import org.jboss.messaging.core.plugin.postoffice.cluster.LocalClusteredQueue;
+import org.jboss.messaging.core.plugin.postoffice.cluster.MessagePullPolicy;
+import org.jboss.messaging.core.plugin.postoffice.cluster.NullMessagePullPolicy;
 import org.jboss.messaging.core.tx.Transaction;
 import org.jboss.messaging.core.tx.TransactionException;
 import org.jboss.test.messaging.core.SimpleFilterFactory;
@@ -350,7 +355,7 @@
       
       DefaultClusteredPostOffice postOffice = 
          new DefaultClusteredPostOffice(sc.getDataSource(), sc.getTransactionManager(),
-                                 sc.getClusteredPostOfficeSQLProperties(), true, nodeId, null, "Clustered", ms, pm, tr, ff, pool,
+                                 sc.getClusteredPostOfficeSQLProperties(), true, nodeId, "Clustered", ms, pm, tr, ff, pool,
                                  groupName,
                                  JGroupsUtil.getControlStackProperties(),
                                  JGroupsUtil.getDataStackProperties(),

Modified: branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RedistributionWithDefaultMessagePullPolicyTest.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RedistributionWithDefaultMessagePullPolicyTest.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/RedistributionWithDefaultMessagePullPolicyTest.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -26,10 +26,22 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
-import org.jboss.messaging.core.*;
+import org.jboss.messaging.core.Channel;
+import org.jboss.messaging.core.Delivery;
+import org.jboss.messaging.core.DeliveryObserver;
+import org.jboss.messaging.core.FilterFactory;
+import org.jboss.messaging.core.Message;
+import org.jboss.messaging.core.MessageReference;
+import org.jboss.messaging.core.Receiver;
+import org.jboss.messaging.core.SimpleDelivery;
 import org.jboss.messaging.core.plugin.contract.ClusteredPostOffice;
 import org.jboss.messaging.core.plugin.postoffice.Binding;
-import org.jboss.messaging.core.plugin.postoffice.cluster.*;
+import org.jboss.messaging.core.plugin.postoffice.cluster.ClusterRouterFactory;
+import org.jboss.messaging.core.plugin.postoffice.cluster.DefaultClusteredPostOffice;
+import org.jboss.messaging.core.plugin.postoffice.cluster.DefaultMessagePullPolicy;
+import org.jboss.messaging.core.plugin.postoffice.cluster.DefaultRouterFactory;
+import org.jboss.messaging.core.plugin.postoffice.cluster.LocalClusteredQueue;
+import org.jboss.messaging.core.plugin.postoffice.cluster.MessagePullPolicy;
 import org.jboss.messaging.core.tx.Transaction;
 import org.jboss.test.messaging.core.SimpleFilterFactory;
 import org.jboss.test.messaging.core.SimpleReceiver;
@@ -1134,7 +1146,7 @@
       
       DefaultClusteredPostOffice postOffice = 
          new DefaultClusteredPostOffice(sc.getDataSource(), sc.getTransactionManager(),
-                                 sc.getClusteredPostOfficeSQLProperties(), true, nodeId, null, "Clustered", ms, pm, tr, ff, pool,
+                                 sc.getClusteredPostOfficeSQLProperties(), true, nodeId, "Clustered", ms, pm, tr, ff, pool,
                                  groupName,
                                  JGroupsUtil.getControlStackProperties(),
                                  JGroupsUtil.getDataStackProperties(),

Modified: branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/jms/AcknowledgementTest.java
===================================================================
--- branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/jms/AcknowledgementTest.java	2006-11-28 02:21:52 UTC (rev 1645)
+++ branches/Branch_Client_Failover_Experiment/tests/src/org/jboss/test/messaging/jms/AcknowledgementTest.java	2006-11-28 05:19:09 UTC (rev 1646)
@@ -21,6 +21,7 @@
   */
 package org.jboss.test.messaging.jms;
 
+import EDU.oswego.cs.dl.util.concurrent.Latch;
 import javax.jms.Connection;
 import javax.jms.DeliveryMode;
 import javax.jms.Destination;
@@ -37,13 +38,10 @@
 import javax.jms.TopicSubscriber;
 import javax.management.ObjectName;
 import javax.naming.InitialContext;
-
 import org.jboss.jms.client.JBossConnectionFactory;
 import org.jboss.test.messaging.MessagingTestCase;
 import org.jboss.test.messaging.tools.ServerManagement;
 
-import EDU.oswego.cs.dl.util.concurrent.Latch;
-
 /**
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
  *
@@ -113,6 +111,7 @@
       try
       {
          conn = cf.createTopicConnection();
+         System.out.println("******   ClientID = " + conn.getClientID());
          TopicSession sess = conn.createTopicSession(true, 0);
          TopicPublisher pub = sess.createPublisher(topic);
          pub.setDeliveryMode(DeliveryMode.PERSISTENT);
@@ -431,9 +430,11 @@
 	public void testIndividualClientAcknowledge() throws Exception
    {
 		
-		Connection conn = cf.createConnection();     
-		
-		Session producerSess = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+		Connection conn = cf.createConnection();
+      for (int i=0; i<20; i++) System.out.println("*******************************************");
+      System.out.println("clientID = " + conn.getClientID());
+
+      Session producerSess = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
 		MessageProducer producer = producerSess.createProducer(queue);
 		
 		Session consumerSess = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);




More information about the jboss-cvs-commits mailing list