[Jboss-cvs] JBoss Messaging SVN: r1273 - in trunk: . src/main/org/jboss/jms/server src/main/org/jboss/jms/server/destination src/main/org/jboss/jms/server/endpoint src/main/org/jboss/messaging/core src/main/org/jboss/messaging/core/local src/main/org/jboss/messaging/core/plugin src/main/org/jboss/messaging/core/plugin/contract src/main/org/jboss/messaging/core/plugin/postoffice src/main/org/jboss/messaging/core/plugin/postoffice/cluster tests/src/org/jboss/test/messaging/core/local tests/src/org/jboss/test/messaging/core/plugin tests/src/org/jboss/test/messaging/jms tests/src/org/jboss/test/messaging/jms/crash tests/src/org/jboss/test/messaging/jms/server/destination/base tests/src/org/jboss/test/messaging/tools/jmx/rmi

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Sep 10 07:54:18 EDT 2006


Author: timfox
Date: 2006-09-10 07:53:54 -0400 (Sun, 10 Sep 2006)
New Revision: 1273

Added:
   trunk/tests/src/org/jboss/test/messaging/jms/crash/CreateClientOnServerCommand.java
   trunk/tests/src/org/jboss/test/messaging/jms/crash/CreateHangingConsumerCommand.java
Removed:
   trunk/tests/src/org/jboss/test/messaging/jms/CreateClientOnServerCommand.java
   trunk/tests/src/org/jboss/test/messaging/jms/CreateHangingConsumerCommand.java
Modified:
   trunk/build-messaging.xml
   trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java
   trunk/src/main/org/jboss/jms/server/ServerPeer.java
   trunk/src/main/org/jboss/jms/server/destination/ManagedDestination.java
   trunk/src/main/org/jboss/jms/server/destination/ManagedTopic.java
   trunk/src/main/org/jboss/jms/server/destination/QueueService.java
   trunk/src/main/org/jboss/jms/server/destination/TopicService.java
   trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
   trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
   trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
   trunk/src/main/org/jboss/messaging/core/ChannelSupport.java
   trunk/src/main/org/jboss/messaging/core/PagingChannel.java
   trunk/src/main/org/jboss/messaging/core/local/Queue.java
   trunk/src/main/org/jboss/messaging/core/plugin/JDBCShutdownLoggerService.java
   trunk/src/main/org/jboss/messaging/core/plugin/contract/Binding.java
   trunk/src/main/org/jboss/messaging/core/plugin/contract/ClusteredPostOffice.java
   trunk/src/main/org/jboss/messaging/core/plugin/contract/PostOffice.java
   trunk/src/main/org/jboss/messaging/core/plugin/postoffice/BindingImpl.java
   trunk/src/main/org/jboss/messaging/core/plugin/postoffice/PostOfficeImpl.java
   trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/BindRequest.java
   trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/ClusteredPostOfficeImpl.java
   trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/PostOfficeInternal.java
   trunk/tests/src/org/jboss/test/messaging/core/local/QueueWithFilterTest.java
   trunk/tests/src/org/jboss/test/messaging/core/plugin/ClusteredPostOfficeTest.java
   trunk/tests/src/org/jboss/test/messaging/core/plugin/JDBCPersistenceManagerTest.java
   trunk/tests/src/org/jboss/test/messaging/core/plugin/SimplePostOfficeTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/DurableSubscriberTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/MessageConsumerTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/crash/CallbackFailureTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashLargeLeaseTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashNegativeLeaseTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashZeroLeaseTest.java
   trunk/tests/src/org/jboss/test/messaging/jms/server/destination/base/DestinationManagementTestBase.java
   trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java
Log:
More clustering related stuff, cleanup



Modified: trunk/build-messaging.xml
===================================================================
--- trunk/build-messaging.xml	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/build-messaging.xml	2006-09-10 11:53:54 UTC (rev 1273)
@@ -46,19 +46,19 @@
    -->
 
    <property name="messaging.version.major" value="1"/>
-   <property name="messaging.version.minor" value="0"/>
-   <property name="messaging.version.revision" value="1"/>
-   <property name="messaging.version.incrementing" value="5"/>
-   <property name="messaging.version.tag" value="CR5"/>
+   <property name="messaging.version.minor" value="2"/>
+   <property name="messaging.version.revision" value="0"/>
+   <property name="messaging.version.incrementing" value="6"/>
+   <property name="messaging.version.tag" value="Alpha"/>
    <property name="messaging.version.name" value=""/>
-   <property name="messaging.version.cvstag" value="JBossMessaging_1_0_1_CR5"/>
+   <property name="messaging.version.cvstag" value="JBossMessaging_1_2_0_Alpha"/>
    <property name="module.name" value="messaging"/>
    <property name="module.Name" value="JBoss Messaging"/>
    <property name="module.version" value="${messaging.version.major}.${messaging.version.minor}.${messaging.version.revision}.${messaging.version.tag}"/>
 
    <property name="jms.version.major" value="1"/>
-   <property name="jms.version.minor" value="1"/>
-   <property name="jms.version" value="1.1"/>
+   <property name="jms.version.minor" value="2"/>
+   <property name="jms.version" value="1.2"/>
 
    <!--
         Jar manifest version information.

Modified: trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -83,9 +83,7 @@
    // DestinationManager implementation -----------------------------
    
    public synchronized void registerDestination(ManagedDestination destination) throws Exception
-   {        
-      log.info("^^^ REGISTERING DESTINATION: " + destination.getName());
-      
+   {          
       String jndiName = destination.getJndiName();
       
       if (!destination.isTemporary())
@@ -118,8 +116,6 @@
          
          destination.setJndiName(jndiName);
          
-         log.info("JNDI NAME:" + jndiName);
-   
          try
          {
             initialContext.lookup(jndiName);
@@ -158,7 +154,6 @@
          }
          
          c.rebind(jndiNameInContext, jbDest);         
-         log.info("Bound it in jndi");
       }
             
       if (destination.isQueue())
@@ -221,9 +216,33 @@
    {
       Set destinations = new HashSet();
       
-      destinations.addAll(queueMap.values());
+      Iterator iter = queueMap.values().iterator();
+      while (iter.hasNext())
+      {
+         ManagedDestination dest = (ManagedDestination)iter.next();
+         if (dest.isTemporary())
+         {
+            destinations.add(new JBossTemporaryQueue(dest.getName()));
+         }
+         else
+         {
+            destinations.add(new JBossQueue(dest.getName()));
+         }
+      }
       
-      destinations.addAll(topicMap.values());
+      iter = topicMap.values().iterator();
+      while (iter.hasNext())
+      {
+         ManagedDestination dest = (ManagedDestination)iter.next();
+         if (dest.isTemporary())
+         {
+            destinations.add(new JBossTemporaryTopic(dest.getName()));
+         }
+         else
+         {
+            destinations.add(new JBossTopic(dest.getName()));
+         }
+      }
       
       return destinations;
    }

Modified: trunk/src/main/org/jboss/jms/server/ServerPeer.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/ServerPeer.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/jms/server/ServerPeer.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -181,8 +181,6 @@
             return;
          }
          
-         log.info("******** STARTING SERVER PEER");
-   
          log.debug(this + " starting");
          
          if (queuedExecutorPoolSize < 1)
@@ -255,8 +253,6 @@
    
          log.info("JBoss Messaging " + getVersion().getProviderVersion() + " server [" +
             getServerPeerID()+ "] started");      
-         
-         log.info("********** STARTED SERVER PEER");
       }
       catch (Throwable t)
       {
@@ -431,7 +427,6 @@
    {
       try
       {
-         log.info("&&&&&&&& setting security domain to: " + securityDomain);
          securityStore.setSecurityDomain(securityDomain);      
       }
       catch (Throwable t)
@@ -902,7 +897,6 @@
       String destType = isQueue ? "Queue" : "Topic";
       String className = "org.jboss.jms.server.destination." + destType + "Service";
       
-      log.info("class name is " + className);
       String ons ="jboss.messaging.destination:service="+ destType + ",name=" + name;
       ObjectName on = new ObjectName(ons);
 
@@ -918,8 +912,6 @@
          "    <attribute name=\"DownCacheSize\">" + downCacheSize + "</attribute>" +
          "</mbean>";
       
-      log.info(destinationMBeanConfig);
-
       return createDestinationInternal(destinationMBeanConfig, on, jndiName, true, fullSize,
                                        pageSize, downCacheSize);
    }

Modified: trunk/src/main/org/jboss/jms/server/destination/ManagedDestination.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/destination/ManagedDestination.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/jms/server/destination/ManagedDestination.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -61,7 +61,7 @@
    protected Element securityConfig;
    
    protected PostOffice postOffice;
-
+   
    public ManagedDestination()
    {      
    }

Modified: trunk/src/main/org/jboss/jms/server/destination/ManagedTopic.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/destination/ManagedTopic.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/jms/server/destination/ManagedTopic.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -29,6 +29,7 @@
 
 import org.jboss.jms.selector.Selector;
 import org.jboss.jms.util.MessageQueueNameHelper;
+import org.jboss.logging.Logger;
 import org.jboss.messaging.core.local.Queue;
 import org.jboss.messaging.core.plugin.contract.Binding;
 
@@ -45,6 +46,9 @@
  */
 public class ManagedTopic extends ManagedDestination
 {
+   private static final Logger log = Logger.getLogger(ManagedTopic.class);
+
+   
    public ManagedTopic()
    {      
    }
@@ -155,8 +159,6 @@
             sb.append(helper.getClientId());
             sb.append("\", selector=\"");
             sb.append(binding.getSelector());
-            sb.append("\", noLocal=\"");
-            sb.append(binding.isNoLocal());
             sb.append("\"\n");
          }
          else if (!durable && !binding.isDurable())
@@ -165,8 +167,6 @@
             sb.append(binding.getChannelId());
             sb.append("\", selector=\"");
             sb.append(binding.getSelector());
-            sb.append("\", noLocal=\"");
-            sb.append(binding.isNoLocal());
             sb.append("\"\n");
          }
       }

Modified: trunk/src/main/org/jboss/jms/server/destination/QueueService.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/destination/QueueService.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/jms/server/destination/QueueService.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -74,9 +74,7 @@
       super.startService();
       
       try
-      {
-         started = true;
-                                    
+      {                           
          postOffice = serverPeer.getQueuePostOfficeInstance();
          
          destination.setPostOffice(postOffice);
@@ -86,16 +84,13 @@
          //while it is still being loaded
          
          //Binding might already exist
-         
-         log.info("Deploying queue: " + destination.getName());
-         
+            
          Binding binding = postOffice.getBindingForQueueName(destination.getName());
          
          QueuedExecutor executor = (QueuedExecutor)pool.get();
          
          if (binding != null)
          {
-            log.info("Binding already exists!");
             //Reload the queue for the binding
             if (binding.isActive())
             {
@@ -122,7 +117,7 @@
                         executor, null);
             
             //Make a binding for this queue
-            postOffice.bindQueue(destination.getName(), destination.getName(), false, q);
+            postOffice.bindQueue(destination.getName(), destination.getName(), q);
          }
          
          //push security update to the server
@@ -132,6 +127,8 @@
         
          log.debug(this + " security configuration: " + (destination.getSecurityConfig() == null ?
             "null" : "\n" + XMLUtil.elementToString(destination.getSecurityConfig())));
+         
+         started = true;         
 
          log.info(this + " started, fullSize=" + destination.getFullSize() +
                   ", pageSize=" + destination.getPageSize() + ", downCacheSize=" + destination.getDownCacheSize());
@@ -142,7 +139,7 @@
       }
    }
 
-   public void stopService() throws Exception
+   public synchronized void stopService() throws Exception
    {
       try
       {

Modified: trunk/src/main/org/jboss/jms/server/destination/TopicService.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/destination/TopicService.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/jms/server/destination/TopicService.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -43,6 +43,13 @@
    {
       destination = new ManagedTopic();      
    }
+   
+   public TopicService(boolean createdProgrammatically)
+   {
+      super(createdProgrammatically);
+      
+      destination = new ManagedTopic();      
+   }
 
    // JMX managed attributes ----------------------------------------
 
@@ -89,6 +96,8 @@
          
          log.debug(this + " security configuration: " + (destination.getSecurityConfig() == null ?
             "null" : "\n" + XMLUtil.elementToString(destination.getSecurityConfig())));
+         
+         started = true;
 
          log.info(this + " started, fullSize=" + destination.getFullSize() + ", pageSize=" + destination.getPageSize() + ", downCacheSize=" + destination.getDownCacheSize());
       }
@@ -98,7 +107,7 @@
       }
    }
 
-   public void stopService() throws Exception
+   public synchronized void stopService() throws Exception
    {
       try
       {

Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -641,6 +641,11 @@
    {
       JBossDestination dest = (JBossDestination)msg.getJMSDestination();
       
+      // This allows the no-local consumers to filter out the messages that come from the same
+      // connection
+      // TODO Do we want to set this for ALL messages. Optimisation is possible here.
+      msg.setConnectionID(connectionID);
+      
       // We must reference the message *before* we send it the destination to be handled. This is
       // so we can guarantee that the message doesn't disappear from the store before the
       // handling is complete. Each channel then takes copies of the reference if they decide to

Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -304,14 +304,14 @@
          if (noLocal)
          {
             int conId = ((JBossMessage)r).getConnectionID();
+            
             if (trace) { log.trace("message connection id: " + conId); }
 
             if (trace) { log.trace("current connection connection id: " + sessionEndpoint.getConnectionEndpoint().getConnectionID()); }   
                  
             accept = conId != sessionEndpoint.getConnectionEndpoint().getConnectionID();
-            
-            if (trace) { log.trace("accepting? " + accept); }
-            
+                
+            if (trace) { log.trace("accepting? " + accept); }            
          }
       }
       return accept;
@@ -357,10 +357,10 @@
             
             if (destination.isTopic())
             {
-               PostOffice topicExchange = 
+               PostOffice topicPostOffice = 
                   sessionEndpoint.getConnectionEndpoint().getServerPeer().getTopicPostOfficeInstance();
                
-               Binding binding = topicExchange.getBindingForQueueName(queueName);
+               Binding binding = topicPostOffice.getBindingForQueueName(queueName);
                
                if (binding == null)
                {
@@ -369,7 +369,7 @@
                
                if (!binding.isDurable())
                {                 
-                  topicExchange.unbindQueue(queueName);
+                  topicPostOffice.unbindQueue(queueName);
                }
             }
                         

Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -150,7 +150,7 @@
    
          ManagedDestination mDest = dm.getDestination(jmsDestination.getName(), jmsDestination.isQueue());
          
-         if (jmsDestination == null)
+         if (mDest == null)
          {
             throw new InvalidDestinationException("No such destination: " + jmsDestination);
          }
@@ -195,7 +195,7 @@
                            executor, selector);
                
                //Make a binding for this queue
-               binding = topicPostOffice.bindQueue(new GUID().toString(), jmsDestination.getName(), false, q);               
+               binding = topicPostOffice.bindQueue(new GUID().toString(), jmsDestination.getName(), q);               
             }
             else
             {
@@ -232,7 +232,7 @@
                               executor, selector);
                   
                   //Make a binding for this queue
-                  binding = topicPostOffice.bindQueue(name, jmsDestination.getName(), false, q);               
+                  binding = topicPostOffice.bindQueue(name, jmsDestination.getName(), q);               
                }
                else
                {
@@ -258,11 +258,9 @@
                   
                   if (log.isTraceEnabled()) { log.trace("topic " + (topicChanged ? "has" : "has NOT") + " changed"); }
                   
-                  boolean noLocalChanged = noLocal != binding.isNoLocal();
-   
-                  if (selectorChanged || topicChanged || noLocalChanged)
+                  if (selectorChanged || topicChanged)
                   {    
-                     if (trace) { log.trace("topic or selector or noLocal changed so deleting old subscription"); }
+                     if (trace) { log.trace("topic or selector changed so deleting old subscription"); }
    
                      // Unbind the durable subscription
                      
@@ -279,7 +277,7 @@
                                  executor, selector);
                      
                      //Make a binding for this queue
-                     binding = topicPostOffice.bindQueue(name, jmsDestination.getName(), false, q);  
+                     binding = topicPostOffice.bindQueue(name, jmsDestination.getName(), q);  
                   }               
                }
             }
@@ -573,11 +571,11 @@
          {
             QueuedExecutor executor = (QueuedExecutor)pool.get();
             Queue q = 
-               new Queue(idm.getId(), ms, pm, true, true, fullSize, pageSize, downCacheSize,
+               new Queue(idm.getId(), ms, pm, true, false, fullSize, pageSize, downCacheSize,
                          executor, null);
             
             //Make a binding for this queue
-            queuePostOffice.bindQueue(dest.getName(), dest.getName(), false, q);  
+            queuePostOffice.bindQueue(dest.getName(), dest.getName(), q);  
          }         
       }
       catch (Throwable t)

Modified: trunk/src/main/org/jboss/messaging/core/ChannelSupport.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/ChannelSupport.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/messaging/core/ChannelSupport.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -680,9 +680,7 @@
       }
 
       if (trace) { log.trace(this + " handles " + ref + (tx == null ? " non-transactionally" : " in transaction: " + tx)); }
- 
-      log.info("handleInternal");
-      
+   
       //Each channel has its own copy of the reference
       ref = ref.copy();
 
@@ -726,16 +724,12 @@
             
             addReferenceInMemory(ref);
             
-            log.info("added in memory");
-
             // We only do delivery if there are receivers that haven't said they don't want
             // any more references.
             if (receiversReady)
             {
                // Prompt delivery
-               log.info("delivering");
                deliverInternal();
-               log.info("delivered");
             }
          }
          else

Modified: trunk/src/main/org/jboss/messaging/core/PagingChannel.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/PagingChannel.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/messaging/core/PagingChannel.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -164,6 +164,20 @@
       }
    }      
    
+   public int messageCount()
+   {   
+      int count = super.messageCount();
+      
+      //Also need to add the paged refs
+      
+      synchronized (refLock)
+      {      
+         count += nextPagingOrder - firstPagingOrder;
+      }
+      
+      return count;
+   }
+   
    // Public --------------------------------------------------------
 
    public int downCacheCount()

Modified: trunk/src/main/org/jboss/messaging/core/local/Queue.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/local/Queue.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/messaging/core/local/Queue.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -87,8 +87,6 @@
    
    public Delivery handle(DeliveryObserver sender, MessageReference ref, Transaction tx)
    { 
-      log.info("handle:" + ref);
-      
       //If the queue has a Filter we do not accept any Message references that do not
       //match the Filter
       if (filter != null && !filter.accept(ref))

Modified: trunk/src/main/org/jboss/messaging/core/plugin/JDBCShutdownLoggerService.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/JDBCShutdownLoggerService.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/messaging/core/plugin/JDBCShutdownLoggerService.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -75,6 +75,8 @@
          shutdownLogger = new JDBCShutdownLogger(ds, tm, sqlProperties, createTablesOnStartup);
          
          shutdownLogger.start();
+         
+         started = true;
       }
       catch (Throwable t)
       {

Modified: trunk/src/main/org/jboss/messaging/core/plugin/contract/Binding.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/contract/Binding.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/messaging/core/plugin/contract/Binding.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -48,8 +48,6 @@
    
    boolean isDurable();
    
-   boolean isNoLocal();
-   
    boolean isActive();
    
    void activate();

Modified: trunk/src/main/org/jboss/messaging/core/plugin/contract/ClusteredPostOffice.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/contract/ClusteredPostOffice.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/messaging/core/plugin/contract/ClusteredPostOffice.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -45,7 +45,7 @@
     * @return
     * @throws Exception
     */
-   Binding bindClusteredQueue(String queueName, String condition, boolean noLocal, Queue queue) throws Exception;
+   Binding bindClusteredQueue(String queueName, String condition, Queue queue) throws Exception;
    
    /**
     * Unbind a clustered queue from the post office

Modified: trunk/src/main/org/jboss/messaging/core/plugin/contract/PostOffice.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/contract/PostOffice.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/messaging/core/plugin/contract/PostOffice.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -56,7 +56,7 @@
     * @return
     * @throws Exception
     */
-   Binding bindQueue(String queueName, String condition, boolean noLocal, Queue queue) throws Exception;
+   Binding bindQueue(String queueName, String condition, Queue queue) throws Exception;
    
    /**
     * Unbind a queue from the post office

Modified: trunk/src/main/org/jboss/messaging/core/plugin/postoffice/BindingImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/postoffice/BindingImpl.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/messaging/core/plugin/postoffice/BindingImpl.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -57,8 +57,6 @@
    
    private Queue queue;
     
-   private boolean noLocal;
-   
    private boolean active;
    
    private String selector;
@@ -72,7 +70,7 @@
    }
 
    public BindingImpl(String nodeId, String queueName, String condition, String selector,
-                        boolean noLocal, long channelId, boolean durable)
+                      long channelId, boolean durable)
    {
       this.nodeId = nodeId;
       
@@ -80,8 +78,6 @@
       
       this.condition = condition;      
       
-      this.noLocal = noLocal;
-      
       this.selector = selector;
       
       this.channelId = channelId;
@@ -111,12 +107,7 @@
    {
       return queue;
    }
-
-   public boolean isNoLocal()
-   {
-      return noLocal;
-   }
-   
+ 
    public void activate()
    {
       active = true;
@@ -166,8 +157,6 @@
       
       condition = in.readUTF();
       
-      noLocal = in.readBoolean();
-      
       active = in.readBoolean();
       
       selector = readString(in);
@@ -185,8 +174,6 @@
       
       out.writeUTF(condition);
       
-      out.writeBoolean(noLocal);
-      
       out.writeBoolean(active);
       
       writeString(selector, out);

Modified: trunk/src/main/org/jboss/messaging/core/plugin/postoffice/PostOfficeImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/postoffice/PostOfficeImpl.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/messaging/core/plugin/postoffice/PostOfficeImpl.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -116,8 +116,7 @@
      
    // PostOffice implementation ---------------------------------------        
          
-   public Binding bindQueue(String queueName, String condition, boolean noLocal,
-                            Queue queue) throws Exception
+   public Binding bindQueue(String queueName, String condition, Queue queue) throws Exception
    {
       if (queueName == null)
       {
@@ -153,7 +152,7 @@
          String filter = queue.getFilter() == null ? null : queue.getFilter().getFilterString();
                     
          binding = new BindingImpl(nodeId, queueName, condition, filter,
-                                   noLocal, queue.getChannelID(), durable);         
+                                   queue.getChannelID(), durable);         
          
          binding.setQueue(queue);
          
@@ -354,8 +353,7 @@
          ps.setString(3, binding.getQueueName());
          ps.setString(4, binding.getCondition());         
          ps.setString(5, binding.getSelector());
-         ps.setString(6, binding.isNoLocal() ? "Y" : "N");
-         ps.setLong(7, binding.getChannelId());
+         ps.setLong(6, binding.getChannelId());
 
          ps.executeUpdate();;
       }
@@ -441,14 +439,12 @@
             
             String selector = rs.getString(4);
             
-            boolean noLocal = rs.getString(5).equals("Y");
-            
-            long channelId = rs.getLong(6);
+            long channelId = rs.getLong(5);
               
             //We don't load the actual queue - this is because we don't know the paging params until
             //activation time
                     
-            Binding binding = new BindingImpl(nodeId, queueName, condition, selector, noLocal, channelId, true);
+            Binding binding = new BindingImpl(nodeId, queueName, condition, selector, channelId, true);
             
             list.add(binding);
          }
@@ -567,12 +563,12 @@
    {                
       Map map = new HashMap();
       map.put("INSERT_BINDING",
-               "INSERT INTO JMS_POSTOFFICE (POSTOFFICE_NAME, NODE_ID, QUEUE_NAME, CONDITION, SELECTOR, NOLOCAL, CHANNEL_ID) " +
-               "VALUES (?, ?, ?, ?, ?, ?, ?)");
+               "INSERT INTO JMS_POSTOFFICE (POSTOFFICE_NAME, NODE_ID, QUEUE_NAME, CONDITION, SELECTOR, CHANNEL_ID) " +
+               "VALUES (?, ?, ?, ?, ?, ?)");
       map.put("DELETE_BINDING",
               "DELETE FROM JMS_POSTOFFICE WHERE POSTOFFICE_NAME=? AND NODE_ID=? AND QUEUE_NAME=?");
       map.put("LOAD_BINDINGS",
-              "SELECT NODE_ID, QUEUE_NAME, CONDITION, SELECTOR, NOLOCAL, CHANNEL_ID FROM JMS_POSTOFFICE " +
+              "SELECT NODE_ID, QUEUE_NAME, CONDITION, SELECTOR, CHANNEL_ID FROM JMS_POSTOFFICE " +
               "WHERE POSTOFFICE_NAME  = ?");
       return map;
    }
@@ -583,7 +579,7 @@
       map.put("CREATE_POSTOFFICE_TABLE",
               "CREATE TABLE JMS_POSTOFFICE (POSTOFFICE_NAME VARCHAR(256), NODE_ID VARCHAR(256)," +
               "QUEUE_NAME VARCHAR(1024), CONDITION VARCHAR(1024), " +
-              "SELECTOR VARCHAR(1024), NOLOCAL CHAR(1), CHANNEL_ID BIGINT)");
+              "SELECTOR VARCHAR(1024), CHANNEL_ID BIGINT)");
       return map;
    }
    

Modified: trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/BindRequest.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/BindRequest.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/BindRequest.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -42,14 +42,12 @@
    
    private String filterString; 
    
-   private boolean noLocal;   
-   
    private long channelId;   
    
    private boolean durable;
    
    BindRequest(String nodeId, String queueName, String condition, String filterString,
-               boolean noLocal, long channelId, boolean durable)
+               long channelId, boolean durable)
    {
       this.nodeId = nodeId;
       
@@ -59,8 +57,6 @@
       
       this.filterString = filterString;
       
-      this.noLocal = noLocal;
-      
       this.channelId = channelId;
       
       this.durable = durable;
@@ -69,7 +65,7 @@
    public void execute(PostOfficeInternal office) throws Exception
    {
       office.addBindingFromCluster(nodeId, queueName, condition,
-                                     filterString, noLocal, channelId, durable);
+                                   filterString, channelId, durable);
       
    }
 }

Modified: trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/ClusteredPostOfficeImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/ClusteredPostOfficeImpl.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/ClusteredPostOfficeImpl.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -243,11 +243,9 @@
    
    // PostOffice implementation ---------------------------------------        
    
-   public Binding bindClusteredQueue(String queueName, String condition, boolean noLocal,
-                                     Queue queue) throws Exception
+   public Binding bindClusteredQueue(String queueName, String condition, Queue queue) throws Exception
    {           
-      Binding binding = super.bindQueue(queueName, condition, noLocal,
-                                        queue);
+      Binding binding = super.bindQueue(queueName, condition, queue);
       
       boolean durable = queue.isRecoverable();
       
@@ -255,7 +253,7 @@
       
       BindRequest request =
          new BindRequest(nodeId, queueName, condition, filter,
-                         noLocal, binding.getChannelId(), durable);
+                         binding.getChannelId(), durable);
       
       syncSendRequest(request);
       
@@ -430,7 +428,7 @@
     * Called when another node adds a binding
     */
    public void addBindingFromCluster(String nodeId, String queueName, String condition,
-                                      String filterString, boolean noLocal, long channelID, boolean durable)
+                                      String filterString, long channelID, boolean durable)
       throws Exception
    {
       lock.writeLock().acquire();
@@ -459,7 +457,7 @@
          }
          
          binding = new BindingImpl(nodeId, queueName, condition, filterString,
-                                     noLocal, channelID, durable); 
+                                   channelID, durable); 
          
          binding.activate();
          

Modified: trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/PostOfficeInternal.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/PostOfficeInternal.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/src/main/org/jboss/messaging/core/plugin/postoffice/cluster/PostOfficeInternal.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -39,7 +39,7 @@
 interface PostOfficeInternal
 {
    void addBindingFromCluster(String nodeId, String queueName, String condition,
-                              String filterString, boolean noLocal, long channelId, boolean durable)
+                              String filterString, long channelId, boolean durable)
       throws Exception;
    
    void removeBindingFromCluster(String nodeId, String queueName)

Modified: trunk/tests/src/org/jboss/test/messaging/core/local/QueueWithFilterTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/core/local/QueueWithFilterTest.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/core/local/QueueWithFilterTest.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -23,6 +23,7 @@
 
 import org.jboss.messaging.core.Filter;
 import org.jboss.messaging.core.Message;
+import org.jboss.messaging.core.MessageReference;
 import org.jboss.messaging.core.Routable;
 import org.jboss.messaging.core.local.Queue;
 import org.jboss.messaging.core.message.CoreMessage;
@@ -146,8 +147,8 @@
       }
       public boolean accept(Routable routable)
       {
-         CoreMessage msg = (CoreMessage)routable;
-         return msg.getMessageID() == value;
+         MessageReference ref = (MessageReference)routable;
+         return ref.getMessageID() == value;
       }
       public String getFilterString()
       {

Modified: trunk/tests/src/org/jboss/test/messaging/core/plugin/ClusteredPostOfficeTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/core/plugin/ClusteredPostOfficeTest.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/core/plugin/ClusteredPostOfficeTest.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -88,11 +88,11 @@
          Queue queue1 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);
          
          Binding binding1 =
-            office1.bindQueue("sub1", "topic1", false, queue1);
+            office1.bindQueue("sub1", "topic1", queue1);
                   
          try
          {
-            office2.bindQueue("sub1", "topic1", false, queue1);
+            office2.bindQueue("sub1", "topic1", queue1);
             fail();
          }
          catch (IllegalArgumentException e)
@@ -133,10 +133,10 @@
          
          Queue queue1 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding1 =
-            office1.bindClusteredQueue("sub1", "topic1", false, queue1);
+            office1.bindClusteredQueue("sub1", "topic1", queue1);
          Queue queue2 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding2 =
-            office1.bindClusteredQueue("sub2", "topic1", false, queue2);
+            office1.bindClusteredQueue("sub2", "topic1", queue2);
          
          //Start another office - make sure it picks up the bindings from the first node
          
@@ -153,7 +153,7 @@
          
          Queue queue3 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding3 =
-            office2.bindClusteredQueue("sub3", "topic1", false, queue3);
+            office2.bindClusteredQueue("sub3", "topic1", queue3);
   
          //Make sure both nodes pick it up
          
@@ -177,7 +177,7 @@
          
          Queue queue4 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding4 =
-            office2.bindClusteredQueue("sub4", "topic1", false, queue4);
+            office2.bindClusteredQueue("sub4", "topic1", queue4);
          
          // Make sure both nodes pick it up
          
@@ -236,7 +236,7 @@
                   
          Queue queue5 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding5 =
-            office3.bindClusteredQueue("sub5", "topic1", false, queue5);
+            office3.bindClusteredQueue("sub5", "topic1", queue5);
          
          // Make sure all nodes pick it up
          
@@ -268,11 +268,11 @@
          
          Queue queue6 = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding6 =
-            office1.bindClusteredQueue("sub6", "topic1", false, queue6);
+            office1.bindClusteredQueue("sub6", "topic1", queue6);
          
          Queue queue7 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding7 =
-            office1.bindClusteredQueue("sub7", "topic1", false, queue7);
+            office1.bindClusteredQueue("sub7", "topic1", queue7);
          
          // Make sure all nodes pick them up
          
@@ -466,52 +466,52 @@
          Binding[] bindings = new Binding[16];
          
          queues[0] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[0] = office1.bindClusteredQueue("sub1", "topic1", false, queues[0]);
+         bindings[0] = office1.bindClusteredQueue("sub1", "topic1", queues[0]);
          
          queues[1] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[1] = office1.bindClusteredQueue("sub2", "topic1", false, queues[1]);
+         bindings[1] = office1.bindClusteredQueue("sub2", "topic1", queues[1]);
          
          queues[2] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[2] = office2.bindClusteredQueue("sub3", "topic1", false, queues[2]);
+         bindings[2] = office2.bindClusteredQueue("sub3", "topic1", queues[2]);
          
          queues[3] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[3] = office2.bindClusteredQueue("sub4", "topic1", false, queues[3]);
+         bindings[3] = office2.bindClusteredQueue("sub4", "topic1", queues[3]);
          
          queues[4] = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[4] = office2.bindClusteredQueue("sub5", "topic1", false, queues[4]);
+         bindings[4] = office2.bindClusteredQueue("sub5", "topic1", queues[4]);
          
          queues[5] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[5] = office1.bindClusteredQueue("sub6", "topic1", false, queues[5]);
+         bindings[5] = office1.bindClusteredQueue("sub6", "topic1", queues[5]);
          
          queues[6] = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[6] = office1.bindClusteredQueue("sub7", "topic1", false, queues[6]);
+         bindings[6] = office1.bindClusteredQueue("sub7", "topic1", queues[6]);
          
          queues[7] = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[7] = office1.bindClusteredQueue("sub8", "topic1", false, queues[7]);
+         bindings[7] = office1.bindClusteredQueue("sub8", "topic1", queues[7]);
          
          queues[8] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[8] = office1.bindClusteredQueue("sub9", "topic2", false, queues[8]);
+         bindings[8] = office1.bindClusteredQueue("sub9", "topic2", queues[8]);
          
          queues[9] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[9] = office1.bindClusteredQueue("sub10", "topic2", false, queues[9]);
+         bindings[9] = office1.bindClusteredQueue("sub10", "topic2", queues[9]);
          
          queues[10] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[10] = office2.bindClusteredQueue("sub11", "topic2", false, queues[10]);
+         bindings[10] = office2.bindClusteredQueue("sub11", "topic2", queues[10]);
          
          queues[11] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[11] = office2.bindClusteredQueue("sub12", "topic2", false, queues[11]);
+         bindings[11] = office2.bindClusteredQueue("sub12", "topic2", queues[11]);
          
          queues[12] = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[12] = office2.bindClusteredQueue("sub13", "topic2", false, queues[12]);
+         bindings[12] = office2.bindClusteredQueue("sub13", "topic2", queues[12]);
          
          queues[13] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[13] = office1.bindClusteredQueue("sub14", "topic2", false, queues[13]);
+         bindings[13] = office1.bindClusteredQueue("sub14", "topic2", queues[13]);
          
          queues[14] = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[14] = office1.bindClusteredQueue("sub15", "topic2", false, queues[14]);
+         bindings[14] = office1.bindClusteredQueue("sub15", "topic2", queues[14]);
          
          queues[15] = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[15] = office1.bindClusteredQueue("sub16", "topic2", false, queues[15]);
+         bindings[15] = office1.bindClusteredQueue("sub16", "topic2", queues[15]);
        
          SimpleReceiver[] receivers = new SimpleReceiver[16];
          
@@ -628,52 +628,52 @@
          Binding[] bindings = new Binding[16];
          
          queues[0] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[0] = office1.bindClusteredQueue("sub1", "topic1", false, queues[0]);
+         bindings[0] = office1.bindClusteredQueue("sub1", "topic1", queues[0]);
          
          queues[1] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[1] = office1.bindClusteredQueue("sub2", "topic1", false, queues[1]);
+         bindings[1] = office1.bindClusteredQueue("sub2", "topic1", queues[1]);
          
          queues[2] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[2] = office2.bindClusteredQueue("sub3", "topic1", false, queues[2]);
+         bindings[2] = office2.bindClusteredQueue("sub3", "topic1", queues[2]);
          
          queues[3] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[3] = office2.bindClusteredQueue("sub4", "topic1", false, queues[3]);
+         bindings[3] = office2.bindClusteredQueue("sub4", "topic1", queues[3]);
          
          queues[4] = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[4] = office2.bindClusteredQueue("sub5", "topic1", false, queues[4]);
+         bindings[4] = office2.bindClusteredQueue("sub5", "topic1", queues[4]);
          
          queues[5] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[5] = office1.bindClusteredQueue("sub6", "topic1", false, queues[5]);
+         bindings[5] = office1.bindClusteredQueue("sub6", "topic1", queues[5]);
          
          queues[6] = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[6] = office1.bindClusteredQueue("sub7", "topic1", false, queues[6]);
+         bindings[6] = office1.bindClusteredQueue("sub7", "topic1", queues[6]);
          
          queues[7] = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[7] = office1.bindClusteredQueue("sub8", "topic1", false, queues[7]);
+         bindings[7] = office1.bindClusteredQueue("sub8", "topic1", queues[7]);
          
          queues[8] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[8] = office1.bindClusteredQueue("sub9", "topic2", false, queues[8]);
+         bindings[8] = office1.bindClusteredQueue("sub9", "topic2", queues[8]);
          
          queues[9] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[9] = office1.bindClusteredQueue("sub10", "topic2", false, queues[9]);
+         bindings[9] = office1.bindClusteredQueue("sub10", "topic2", queues[9]);
          
          queues[10] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[10] = office2.bindClusteredQueue("sub11", "topic2", false, queues[10]);
+         bindings[10] = office2.bindClusteredQueue("sub11", "topic2", queues[10]);
          
          queues[11] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[11] = office2.bindClusteredQueue("sub12", "topic2", false, queues[11]);
+         bindings[11] = office2.bindClusteredQueue("sub12", "topic2", queues[11]);
          
          queues[12] = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[12] = office2.bindClusteredQueue("sub13", "topic2", false, queues[12]);
+         bindings[12] = office2.bindClusteredQueue("sub13", "topic2", queues[12]);
          
          queues[13] = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[13] = office1.bindClusteredQueue("sub14", "topic2", false, queues[13]);
+         bindings[13] = office1.bindClusteredQueue("sub14", "topic2", queues[13]);
          
          queues[14] = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[14] = office1.bindClusteredQueue("sub15", "topic2", false, queues[14]);
+         bindings[14] = office1.bindClusteredQueue("sub15", "topic2", queues[14]);
          
          queues[15] = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
-         bindings[15] = office1.bindClusteredQueue("sub16", "topic2", false, queues[15]);
+         bindings[15] = office1.bindClusteredQueue("sub16", "topic2", queues[15]);
 
          SimpleReceiver[] receivers = new SimpleReceiver[16];
          

Modified: trunk/tests/src/org/jboss/test/messaging/core/plugin/JDBCPersistenceManagerTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/core/plugin/JDBCPersistenceManagerTest.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/core/plugin/JDBCPersistenceManagerTest.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -915,46 +915,48 @@
       assertTrue(containsMessage(ms, ref1.getMessageID()));   
    }
    
+   
+   //Commented out until recovery work is complete
 
-   public void testRetrievePreparedTransactions() throws Throwable
-   {
-      doSetup(false, 100);
-      
-      Channel channel = new SimpleChannel(0, ms);
-      
-      TransactionRepository txRep = new TransactionRepository(pm, new IdManager("TRANSACTION_ID", 10, pm));
-      txRep.start();
-
-      Message[] messages = createMessages(10);
-      
-      Xid[] xids = new Xid[messages.length];
-      Transaction[] txs = new Transaction[messages.length];
-      
-      for (int i = 0; i < messages.length; i++)
-      {         
-         xids[i] = new MockXid();
-         txs[i] = txRep.createTransaction(xids[i]);
-         MessageReference ref = ms.reference(messages[i]);
-         pm.addReference(channel.getChannelID(), ref, txs[i]);
-         txs[i].prepare();
-      }
-      
-      List txList = pm.retrievePreparedTransactions();
-      assertNotNull(txList);
-      assertEquals(messages.length, txList.size());
-      
-      for (int i = 0; i < xids.length; i++)
-      {
-         Xid xid = xids[i];
-         assertTrue(txList.contains(xid));
-      }
-      
-      //rollback the txs
-      for (int i = 0; i < txs.length; i++)
-      {
-         txs[i].rollback();
-      }   
-   }
+//   public void testRetrievePreparedTransactions() throws Throwable
+//   {
+//      doSetup(false, 100);
+//      
+//      Channel channel = new SimpleChannel(0, ms);
+//      
+//      TransactionRepository txRep = new TransactionRepository(pm, new IdManager("TRANSACTION_ID", 10, pm));
+//      txRep.start();
+//
+//      Message[] messages = createMessages(10);
+//      
+//      Xid[] xids = new Xid[messages.length];
+//      Transaction[] txs = new Transaction[messages.length];
+//      
+//      for (int i = 0; i < messages.length; i++)
+//      {         
+//         xids[i] = new MockXid();
+//         txs[i] = txRep.createTransaction(xids[i]);
+//         MessageReference ref = ms.reference(messages[i]);
+//         pm.addReference(channel.getChannelID(), ref, txs[i]);
+//         txs[i].prepare();
+//      }
+//      
+//      List txList = pm.retrievePreparedTransactions();
+//      assertNotNull(txList);
+//      assertEquals(messages.length, txList.size());
+//      
+//      for (int i = 0; i < xids.length; i++)
+//      {
+//         Xid xid = xids[i];
+//         assertTrue(txList.contains(xid));
+//      }
+//      
+//      //rollback the txs
+//      for (int i = 0; i < txs.length; i++)
+//      {
+//         txs[i].rollback();
+//      }   
+//   }
    
    protected Message createMessage(byte i, boolean reliable) throws Throwable
    {

Modified: trunk/tests/src/org/jboss/test/messaging/core/plugin/SimplePostOfficeTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/core/plugin/SimplePostOfficeTest.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/core/plugin/SimplePostOfficeTest.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -149,12 +149,12 @@
          Queue queue1 = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);
          
          Binding binding1 =
-            office1.bindQueue("durableQueue", "condition1", false, queue1);
+            office1.bindQueue("durableQueue", "condition1", queue1);
          
          //Binding twice with the same name should fail      
          try
          {
-            Binding bindFail = office1.bindQueue("durableQueue", "condition1", false, queue1);
+            Binding bindFail = office1.bindQueue("durableQueue", "condition1", queue1);
             fail();
          }
          catch (IllegalArgumentException e)
@@ -165,7 +165,7 @@
          //Bind one non durable
          Queue queue2 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);
          Binding binding2 =
-            office1.bindQueue("nonDurableQueue", "condition2", false, queue2);
+            office1.bindQueue("nonDurableQueue", "condition2", queue2);
          
          //Check they're there
          
@@ -249,35 +249,35 @@
          
          Queue queue1 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding1 =
-            office.bindQueue("queue1", "condition1", false, queue1);
+            office.bindQueue("queue1", "condition1", queue1);
          
          Queue queue2 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding2 =
-            office.bindQueue("queue2", "condition1",false, queue2);
+            office.bindQueue("queue2", "condition1", queue2);
          
          Queue queue3 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding3 =
-            office.bindQueue("queue3", "condition1", false, queue3);
+            office.bindQueue("queue3", "condition1", queue3);
          
          Queue queue4 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding4 =
-            office.bindQueue("queue4", "condition1", false, queue4);
+            office.bindQueue("queue4", "condition1", queue4);
          
          Queue queue5 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding5 =
-            office.bindQueue("queue5", "condition2", false, queue5);
+            office.bindQueue("queue5", "condition2", queue5);
          
          Queue queue6 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding6 =
-            office.bindQueue("queue6", "condition2", false, queue6);
+            office.bindQueue("queue6", "condition2", queue6);
          
          Queue queue7 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding7 =
-            office.bindQueue("queue7", "condition2", false, queue7);
+            office.bindQueue("queue7", "condition2", queue7);
          
          Queue queue8 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding8 =
-            office.bindQueue("queue8", "condition2", false, queue8);
+            office.bindQueue("queue8", "condition2", queue8);
          
          
          List bindings = office.listBindingsForCondition("dummy");
@@ -355,27 +355,27 @@
          
          Queue queue1 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding1 =
-            postOffice.bindQueue("queue1", "topic1", false, queue1);
+            postOffice.bindQueue("queue1", "topic1", queue1);
          
          Queue queue2 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding2 =
-            postOffice.bindQueue("queue2", "topic1",false, queue2);
+            postOffice.bindQueue("queue2", "topic1", queue2);
          
          Queue queue3 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding3 =
-            postOffice.bindQueue("queue3", "topic1", false, queue3);
+            postOffice.bindQueue("queue3", "topic1", queue3);
          
          Queue queue4 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding4 =
-            postOffice.bindQueue("queue4", "topic2", false, queue4);
+            postOffice.bindQueue("queue4", "topic2", queue4);
          
          Queue queue5 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding5 =
-            postOffice.bindQueue("queue5", "topic2", false, queue5);
+            postOffice.bindQueue("queue5", "topic2", queue5);
          
          Queue queue6 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding6 =
-            postOffice.bindQueue("queue6", "topic2", false, queue6);
+            postOffice.bindQueue("queue6", "topic2", queue6);
       
          SimpleReceiver receiver1 = new SimpleReceiver("blah", SimpleReceiver.ACCEPTING);
          queue1.add(receiver1);
@@ -496,7 +496,7 @@
          
          Queue queue1 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding1 =
-            postOffice.bindQueue("queue1", "condition1", false, queue1);
+            postOffice.bindQueue("queue1", "condition1", queue1);
               
          SimpleReceiver receiver1 = new SimpleReceiver("blah", SimpleReceiver.ACCEPTING);;
          queue1.add(receiver1);
@@ -540,27 +540,27 @@
       
          Queue queue1 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding1 =
-            postOffice.bindQueue("queue1", "topic1", false, queue1);
+            postOffice.bindQueue("queue1", "topic1", queue1);
          
          Queue queue2 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding2 =
-            postOffice.bindQueue("queue2", "topic1",false, queue2);
+            postOffice.bindQueue("queue2", "topic1", queue2);
          
          Queue queue3 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding3 =
-            postOffice.bindQueue("queue3", "topic1", false, queue3);
+            postOffice.bindQueue("queue3", "topic1", queue3);
          
          Queue queue4 = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding4 =
-            postOffice.bindQueue("queue4", "topic2", false, queue4);
+            postOffice.bindQueue("queue4", "topic2", queue4);
          
          Queue queue5 = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding5 =
-            postOffice.bindQueue("queue5", "topic2", false, queue5);
+            postOffice.bindQueue("queue5", "topic2", queue5);
          
          Queue queue6 = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding6 =
-            postOffice.bindQueue("queue6", "topic2", false, queue6);
+            postOffice.bindQueue("queue6", "topic2", queue6);
       
          SimpleReceiver receiver1 = new SimpleReceiver("blah", SimpleReceiver.ACCEPTING);;
          queue1.add(receiver1);
@@ -703,11 +703,11 @@
       
          Queue queue1 = new Queue(im.getId(), ms, pm, true, false, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding1 =
-            postOffice.bindQueue("queue1", "topic1", false, queue1);
+            postOffice.bindQueue("queue1", "topic1", queue1);
          
          Queue queue2 = new Queue(im.getId(), ms, pm, true, true, 2000, 100, 100, (QueuedExecutor)pool.get(), null);         
          Binding binding2 =
-            postOffice.bindQueue("queue2", "topic1",false, queue2);
+            postOffice.bindQueue("queue2", "topic1", queue2);
           
          SimpleReceiver receiver1 = new SimpleReceiver("blah", SimpleReceiver.ACCEPTING);;
          queue1.add(receiver1);
@@ -966,7 +966,6 @@
       assertEquals(binding1.getSelector(), binding2.getSelector());
       assertEquals(binding1.getChannelId(), binding2.getChannelId());
       assertEquals(binding1.isDurable(), binding2.isDurable());
-      assertEquals(binding1.isNoLocal(), binding2.isNoLocal());
    }
    
    protected PostOffice createPostOffice() throws Exception

Deleted: trunk/tests/src/org/jboss/test/messaging/jms/CreateClientOnServerCommand.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/CreateClientOnServerCommand.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/jms/CreateClientOnServerCommand.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -1,97 +0,0 @@
-/*
-  * 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.
-  */
-package org.jboss.test.messaging.jms;
-
-import java.util.ArrayList;
-import java.util.List;
-
-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 org.jboss.jms.client.JBossConnection;
-import org.jboss.test.messaging.tools.jmx.rmi.Command;
-
-/**
- * 
- * A CreateClientOnServerCommand.
- * 
- * @author <a href="tim.fox at jboss.com">Tim Fox</a>
- * @version 1.1
- *
- * CreateClientOnServerCommand.java,v 1.1 2006/02/21 07:44:02 timfox Exp
- */
-public class CreateClientOnServerCommand implements Command
-{
-   private static final long serialVersionUID = -997724797145152821L;
-   
-   private ConnectionFactory cf;
-   
-   private Queue queue;
-   
-   private boolean retainReference;
-   
-   private static List commands = new ArrayList();
-   
-   public CreateClientOnServerCommand(ConnectionFactory cf, Queue queue, boolean retainReference)
-   {
-      this.cf = cf;
-      
-      this.queue = queue;
-      
-      this.retainReference = retainReference;
-   }
-   
-   /*
-    * Just create a connection, send and receive a message and leave the connection open.
-    */
-   public Object execute() throws Exception
-   {
-      if (retainReference)
-      {
-         commands.add(this);
-      }
-      
-      Connection conn = cf.createConnection();
-        
-      Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-          
-      MessageProducer prod = sess.createProducer(queue);
-      
-      prod.send(sess.createMessage());
-         
-      MessageConsumer cons = sess.createConsumer(queue);
-      
-      conn.start();
-      
-      cons.receive();
-      
-      //Leave the connection unclosed
-      
-      //Return the remoting client session id for the connection
-      return ((JBossConnection)conn).getRemotingClientSessionId();      
-   }
-
-}

Deleted: trunk/tests/src/org/jboss/test/messaging/jms/CreateHangingConsumerCommand.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/CreateHangingConsumerCommand.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/jms/CreateHangingConsumerCommand.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -1,87 +0,0 @@
-/*
-  * 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.
-  */
-package org.jboss.test.messaging.jms;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Queue;
-import javax.jms.Session;
-
-import org.jboss.jms.client.JBossConnection;
-import org.jboss.test.messaging.tools.jmx.rmi.Command;
-
-/**
- * 
- * A CreateHangingConsumerCommand.
- * 
- * @author <a href="tim.fox at jboss.com">Tim Fox</a>
- * @version 1.1
- *
- * CreateHangingConsumerCommand.java,v 1.1 2006/02/21 07:44:02 timfox Exp
- */
-public class CreateHangingConsumerCommand implements Command
-{
-   private static final long serialVersionUID = -997724797145152821L;
-   
-   private ConnectionFactory cf;
-   
-   private Queue queue;
-   
-   private static MessageConsumer consumer;
-   
-   public CreateHangingConsumerCommand(ConnectionFactory cf, Queue queue)
-   {
-      this.cf = cf;
-      
-      this.queue = queue;
-   }
-   
-   public Object execute() throws Exception
-   {
-      Connection conn = cf.createConnection();
-          
-      Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-       
-      conn.start();
-      
-      consumer = sess.createConsumer(queue);
-      
-      consumer.setMessageListener(new Listener());
-      
-      //Leave the connection unclosed
-      
-      //Return the remoting client session id for the connection
-      return ((JBossConnection)conn).getRemotingClientSessionId();      
-   }
-   
-   class Listener implements MessageListener
-   {
-      public void onMessage(Message m)
-      {
-         
-      }
-   }
-
-}

Modified: trunk/tests/src/org/jboss/test/messaging/jms/DurableSubscriberTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/DurableSubscriberTest.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/jms/DurableSubscriberTest.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -110,7 +110,7 @@
       ObjectName destObjectName = 
          new ObjectName("jboss.messaging.destination:service=Topic,name=Topic");
       String text = (String)ServerManagement.invoke(destObjectName, "listSubscriptionsAsText", null, null);
-     
+       
       assertTrue(text.indexOf("monicabelucci") != -1);
 
       prod.send(s.createTextMessage("k"));

Modified: trunk/tests/src/org/jboss/test/messaging/jms/MessageConsumerTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/MessageConsumerTest.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/jms/MessageConsumerTest.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -2036,15 +2036,10 @@
       consumerConnection.close();
    }
 
-
-
-
    //
    // NoLocal
    //
-
-
-
+   
    public void testNoLocal() throws Exception
    {
       if (log.isTraceEnabled()) log.trace("testNoLocal");
@@ -2068,7 +2063,7 @@
          assertEquals(Session.AUTO_ACKNOWLEDGE, sess2.getAcknowledgeMode());
          MessageConsumer consumer2 = sess2.createConsumer(topic, null, true);
 
-         // we need different session because we cannot access the same session from two different
+         // we need different session because we cannot access the same session from different
          // threads
          Session sess3 = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
          assertEquals(Session.AUTO_ACKNOWLEDGE, sess3.getAcknowledgeMode());

Modified: trunk/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/jms/WireFormatTest.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -72,7 +72,7 @@
    private static final Logger log = Logger.getLogger(WireFormatTest.class);
 
    // TODO - replace with a dynamic value
-   private static final byte CURRENT_VERSION = 5;
+   private static final byte CURRENT_VERSION = 6;
 
    // Static --------------------------------------------------------
       

Modified: trunk/tests/src/org/jboss/test/messaging/jms/crash/CallbackFailureTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/crash/CallbackFailureTest.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/jms/crash/CallbackFailureTest.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -32,7 +32,6 @@
 import org.jboss.jms.server.ConnectionManager;
 import org.jboss.logging.Logger;
 import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.test.messaging.jms.CreateHangingConsumerCommand;
 import org.jboss.test.messaging.tools.ServerManagement;
 import org.jboss.test.messaging.tools.jmx.ServiceContainer;
 import org.jboss.test.messaging.tools.jmx.rmi.LocalTestServer;

Modified: trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashLargeLeaseTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashLargeLeaseTest.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashLargeLeaseTest.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -28,7 +28,6 @@
 import org.jboss.jms.server.ConnectionManager;
 import org.jboss.logging.Logger;
 import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.test.messaging.jms.CreateClientOnServerCommand;
 import org.jboss.test.messaging.tools.ServerManagement;
 import org.jboss.test.messaging.tools.jmx.ServiceContainer;
 import org.jboss.test.messaging.tools.jmx.rmi.LocalTestServer;

Modified: trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashNegativeLeaseTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashNegativeLeaseTest.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashNegativeLeaseTest.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -28,7 +28,6 @@
 import org.jboss.jms.server.ConnectionManager;
 import org.jboss.logging.Logger;
 import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.test.messaging.jms.CreateClientOnServerCommand;
 import org.jboss.test.messaging.tools.ServerManagement;
 import org.jboss.test.messaging.tools.jmx.ServiceContainer;
 import org.jboss.test.messaging.tools.jmx.rmi.LocalTestServer;

Modified: trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashTest.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashTest.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -28,7 +28,6 @@
 import org.jboss.jms.server.ConnectionManager;
 import org.jboss.logging.Logger;
 import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.test.messaging.jms.CreateClientOnServerCommand;
 import org.jboss.test.messaging.tools.ServerManagement;
 import org.jboss.test.messaging.tools.jmx.ServiceContainer;
 import org.jboss.test.messaging.tools.jmx.rmi.LocalTestServer;

Modified: trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashZeroLeaseTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashZeroLeaseTest.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/jms/crash/ClientCrashZeroLeaseTest.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -28,7 +28,6 @@
 import org.jboss.jms.server.ConnectionManager;
 import org.jboss.logging.Logger;
 import org.jboss.test.messaging.MessagingTestCase;
-import org.jboss.test.messaging.jms.CreateClientOnServerCommand;
 import org.jboss.test.messaging.tools.ServerManagement;
 import org.jboss.test.messaging.tools.jmx.ServiceContainer;
 import org.jboss.test.messaging.tools.jmx.rmi.LocalTestServer;

Copied: trunk/tests/src/org/jboss/test/messaging/jms/crash/CreateClientOnServerCommand.java (from rev 1264, trunk/tests/src/org/jboss/test/messaging/jms/CreateClientOnServerCommand.java)
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/CreateClientOnServerCommand.java	2006-09-06 04:04:35 UTC (rev 1264)
+++ trunk/tests/src/org/jboss/test/messaging/jms/crash/CreateClientOnServerCommand.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -0,0 +1,97 @@
+/*
+  * 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.
+  */
+package org.jboss.test.messaging.jms.crash;
+
+import java.util.ArrayList;
+import java.util.List;
+
+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 org.jboss.jms.client.JBossConnection;
+import org.jboss.test.messaging.tools.jmx.rmi.Command;
+
+/**
+ * 
+ * A CreateClientOnServerCommand.
+ * 
+ * @author <a href="tim.fox at jboss.com">Tim Fox</a>
+ * @version 1.1
+ *
+ * CreateClientOnServerCommand.java,v 1.1 2006/02/21 07:44:02 timfox Exp
+ */
+public class CreateClientOnServerCommand implements Command
+{
+   private static final long serialVersionUID = -997724797145152821L;
+   
+   private ConnectionFactory cf;
+   
+   private Queue queue;
+   
+   private boolean retainReference;
+   
+   private static List commands = new ArrayList();
+   
+   public CreateClientOnServerCommand(ConnectionFactory cf, Queue queue, boolean retainReference)
+   {
+      this.cf = cf;
+      
+      this.queue = queue;
+      
+      this.retainReference = retainReference;
+   }
+   
+   /*
+    * Just create a connection, send and receive a message and leave the connection open.
+    */
+   public Object execute() throws Exception
+   {
+      if (retainReference)
+      {
+         commands.add(this);
+      }
+      
+      Connection conn = cf.createConnection();
+        
+      Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+          
+      MessageProducer prod = sess.createProducer(queue);
+      
+      prod.send(sess.createMessage());
+         
+      MessageConsumer cons = sess.createConsumer(queue);
+      
+      conn.start();
+      
+      cons.receive();
+      
+      //Leave the connection unclosed
+      
+      //Return the remoting client session id for the connection
+      return ((JBossConnection)conn).getRemotingClientSessionId();      
+   }
+
+}

Copied: trunk/tests/src/org/jboss/test/messaging/jms/crash/CreateHangingConsumerCommand.java (from rev 1264, trunk/tests/src/org/jboss/test/messaging/jms/CreateHangingConsumerCommand.java)
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/CreateHangingConsumerCommand.java	2006-09-06 04:04:35 UTC (rev 1264)
+++ trunk/tests/src/org/jboss/test/messaging/jms/crash/CreateHangingConsumerCommand.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -0,0 +1,87 @@
+/*
+  * 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.
+  */
+package org.jboss.test.messaging.jms.crash;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.Queue;
+import javax.jms.Session;
+
+import org.jboss.jms.client.JBossConnection;
+import org.jboss.test.messaging.tools.jmx.rmi.Command;
+
+/**
+ * 
+ * A CreateHangingConsumerCommand.
+ * 
+ * @author <a href="tim.fox at jboss.com">Tim Fox</a>
+ * @version 1.1
+ *
+ * CreateHangingConsumerCommand.java,v 1.1 2006/02/21 07:44:02 timfox Exp
+ */
+public class CreateHangingConsumerCommand implements Command
+{
+   private static final long serialVersionUID = -997724797145152821L;
+   
+   private ConnectionFactory cf;
+   
+   private Queue queue;
+   
+   private static MessageConsumer consumer;
+   
+   public CreateHangingConsumerCommand(ConnectionFactory cf, Queue queue)
+   {
+      this.cf = cf;
+      
+      this.queue = queue;
+   }
+   
+   public Object execute() throws Exception
+   {
+      Connection conn = cf.createConnection();
+          
+      Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+       
+      conn.start();
+      
+      consumer = sess.createConsumer(queue);
+      
+      consumer.setMessageListener(new Listener());
+      
+      //Leave the connection unclosed
+      
+      //Return the remoting client session id for the connection
+      return ((JBossConnection)conn).getRemotingClientSessionId();      
+   }
+   
+   class Listener implements MessageListener
+   {
+      public void onMessage(Message m)
+      {
+         
+      }
+   }
+
+}

Modified: trunk/tests/src/org/jboss/test/messaging/jms/server/destination/base/DestinationManagementTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/server/destination/base/DestinationManagementTestBase.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/jms/server/destination/base/DestinationManagementTestBase.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -113,13 +113,13 @@
 
       if (isQueue())
       {
-         ManagedQueue q = (ManagedQueue)destinations.iterator().next();
-         assertEquals("Kirkwood", q.getName());
+         Queue q = (Queue)destinations.iterator().next();
+         assertEquals("Kirkwood", q.getQueueName());
       }
       else
       {
-         ManagedTopic t = (ManagedTopic)destinations.iterator().next();
-         assertEquals("Kirkwood", t.getName());
+         Topic t = (Topic)destinations.iterator().next();
+         assertEquals("Kirkwood", t.getTopicName());
       }
 
       assertEquals(serverPeerObjectName,
@@ -171,14 +171,14 @@
 
       if (isQueue())
       {
-         ManagedQueue q = (ManagedQueue)destinations.iterator().next();
-         assertEquals("Kirkwood", q.getName());
+         Queue q = (Queue)destinations.iterator().next();
+         assertEquals("Kirkwood", q.getQueueName());
          
       }
       else
       {
-         ManagedTopic t = (ManagedTopic)destinations.iterator().next();
-         assertEquals("Kirkwood", t.getName());
+         Topic t = (Topic)destinations.iterator().next();
+         assertEquals("Kirkwood", t.getTopicName());
       }
 
       assertEquals(serverPeerObjectName,

Modified: trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java	2006-09-09 13:52:59 UTC (rev 1272)
+++ trunk/tests/src/org/jboss/test/messaging/tools/jmx/rmi/LocalTestServer.java	2006-09-10 11:53:54 UTC (rev 1273)
@@ -383,6 +383,10 @@
 
       log.debug("stopping ServerPeer's plug-in dependencies");
       
+      sc.invoke(shutdownLoggerObjectName, "stop", new Object[0], new String[0]);
+      sc.invoke(shutdownLoggerObjectName, "destroy", new Object[0], new String[0]);
+      sc.unregisterService(shutdownLoggerObjectName);
+      
       sc.invoke(jmsUserManagerObjectName, "stop", new Object[0], new String[0]);
       sc.invoke(jmsUserManagerObjectName, "destroy", new Object[0], new String[0]);
       sc.unregisterService(jmsUserManagerObjectName);




More information about the jboss-cvs-commits mailing list