[jboss-cvs] JBoss Messaging SVN: r4163 - in trunk: src/main/org/jboss/messaging/core/client and 31 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu May 8 07:20:19 EDT 2008


Author: timfox
Date: 2008-05-08 07:20:19 -0400 (Thu, 08 May 2008)
New Revision: 4163

Added:
   trunk/src/main/org/jboss/messaging/core/client/ClientMessage.java
   trunk/src/main/org/jboss/messaging/core/client/impl/ClientMessageImpl.java
   trunk/src/main/org/jboss/messaging/core/server/MessageReference.java
   trunk/src/main/org/jboss/messaging/core/server/ServerMessage.java
   trunk/src/main/org/jboss/messaging/core/server/impl/MessageReferenceImpl.java
   trunk/src/main/org/jboss/messaging/core/server/impl/ServerMessageImpl.java
Removed:
   trunk/src/main/org/jboss/messaging/core/message/ClientMessage.java
   trunk/src/main/org/jboss/messaging/core/message/MessageReference.java
   trunk/src/main/org/jboss/messaging/core/message/ServerMessage.java
   trunk/src/main/org/jboss/messaging/core/message/impl/ClientMessageImpl.java
   trunk/src/main/org/jboss/messaging/core/message/impl/MessageReferenceImpl.java
   trunk/src/main/org/jboss/messaging/core/message/impl/ServerMessageImpl.java
Modified:
   trunk/docs/examples/messaging/src/org/jboss/messaging/example/SSLClient.java
   trunk/docs/examples/messaging/src/org/jboss/messaging/example/SimpleClient.java
   trunk/docs/examples/messaging/src/org/jboss/messaging/example/SimpleExample.java
   trunk/src/main/org/jboss/messaging/core/client/ClientBrowser.java
   trunk/src/main/org/jboss/messaging/core/client/ClientConsumer.java
   trunk/src/main/org/jboss/messaging/core/client/ClientProducer.java
   trunk/src/main/org/jboss/messaging/core/client/MessageHandler.java
   trunk/src/main/org/jboss/messaging/core/client/impl/ClientBrowserImpl.java
   trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerImpl.java
   trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerInternal.java
   trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java
   trunk/src/main/org/jboss/messaging/core/filter/Filter.java
   trunk/src/main/org/jboss/messaging/core/filter/impl/FilterImpl.java
   trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerManagementImpl.java
   trunk/src/main/org/jboss/messaging/core/paging/PagingManager.java
   trunk/src/main/org/jboss/messaging/core/persistence/StorageManager.java
   trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java
   trunk/src/main/org/jboss/messaging/core/persistence/impl/nullpm/NullStorageManager.java
   trunk/src/main/org/jboss/messaging/core/postoffice/PostOffice.java
   trunk/src/main/org/jboss/messaging/core/postoffice/impl/PostOfficeImpl.java
   trunk/src/main/org/jboss/messaging/core/remoting/impl/codec/ProducerSendMessageCodec.java
   trunk/src/main/org/jboss/messaging/core/remoting/impl/codec/ReceiveMessageCodec.java
   trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/ProducerSendMessage.java
   trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/ReceiveMessage.java
   trunk/src/main/org/jboss/messaging/core/server/Consumer.java
   trunk/src/main/org/jboss/messaging/core/server/Delivery.java
   trunk/src/main/org/jboss/messaging/core/server/Queue.java
   trunk/src/main/org/jboss/messaging/core/server/ServerProducer.java
   trunk/src/main/org/jboss/messaging/core/server/ServerSession.java
   trunk/src/main/org/jboss/messaging/core/server/impl/DeliveryImpl.java
   trunk/src/main/org/jboss/messaging/core/server/impl/QueueImpl.java
   trunk/src/main/org/jboss/messaging/core/server/impl/ServerBrowserImpl.java
   trunk/src/main/org/jboss/messaging/core/server/impl/ServerConsumerImpl.java
   trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerImpl.java
   trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
   trunk/src/main/org/jboss/messaging/core/transaction/Transaction.java
   trunk/src/main/org/jboss/messaging/core/transaction/impl/TransactionImpl.java
   trunk/src/main/org/jboss/messaging/jms/client/JBossBytesMessage.java
   trunk/src/main/org/jboss/messaging/jms/client/JBossMapMessage.java
   trunk/src/main/org/jboss/messaging/jms/client/JBossMessage.java
   trunk/src/main/org/jboss/messaging/jms/client/JBossMessageConsumer.java
   trunk/src/main/org/jboss/messaging/jms/client/JBossObjectMessage.java
   trunk/src/main/org/jboss/messaging/jms/client/JBossQueueBrowser.java
   trunk/src/main/org/jboss/messaging/jms/client/JBossStreamMessage.java
   trunk/src/main/org/jboss/messaging/jms/client/JBossTextMessage.java
   trunk/src/main/org/jboss/messaging/jms/client/JMSMessageListenerWrapper.java
   trunk/tests/src/org/jboss/messaging/tests/integration/CoreClientTest.java
   trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/ClientCrashTest.java
   trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/CrashClient.java
   trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/GracefulClient.java
   trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/PacketFilterTest.java
   trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/ssl/CoreClientOverSSL.java
   trunk/tests/src/org/jboss/messaging/tests/unit/core/filter/impl/FilterTest.java
   trunk/tests/src/org/jboss/messaging/tests/unit/core/message/impl/MessageTest.java
   trunk/tests/src/org/jboss/messaging/tests/unit/core/postoffice/impl/PostOfficeTest.java
   trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/QueueTest.java
   trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/concurrent/QueueTest.java
   trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/fakes/FakeConsumer.java
   trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/fakes/FakeFilter.java
   trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/timing/QueueTest.java
   trunk/tests/src/org/jboss/messaging/tests/unit/core/transaction/impl/TransactionTest.java
   trunk/tests/src/org/jboss/messaging/tests/util/UnitTestCase.java
Log:
Moved client messsage and server message into proper directories


Modified: trunk/docs/examples/messaging/src/org/jboss/messaging/example/SSLClient.java
===================================================================
--- trunk/docs/examples/messaging/src/org/jboss/messaging/example/SSLClient.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/docs/examples/messaging/src/org/jboss/messaging/example/SSLClient.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -24,17 +24,17 @@
 import org.jboss.messaging.core.client.ClientConnection;
 import org.jboss.messaging.core.client.ClientConnectionFactory;
 import org.jboss.messaging.core.client.ClientConsumer;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientProducer;
 import org.jboss.messaging.core.client.ClientSession;
 import org.jboss.messaging.core.client.ConnectionParams;
 import org.jboss.messaging.core.client.Location;
 import org.jboss.messaging.core.client.impl.ClientConnectionFactoryImpl;
+import org.jboss.messaging.core.client.impl.ClientMessageImpl;
 import org.jboss.messaging.core.client.impl.ConnectionParamsImpl;
 import org.jboss.messaging.core.client.impl.LocationImpl;
 import org.jboss.messaging.core.exception.MessagingException;
-import org.jboss.messaging.core.message.ClientMessage;
 import org.jboss.messaging.core.message.Message;
-import org.jboss.messaging.core.message.impl.ClientMessageImpl;
 import org.jboss.messaging.core.remoting.TransportType;
 import org.jboss.messaging.jms.client.JBossTextMessage;
 import org.jboss.messaging.util.SimpleString;

Modified: trunk/docs/examples/messaging/src/org/jboss/messaging/example/SimpleClient.java
===================================================================
--- trunk/docs/examples/messaging/src/org/jboss/messaging/example/SimpleClient.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/docs/examples/messaging/src/org/jboss/messaging/example/SimpleClient.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -24,17 +24,17 @@
 import org.jboss.messaging.core.client.ClientConnection;
 import org.jboss.messaging.core.client.ClientConnectionFactory;
 import org.jboss.messaging.core.client.ClientConsumer;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientProducer;
 import org.jboss.messaging.core.client.ClientSession;
 import org.jboss.messaging.core.client.ConnectionParams;
 import org.jboss.messaging.core.client.Location;
 import org.jboss.messaging.core.client.impl.ClientConnectionFactoryImpl;
+import org.jboss.messaging.core.client.impl.ClientMessageImpl;
 import org.jboss.messaging.core.client.impl.ConnectionParamsImpl;
 import org.jboss.messaging.core.client.impl.LocationImpl;
 import org.jboss.messaging.core.exception.MessagingException;
-import org.jboss.messaging.core.message.ClientMessage;
 import org.jboss.messaging.core.message.Message;
-import org.jboss.messaging.core.message.impl.ClientMessageImpl;
 import org.jboss.messaging.core.remoting.TransportType;
 import org.jboss.messaging.jms.client.JBossTextMessage;
 import org.jboss.messaging.util.SimpleString;

Modified: trunk/docs/examples/messaging/src/org/jboss/messaging/example/SimpleExample.java
===================================================================
--- trunk/docs/examples/messaging/src/org/jboss/messaging/example/SimpleExample.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/docs/examples/messaging/src/org/jboss/messaging/example/SimpleExample.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -26,18 +26,18 @@
 import org.jboss.messaging.core.client.ClientConnection;
 import org.jboss.messaging.core.client.ClientConnectionFactory;
 import org.jboss.messaging.core.client.ClientConsumer;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientProducer;
 import org.jboss.messaging.core.client.ClientSession;
 import org.jboss.messaging.core.client.ConnectionParams;
 import org.jboss.messaging.core.client.Location;
 import org.jboss.messaging.core.client.impl.ClientConnectionFactoryImpl;
+import org.jboss.messaging.core.client.impl.ClientMessageImpl;
 import org.jboss.messaging.core.client.impl.ConnectionParamsImpl;
 import org.jboss.messaging.core.client.impl.LocationImpl;
 import org.jboss.messaging.core.config.impl.ConfigurationImpl;
 import org.jboss.messaging.core.exception.MessagingException;
-import org.jboss.messaging.core.message.ClientMessage;
 import org.jboss.messaging.core.message.Message;
-import org.jboss.messaging.core.message.impl.ClientMessageImpl;
 import org.jboss.messaging.core.remoting.TransportType;
 import org.jboss.messaging.core.security.CheckType;
 import org.jboss.messaging.core.security.JBMSecurityManager;

Modified: trunk/src/main/org/jboss/messaging/core/client/ClientBrowser.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/ClientBrowser.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/client/ClientBrowser.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -8,7 +8,6 @@
 package org.jboss.messaging.core.client;
 
 import org.jboss.messaging.core.exception.MessagingException;
-import org.jboss.messaging.core.message.ClientMessage;
 
 /**
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>

Modified: trunk/src/main/org/jboss/messaging/core/client/ClientConsumer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/ClientConsumer.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/client/ClientConsumer.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -8,7 +8,6 @@
 package org.jboss.messaging.core.client;
 
 import org.jboss.messaging.core.exception.MessagingException;
-import org.jboss.messaging.core.message.ClientMessage;
 
 /**
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>

Copied: trunk/src/main/org/jboss/messaging/core/client/ClientMessage.java (from rev 4162, trunk/src/main/org/jboss/messaging/core/message/ClientMessage.java)
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/ClientMessage.java	                        (rev 0)
+++ trunk/src/main/org/jboss/messaging/core/client/ClientMessage.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -0,0 +1,43 @@
+/*
+  * 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.messaging.core.client;
+
+import org.jboss.messaging.core.message.Message;
+
+/**
+ * 
+ * A ClientMessage
+ * 
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ *
+ */
+public interface ClientMessage extends Message
+{
+   int getDeliveryCount();
+   
+   void setDeliveryCount(int deliveryCount);
+   
+   long getDeliveryID();
+   
+   void setDeliveryID(long deliveryID);
+   
+}

Modified: trunk/src/main/org/jboss/messaging/core/client/ClientProducer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/ClientProducer.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/client/ClientProducer.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -8,7 +8,6 @@
 package org.jboss.messaging.core.client;
 
 import org.jboss.messaging.core.exception.MessagingException;
-import org.jboss.messaging.core.message.ClientMessage;
 import org.jboss.messaging.util.SimpleString;
 
 /**

Modified: trunk/src/main/org/jboss/messaging/core/client/MessageHandler.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/MessageHandler.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/client/MessageHandler.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -21,7 +21,6 @@
    */
 package org.jboss.messaging.core.client;
 
-import org.jboss.messaging.core.message.ClientMessage;
 
 /**
  * 

Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientBrowserImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientBrowserImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientBrowserImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -27,8 +27,8 @@
 import static org.jboss.messaging.core.remoting.impl.wireformat.PacketType.SESS_BROWSER_RESET;
 
 import org.jboss.messaging.core.client.ClientBrowser;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.exception.MessagingException;
-import org.jboss.messaging.core.message.ClientMessage;
 import org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl;
 import org.jboss.messaging.core.remoting.impl.wireformat.ReceiveMessage;
 import org.jboss.messaging.core.remoting.impl.wireformat.SessionBrowserHasNextMessageResponseMessage;

Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -27,12 +27,12 @@
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.MessageHandler;
 import org.jboss.messaging.core.exception.MessagingException;
 import org.jboss.messaging.core.list.PriorityLinkedList;
 import org.jboss.messaging.core.list.impl.PriorityLinkedListImpl;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
 import org.jboss.messaging.core.remoting.impl.wireformat.ConsumerFlowTokenMessage;
 import org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl;
 

Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerInternal.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerInternal.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerInternal.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -7,8 +7,8 @@
 package org.jboss.messaging.core.client.impl;
 
 import org.jboss.messaging.core.client.ClientConsumer;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.exception.MessagingException;
-import org.jboss.messaging.core.message.ClientMessage;
 
 /**
  * 

Copied: trunk/src/main/org/jboss/messaging/core/client/impl/ClientMessageImpl.java (from rev 4162, trunk/src/main/org/jboss/messaging/core/message/impl/ClientMessageImpl.java)
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientMessageImpl.java	                        (rev 0)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientMessageImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -0,0 +1,81 @@
+/*
+ * 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.messaging.core.client.impl;
+
+import org.jboss.messaging.core.client.ClientMessage;
+import org.jboss.messaging.core.message.impl.MessageImpl;
+
+/**
+ * 
+ * A ClientMessageImpl
+ * 
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ *
+ */
+public class ClientMessageImpl extends MessageImpl implements ClientMessage
+{
+   private int deliveryCount;
+   
+   private long deliveryID;
+   
+   /*
+    * Constructor for when reading from network
+    */
+   public ClientMessageImpl(final int deliveryCount, final long deliveryID)
+   {      
+      super();
+      
+      this.deliveryCount = deliveryCount;
+      
+      this.deliveryID = deliveryID;
+   }
+   
+   /*
+    * Construct a message before sending
+    */
+   public ClientMessageImpl(final int type, final boolean durable, final long expiration,
+                            final long timestamp, final byte priority)
+   {
+      super(type, durable, expiration, timestamp, priority);
+   }
+   
+   public void setDeliveryCount(final int deliveryCount)
+   {
+      this.deliveryCount = deliveryCount;
+   }
+   
+   public int getDeliveryCount()
+   {
+      return this.deliveryCount;
+   }
+   
+   public void setDeliveryID(final long deliveryID)
+   {
+      this.deliveryID = deliveryID;
+   }
+   
+   public long getDeliveryID()
+   {
+      return this.deliveryID;
+   }
+
+}

Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -22,9 +22,9 @@
 package org.jboss.messaging.core.client.impl;
 
 import org.jboss.messaging.core.client.AcknowledgementHandler;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.exception.MessagingException;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
 import org.jboss.messaging.core.remoting.impl.wireformat.ProducerSendMessage;
 import org.jboss.messaging.util.SimpleString;
 import org.jboss.messaging.util.TokenBucketLimiter;

Modified: trunk/src/main/org/jboss/messaging/core/filter/Filter.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/filter/Filter.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/filter/Filter.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -21,7 +21,7 @@
  */
 package org.jboss.messaging.core.filter;
 
-import org.jboss.messaging.core.message.ServerMessage;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.util.SimpleString;
 
 /**

Modified: trunk/src/main/org/jboss/messaging/core/filter/impl/FilterImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/filter/impl/FilterImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/filter/impl/FilterImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -27,7 +27,7 @@
 import org.jboss.messaging.core.exception.MessagingException;
 import org.jboss.messaging.core.filter.Filter;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ServerMessage;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.util.SimpleString;
 
 /**

Modified: trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerManagementImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerManagementImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerManagementImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -37,9 +37,9 @@
 import org.jboss.messaging.core.filter.impl.FilterImpl;
 import org.jboss.messaging.core.management.MessagingServerManagement;
 import org.jboss.messaging.core.message.Message;
-import org.jboss.messaging.core.message.MessageReference;
 import org.jboss.messaging.core.messagecounter.MessageCounter;
 import org.jboss.messaging.core.postoffice.Binding;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.MessagingComponent;
 import org.jboss.messaging.core.server.MessagingServer;
 import org.jboss.messaging.core.server.Queue;

Deleted: trunk/src/main/org/jboss/messaging/core/message/ClientMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/message/ClientMessage.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/message/ClientMessage.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -1,41 +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.messaging.core.message;
-
-/**
- * 
- * A ClientMessage
- * 
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- *
- */
-public interface ClientMessage extends Message
-{
-   int getDeliveryCount();
-   
-   void setDeliveryCount(int deliveryCount);
-   
-   long getDeliveryID();
-   
-   void setDeliveryID(long deliveryID);
-   
-}

Deleted: trunk/src/main/org/jboss/messaging/core/message/MessageReference.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/message/MessageReference.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/message/MessageReference.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -1,73 +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.messaging.core.message;
-
-import org.jboss.messaging.core.persistence.StorageManager;
-import org.jboss.messaging.core.postoffice.PostOffice;
-import org.jboss.messaging.core.server.Queue;
-import org.jboss.messaging.core.settings.HierarchicalRepository;
-import org.jboss.messaging.core.settings.impl.QueueSettings;
-
-/**
- * A reference to a message.
- * 
- * Channels store message references rather than the messages themselves.
- * 
- * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision: 3020 $</tt>
- *
- * $Id: MessageReference.java 3020 2007-08-21 15:46:38Z timfox $
- */
-public interface MessageReference
-{      
-   ServerMessage getMessage();
-   
-   MessageReference copy(Queue queue);
-   
-   /**
-    * 
-    * @return The time in the future that delivery will be delayed until, or zero if
-    * no scheduled delivery will occur
-    */
-   long getScheduledDeliveryTime();
-   
-   void setScheduledDeliveryTime(long scheduledDeliveryTime);
-   
-
-   int getDeliveryCount();
-   
-   void setDeliveryCount(int deliveryCount);        
-   
-   void incrementDeliveryCount();
-   
-   Queue getQueue();
-   
-   boolean cancel(StorageManager persistenceManager, PostOffice postOffice,
-   		         HierarchicalRepository<QueueSettings> queueSettingsRepository) throws Exception;  
-   
-   void expire(StorageManager persistenceManager, PostOffice postOffice,
-   		      HierarchicalRepository<QueueSettings> queueSettingsRepository) throws Exception;
-
-}
-
-

Deleted: trunk/src/main/org/jboss/messaging/core/message/ServerMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/message/ServerMessage.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/message/ServerMessage.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -1,53 +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.messaging.core.message;
-
-import org.jboss.messaging.core.server.Queue;
-
-/**
- * 
- * A ServerMessage
- * 
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- *
- */
-public interface ServerMessage extends Message
-{
-   long getMessageID();
-   
-   void setMessageID(long id);
-
-   long getConnectionID();
-   
-   void setConnectionID(long connectionID);
-   
-   MessageReference createReference(Queue queue);   
-
-   void decrementDurableRefCount();
-   
-   void incrementDurableRefCount();
-   
-   int getDurableRefCount();
-   
-   ServerMessage copy();
-}
-

Deleted: trunk/src/main/org/jboss/messaging/core/message/impl/ClientMessageImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/message/impl/ClientMessageImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/message/impl/ClientMessageImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -1,80 +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.messaging.core.message.impl;
-
-import org.jboss.messaging.core.message.ClientMessage;
-
-/**
- * 
- * A ClientMessageImpl
- * 
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- *
- */
-public class ClientMessageImpl extends MessageImpl implements ClientMessage
-{
-   private int deliveryCount;
-   
-   private long deliveryID;
-   
-   /*
-    * Constructor for when reading from network
-    */
-   public ClientMessageImpl(final int deliveryCount, final long deliveryID)
-   {      
-      super();
-      
-      this.deliveryCount = deliveryCount;
-      
-      this.deliveryID = deliveryID;
-   }
-   
-   /*
-    * Construct a message before sending
-    */
-   public ClientMessageImpl(final int type, final boolean durable, final long expiration,
-                            final long timestamp, final byte priority)
-   {
-      super(type, durable, expiration, timestamp, priority);
-   }
-   
-   public void setDeliveryCount(final int deliveryCount)
-   {
-      this.deliveryCount = deliveryCount;
-   }
-   
-   public int getDeliveryCount()
-   {
-      return this.deliveryCount;
-   }
-   
-   public void setDeliveryID(final long deliveryID)
-   {
-      this.deliveryID = deliveryID;
-   }
-   
-   public long getDeliveryID()
-   {
-      return this.deliveryID;
-   }
-
-}

Deleted: trunk/src/main/org/jboss/messaging/core/message/impl/MessageReferenceImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/message/impl/MessageReferenceImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/message/impl/MessageReferenceImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -1,259 +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.messaging.core.message.impl;
-
-import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.Message;
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
-import org.jboss.messaging.core.persistence.StorageManager;
-import org.jboss.messaging.core.postoffice.Binding;
-import org.jboss.messaging.core.postoffice.PostOffice;
-import org.jboss.messaging.core.server.Queue;
-import org.jboss.messaging.core.settings.HierarchicalRepository;
-import org.jboss.messaging.core.settings.impl.QueueSettings;
-import org.jboss.messaging.core.transaction.Transaction;
-import org.jboss.messaging.core.transaction.impl.TransactionImpl;
-import org.jboss.messaging.util.SimpleString;
-
-/**
- * Implementation of a MessageReference
- *
- * @author <a href="mailto:tim.fox at jboss.com>Tim Fox</a>
- * @version <tt>1.3</tt>
- *
- * MessageReferenceImpl.java,v 1.3 2006/02/23 17:45:57 timfox Exp
- */
-public class MessageReferenceImpl implements MessageReference
-{   
-   private static final Logger log = Logger.getLogger(MessageReferenceImpl.class);
-   
-   // Attributes ----------------------------------------------------
-
-   private boolean trace = log.isTraceEnabled();
-   
-   private volatile int deliveryCount;   
-   
-   private long scheduledDeliveryTime;
-   
-   private ServerMessage message;
-   
-   private Queue queue;
-   
-   // Constructors --------------------------------------------------
-
-   public MessageReferenceImpl()
-   {
-   }
-
-   public MessageReferenceImpl(final MessageReferenceImpl other, final Queue queue)
-   {
-      this.deliveryCount = other.deliveryCount;
-      
-      this.scheduledDeliveryTime = other.scheduledDeliveryTime;       
-      
-      this.message = other.message;
-      
-      this.queue = queue;
-   }
-   
-   protected MessageReferenceImpl(final ServerMessage message, final Queue queue)
-   {
-   	this.message = message;
-   	
-   	this.queue = queue;
-   }   
-   
-   // MessageReference implementation -------------------------------
-   
-   public MessageReference copy(final Queue queue)
-   {
-   	return new MessageReferenceImpl(this, queue);
-   }
-   
-   public int getDeliveryCount()
-   {
-      return deliveryCount;
-   }
-   
-   public void setDeliveryCount(final int deliveryCount)
-   {
-      this.deliveryCount = deliveryCount;
-   }
-   
-   public void incrementDeliveryCount()
-   {
-      deliveryCount++;
-   }
-   
-   public long getScheduledDeliveryTime()
-   {
-      return scheduledDeliveryTime;
-   }
-
-   public void setScheduledDeliveryTime(final long scheduledDeliveryTime)
-   {
-      this.scheduledDeliveryTime = scheduledDeliveryTime;
-   }
-      
-   public ServerMessage getMessage()
-   {
-      return message;
-   }         
-   
-   public Queue getQueue()
-   {
-      return queue;
-   }
-   
-   public boolean cancel(final StorageManager persistenceManager, final PostOffice postOffice,
-   		                final HierarchicalRepository<QueueSettings> queueSettingsRepository) throws Exception
-   {      
-      if (message.isDurable() && queue.isDurable())
-      {
-         persistenceManager.updateDeliveryCount(this);
-      }
-              
-      queue.referenceCancelled();
-
-      int maxDeliveries = queueSettingsRepository.getMatch(queue.getName().toString()).getMaxDeliveryAttempts();
-      
-      if (maxDeliveries > 0 && deliveryCount >= maxDeliveries)
-      {
-         SimpleString DLQ = queueSettingsRepository.getMatch(queue.getName().toString()).getDLQ();
-         
-         Transaction tx = new TransactionImpl(persistenceManager, postOffice);
-                  
-         if (DLQ != null)
-         {
-         	Binding binding = postOffice.getBinding(DLQ);
-         	
-         	if (binding == null)
-         	{
-         		binding = postOffice.addBinding(DLQ, DLQ, null, true, false);
-         	}
-         	
-            ServerMessage copyMessage = makeCopyForDLQOrExpiry(false, persistenceManager);
-            
-            tx.addMessage(copyMessage);
-            
-            tx.addAcknowledgement(this);      
-         }
-         else
-         {
-            //No DLQ
-            
-            log.warn("Message has reached maximum delivery attempts, no DLQ is configured so dropping it");
-            
-            tx.addAcknowledgement(this);   
-         }       
-         
-         return false;
-      }
-      else
-      {
-         return true;
-      }
-   }
-   
-   public void expire(final StorageManager persistenceManager, final PostOffice postOffice,
-   		final HierarchicalRepository<QueueSettings> queueSettingsRepository) throws Exception
-   {
-      SimpleString expiryQueue = queueSettingsRepository.getMatch(queue.getName().toString()).getExpiryQueue();
-      
-      Transaction tx = new TransactionImpl(persistenceManager, postOffice);
-      
-      log.info("expiring message");
-      
-      if (expiryQueue != null)
-      {
-      	Binding binding = postOffice.getBinding(expiryQueue);
-
-      	if (binding == null)
-      	{
-      		binding = postOffice.addBinding(expiryQueue, expiryQueue, null, true, false);
-      	}
-      	
-         ServerMessage copyMessage = makeCopyForDLQOrExpiry(false, persistenceManager);
-         
-         copyMessage.setDestination(binding.getAddress());
-         
-         tx.addMessage(copyMessage);
-         
-         tx.addAcknowledgement(this);                 
-      }
-      else
-      {
-         log.warn("Message has expired, no expiry queue is configured so dropping it");
-         
-         tx.addAcknowledgement(this);
-      }
-      
-      tx.commit();
-   }
-
-   // Public --------------------------------------------------------
-
-   public String toString()
-   {
-      return "Reference[" + getMessage().getMessageID() + "]:" + (getMessage().isDurable() ? "RELIABLE" : "NON-RELIABLE");
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------   
-   
-   // Private -------------------------------------------------------
-   
-   private ServerMessage makeCopyForDLQOrExpiry(final boolean expiry, final StorageManager pm) throws Exception
-   {
-      /*
-       We copy the message and send that to the dlq/expiry queue - this is
-       because otherwise we may end up with a ref with the same message id in the
-       queue more than once which would barf - this might happen if the same message had been
-       expire from multiple subscriptions of a topic for example
-       We set headers that hold the original message destination, expiry time
-       and original message id
-      */
-
-      ServerMessage copy = message.copy();
-      
-      long newMessageId = pm.generateMessageID();
-      
-      copy.setMessageID(newMessageId);
-      
-      // reset expiry
-      copy.setExpiration(0);
-      
-      if (expiry)
-      {
-         long actualExpiryTime = System.currentTimeMillis();
-      
-         copy.putLongProperty(Message.HDR_ACTUAL_EXPIRY_TIME, actualExpiryTime);
-      }
-      
-      return copy;
-   }
-
-   // Inner classes -------------------------------------------------
-   
-}
\ No newline at end of file

Deleted: trunk/src/main/org/jboss/messaging/core/message/impl/ServerMessageImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/message/impl/ServerMessageImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/message/impl/ServerMessageImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -1,139 +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.messaging.core.message.impl;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
-import org.jboss.messaging.core.server.Queue;
-
-/**
- * 
- * A ServerMessageImpl
- * 
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- *
- */
-public class ServerMessageImpl extends MessageImpl implements ServerMessage
-{
-   private long messageID;
-   
-   private long connectionID;
-   
-   private final AtomicInteger durableRefCount = new AtomicInteger(0);
-              
-   /*
-    * Constructor for when reading from network
-    */
-   public ServerMessageImpl()
-   {      
-   }
-   
-   /*
-    * Construct a MessageImpl from storage
-    */
-   public ServerMessageImpl(final long messageID)
-   {
-      super();
-      
-      this.messageID = messageID;      
-   }
-   
-   /*
-    * Copy constructor
-    */
-   public ServerMessageImpl(final ServerMessageImpl other)
-   {
-      super(other);
-      
-      this.messageID = other.messageID;
-      
-      this.connectionID = other.connectionID;
-   }
-   
-   /**
-    * Only used in testing
-    */
-   public ServerMessageImpl(final int type, final boolean durable, final long expiration,
-                            final long timestamp, final byte priority)
-   {
-      super(type, durable, expiration, timestamp, priority);
-   }
-   
-   public long getMessageID()
-   {
-      return messageID;
-   }
-   
-   public void setMessageID(final long id)
-   {
-      this.messageID = id;
-   }
-   
-   public long getConnectionID()
-   {
-      return connectionID;
-   }
-   
-   public void setConnectionID(final long connectionID)
-   {
-      this.connectionID = connectionID;
-   }
-   
-   public MessageReference createReference(final Queue queue)
-   {
-      MessageReference ref = new MessageReferenceImpl(this, queue);
-      
-      //references.add(ref);
-      
-      if (durable && queue.isDurable())
-      {
-         durableRefCount.incrementAndGet();
-      }
-      
-      return ref;
-   }
-   
-   public int getDurableRefCount()
-   {
-      return durableRefCount.get();
-   }
-   
-   public void decrementDurableRefCount()
-   {
-      durableRefCount.decrementAndGet();
-   }
-   
-   public void incrementDurableRefCount()
-   {
-      durableRefCount.incrementAndGet();
-   }
-     
-   public ServerMessage copy()
-   {
-      return new ServerMessageImpl(this);
-   }
-   
-
-}
-

Modified: trunk/src/main/org/jboss/messaging/core/paging/PagingManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/paging/PagingManager.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/paging/PagingManager.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -1,6 +1,6 @@
 package org.jboss.messaging.core.paging;
 
-import org.jboss.messaging.core.message.MessageReference;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.MessagingComponent;
 import org.jboss.messaging.core.server.Queue;
 

Modified: trunk/src/main/org/jboss/messaging/core/persistence/StorageManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/persistence/StorageManager.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/persistence/StorageManager.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -24,13 +24,13 @@
 import java.util.List;
 import java.util.Map;
 
-import org.jboss.messaging.core.message.ServerMessage;
-import org.jboss.messaging.core.message.MessageReference;
 import org.jboss.messaging.core.postoffice.Binding;
 import org.jboss.messaging.core.postoffice.PostOffice;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.MessagingComponent;
 import org.jboss.messaging.core.server.Queue;
 import org.jboss.messaging.core.server.QueueFactory;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.util.SimpleString;
 
 /**

Modified: trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -24,17 +24,17 @@
 import org.jboss.messaging.core.journal.impl.JournalImpl;
 import org.jboss.messaging.core.journal.impl.NIOSequentialFileFactory;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
-import org.jboss.messaging.core.message.impl.ServerMessageImpl;
 import org.jboss.messaging.core.persistence.StorageManager;
 import org.jboss.messaging.core.postoffice.Binding;
 import org.jboss.messaging.core.postoffice.PostOffice;
 import org.jboss.messaging.core.postoffice.impl.BindingImpl;
 import org.jboss.messaging.core.remoting.impl.mina.BufferWrapper;
 import org.jboss.messaging.core.server.JournalType;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
 import org.jboss.messaging.core.server.QueueFactory;
+import org.jboss.messaging.core.server.ServerMessage;
+import org.jboss.messaging.core.server.impl.ServerMessageImpl;
 import org.jboss.messaging.util.ByteBufferWrapper;
 import org.jboss.messaging.util.MessagingBuffer;
 import org.jboss.messaging.util.SimpleString;

Modified: trunk/src/main/org/jboss/messaging/core/persistence/impl/nullpm/NullStorageManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/persistence/impl/nullpm/NullStorageManager.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/persistence/impl/nullpm/NullStorageManager.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -25,13 +25,13 @@
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicLong;
 
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
 import org.jboss.messaging.core.persistence.StorageManager;
 import org.jboss.messaging.core.postoffice.Binding;
 import org.jboss.messaging.core.postoffice.PostOffice;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
 import org.jboss.messaging.core.server.QueueFactory;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.util.SimpleString;
 
 /**

Modified: trunk/src/main/org/jboss/messaging/core/postoffice/PostOffice.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/postoffice/PostOffice.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/postoffice/PostOffice.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -26,9 +26,9 @@
 import java.util.Set;
 
 import org.jboss.messaging.core.filter.Filter;
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.MessagingComponent;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.util.SimpleString;
 
 /**

Modified: trunk/src/main/org/jboss/messaging/core/postoffice/impl/PostOfficeImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/postoffice/impl/PostOfficeImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/postoffice/impl/PostOfficeImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -35,14 +35,14 @@
 import org.jboss.messaging.core.exception.MessagingException;
 import org.jboss.messaging.core.filter.Filter;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
 import org.jboss.messaging.core.persistence.StorageManager;
 import org.jboss.messaging.core.postoffice.Binding;
 import org.jboss.messaging.core.postoffice.FlowController;
 import org.jboss.messaging.core.postoffice.PostOffice;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
 import org.jboss.messaging.core.server.QueueFactory;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.util.ConcurrentHashSet;
 import org.jboss.messaging.util.ConcurrentSet;
 import org.jboss.messaging.util.SimpleString;

Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/codec/ProducerSendMessageCodec.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/codec/ProducerSendMessageCodec.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/codec/ProducerSendMessageCodec.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -9,9 +9,9 @@
 import static org.jboss.messaging.core.remoting.impl.wireformat.PacketType.PROD_SEND;
 
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ServerMessage;
-import org.jboss.messaging.core.message.impl.ServerMessageImpl;
 import org.jboss.messaging.core.remoting.impl.wireformat.ProducerSendMessage;
+import org.jboss.messaging.core.server.ServerMessage;
+import org.jboss.messaging.core.server.impl.ServerMessageImpl;
 import org.jboss.messaging.util.MessagingBuffer;
 
 /**

Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/codec/ReceiveMessageCodec.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/codec/ReceiveMessageCodec.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/codec/ReceiveMessageCodec.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -8,9 +8,9 @@
 
 import static org.jboss.messaging.core.remoting.impl.wireformat.PacketType.RECEIVE_MSG;
 
+import org.jboss.messaging.core.client.ClientMessage;
+import org.jboss.messaging.core.client.impl.ClientMessageImpl;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
-import org.jboss.messaging.core.message.impl.ClientMessageImpl;
 import org.jboss.messaging.core.remoting.impl.wireformat.ReceiveMessage;
 import org.jboss.messaging.util.MessagingBuffer;
 

Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/ProducerSendMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/ProducerSendMessage.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/ProducerSendMessage.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -8,8 +8,8 @@
 
 import static org.jboss.messaging.core.remoting.impl.wireformat.PacketType.PROD_SEND;
 
-import org.jboss.messaging.core.message.ClientMessage;
-import org.jboss.messaging.core.message.ServerMessage;
+import org.jboss.messaging.core.client.ClientMessage;
+import org.jboss.messaging.core.server.ServerMessage;
 
 /**
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>

Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/ReceiveMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/ReceiveMessage.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/ReceiveMessage.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -8,8 +8,8 @@
 
 import static org.jboss.messaging.core.remoting.impl.wireformat.PacketType.RECEIVE_MSG;
 
-import org.jboss.messaging.core.message.ClientMessage;
-import org.jboss.messaging.core.message.ServerMessage;
+import org.jboss.messaging.core.client.ClientMessage;
+import org.jboss.messaging.core.server.ServerMessage;
 
 /**
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>

Modified: trunk/src/main/org/jboss/messaging/core/server/Consumer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/Consumer.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/server/Consumer.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -21,7 +21,6 @@
   */
 package org.jboss.messaging.core.server;
 
-import org.jboss.messaging.core.message.MessageReference;
 
 
 /**

Modified: trunk/src/main/org/jboss/messaging/core/server/Delivery.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/Delivery.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/server/Delivery.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -21,7 +21,6 @@
   */
 package org.jboss.messaging.core.server;
 
-import org.jboss.messaging.core.message.MessageReference;
 
 /**
  * 

Copied: trunk/src/main/org/jboss/messaging/core/server/MessageReference.java (from rev 4162, trunk/src/main/org/jboss/messaging/core/message/MessageReference.java)
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/MessageReference.java	                        (rev 0)
+++ trunk/src/main/org/jboss/messaging/core/server/MessageReference.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -0,0 +1,72 @@
+/*
+  * 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.messaging.core.server;
+
+import org.jboss.messaging.core.persistence.StorageManager;
+import org.jboss.messaging.core.postoffice.PostOffice;
+import org.jboss.messaging.core.settings.HierarchicalRepository;
+import org.jboss.messaging.core.settings.impl.QueueSettings;
+
+/**
+ * A reference to a message.
+ * 
+ * Channels store message references rather than the messages themselves.
+ * 
+ * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version <tt>$Revision: 3020 $</tt>
+ *
+ * $Id: MessageReference.java 3020 2007-08-21 15:46:38Z timfox $
+ */
+public interface MessageReference
+{      
+   ServerMessage getMessage();
+   
+   MessageReference copy(Queue queue);
+   
+   /**
+    * 
+    * @return The time in the future that delivery will be delayed until, or zero if
+    * no scheduled delivery will occur
+    */
+   long getScheduledDeliveryTime();
+   
+   void setScheduledDeliveryTime(long scheduledDeliveryTime);
+   
+
+   int getDeliveryCount();
+   
+   void setDeliveryCount(int deliveryCount);        
+   
+   void incrementDeliveryCount();
+   
+   Queue getQueue();
+   
+   boolean cancel(StorageManager persistenceManager, PostOffice postOffice,
+   		         HierarchicalRepository<QueueSettings> queueSettingsRepository) throws Exception;  
+   
+   void expire(StorageManager persistenceManager, PostOffice postOffice,
+   		      HierarchicalRepository<QueueSettings> queueSettingsRepository) throws Exception;
+
+}
+
+

Modified: trunk/src/main/org/jboss/messaging/core/server/Queue.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/Queue.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/server/Queue.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -25,7 +25,6 @@
 import java.util.List;
 
 import org.jboss.messaging.core.filter.Filter;
-import org.jboss.messaging.core.message.MessageReference;
 import org.jboss.messaging.core.persistence.StorageManager;
 import org.jboss.messaging.core.postoffice.FlowController;
 import org.jboss.messaging.util.SimpleString;

Copied: trunk/src/main/org/jboss/messaging/core/server/ServerMessage.java (from rev 4162, trunk/src/main/org/jboss/messaging/core/message/ServerMessage.java)
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/ServerMessage.java	                        (rev 0)
+++ trunk/src/main/org/jboss/messaging/core/server/ServerMessage.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -0,0 +1,53 @@
+/*
+  * 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.messaging.core.server;
+
+import org.jboss.messaging.core.message.Message;
+
+/**
+ * 
+ * A ServerMessage
+ * 
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ *
+ */
+public interface ServerMessage extends Message
+{
+   long getMessageID();
+   
+   void setMessageID(long id);
+
+   long getConnectionID();
+   
+   void setConnectionID(long connectionID);
+   
+   MessageReference createReference(Queue queue);   
+
+   void decrementDurableRefCount();
+   
+   void incrementDurableRefCount();
+   
+   int getDurableRefCount();
+   
+   ServerMessage copy();
+}
+

Modified: trunk/src/main/org/jboss/messaging/core/server/ServerProducer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/ServerProducer.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/server/ServerProducer.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -1,6 +1,5 @@
 package org.jboss.messaging.core.server;
 
-import org.jboss.messaging.core.message.ServerMessage;
 
 /**
  * 

Modified: trunk/src/main/org/jboss/messaging/core/server/ServerSession.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/ServerSession.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/server/ServerSession.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -25,8 +25,6 @@
 
 import javax.transaction.xa.Xid;
 
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
 import org.jboss.messaging.core.remoting.impl.wireformat.SessionBindingQueryMessage;
 import org.jboss.messaging.core.remoting.impl.wireformat.SessionBindingQueryResponseMessage;
 import org.jboss.messaging.core.remoting.impl.wireformat.SessionCreateBrowserResponseMessage;

Modified: trunk/src/main/org/jboss/messaging/core/server/impl/DeliveryImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/DeliveryImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/DeliveryImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -23,10 +23,10 @@
 
 import org.jboss.messaging.core.logging.Logger;
 import org.jboss.messaging.core.message.Message;
-import org.jboss.messaging.core.message.MessageReference;
 import org.jboss.messaging.core.remoting.PacketSender;
 import org.jboss.messaging.core.remoting.impl.wireformat.ReceiveMessage;
 import org.jboss.messaging.core.server.Delivery;
+import org.jboss.messaging.core.server.MessageReference;
 
 /**
  * 

Copied: trunk/src/main/org/jboss/messaging/core/server/impl/MessageReferenceImpl.java (from rev 4162, trunk/src/main/org/jboss/messaging/core/message/impl/MessageReferenceImpl.java)
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/MessageReferenceImpl.java	                        (rev 0)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/MessageReferenceImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -0,0 +1,259 @@
+/*
+  * 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.messaging.core.server.impl;
+
+import org.jboss.messaging.core.logging.Logger;
+import org.jboss.messaging.core.message.Message;
+import org.jboss.messaging.core.persistence.StorageManager;
+import org.jboss.messaging.core.postoffice.Binding;
+import org.jboss.messaging.core.postoffice.PostOffice;
+import org.jboss.messaging.core.server.MessageReference;
+import org.jboss.messaging.core.server.Queue;
+import org.jboss.messaging.core.server.ServerMessage;
+import org.jboss.messaging.core.settings.HierarchicalRepository;
+import org.jboss.messaging.core.settings.impl.QueueSettings;
+import org.jboss.messaging.core.transaction.Transaction;
+import org.jboss.messaging.core.transaction.impl.TransactionImpl;
+import org.jboss.messaging.util.SimpleString;
+
+/**
+ * Implementation of a MessageReference
+ *
+ * @author <a href="mailto:tim.fox at jboss.com>Tim Fox</a>
+ * @version <tt>1.3</tt>
+ *
+ * MessageReferenceImpl.java,v 1.3 2006/02/23 17:45:57 timfox Exp
+ */
+public class MessageReferenceImpl implements MessageReference
+{   
+   private static final Logger log = Logger.getLogger(MessageReferenceImpl.class);
+   
+   // Attributes ----------------------------------------------------
+
+   private boolean trace = log.isTraceEnabled();
+   
+   private volatile int deliveryCount;   
+   
+   private long scheduledDeliveryTime;
+   
+   private ServerMessage message;
+   
+   private Queue queue;
+   
+   // Constructors --------------------------------------------------
+
+   public MessageReferenceImpl()
+   {
+   }
+
+   public MessageReferenceImpl(final MessageReferenceImpl other, final Queue queue)
+   {
+      this.deliveryCount = other.deliveryCount;
+      
+      this.scheduledDeliveryTime = other.scheduledDeliveryTime;       
+      
+      this.message = other.message;
+      
+      this.queue = queue;
+   }
+   
+   protected MessageReferenceImpl(final ServerMessage message, final Queue queue)
+   {
+   	this.message = message;
+   	
+   	this.queue = queue;
+   }   
+   
+   // MessageReference implementation -------------------------------
+   
+   public MessageReference copy(final Queue queue)
+   {
+   	return new MessageReferenceImpl(this, queue);
+   }
+   
+   public int getDeliveryCount()
+   {
+      return deliveryCount;
+   }
+   
+   public void setDeliveryCount(final int deliveryCount)
+   {
+      this.deliveryCount = deliveryCount;
+   }
+   
+   public void incrementDeliveryCount()
+   {
+      deliveryCount++;
+   }
+   
+   public long getScheduledDeliveryTime()
+   {
+      return scheduledDeliveryTime;
+   }
+
+   public void setScheduledDeliveryTime(final long scheduledDeliveryTime)
+   {
+      this.scheduledDeliveryTime = scheduledDeliveryTime;
+   }
+      
+   public ServerMessage getMessage()
+   {
+      return message;
+   }         
+   
+   public Queue getQueue()
+   {
+      return queue;
+   }
+   
+   public boolean cancel(final StorageManager persistenceManager, final PostOffice postOffice,
+   		                final HierarchicalRepository<QueueSettings> queueSettingsRepository) throws Exception
+   {      
+      if (message.isDurable() && queue.isDurable())
+      {
+         persistenceManager.updateDeliveryCount(this);
+      }
+              
+      queue.referenceCancelled();
+
+      int maxDeliveries = queueSettingsRepository.getMatch(queue.getName().toString()).getMaxDeliveryAttempts();
+      
+      if (maxDeliveries > 0 && deliveryCount >= maxDeliveries)
+      {
+         SimpleString DLQ = queueSettingsRepository.getMatch(queue.getName().toString()).getDLQ();
+         
+         Transaction tx = new TransactionImpl(persistenceManager, postOffice);
+                  
+         if (DLQ != null)
+         {
+         	Binding binding = postOffice.getBinding(DLQ);
+         	
+         	if (binding == null)
+         	{
+         		binding = postOffice.addBinding(DLQ, DLQ, null, true, false);
+         	}
+         	
+            ServerMessage copyMessage = makeCopyForDLQOrExpiry(false, persistenceManager);
+            
+            tx.addMessage(copyMessage);
+            
+            tx.addAcknowledgement(this);      
+         }
+         else
+         {
+            //No DLQ
+            
+            log.warn("Message has reached maximum delivery attempts, no DLQ is configured so dropping it");
+            
+            tx.addAcknowledgement(this);   
+         }       
+         
+         return false;
+      }
+      else
+      {
+         return true;
+      }
+   }
+   
+   public void expire(final StorageManager persistenceManager, final PostOffice postOffice,
+   		final HierarchicalRepository<QueueSettings> queueSettingsRepository) throws Exception
+   {
+      SimpleString expiryQueue = queueSettingsRepository.getMatch(queue.getName().toString()).getExpiryQueue();
+      
+      Transaction tx = new TransactionImpl(persistenceManager, postOffice);
+      
+      log.info("expiring message");
+      
+      if (expiryQueue != null)
+      {
+      	Binding binding = postOffice.getBinding(expiryQueue);
+
+      	if (binding == null)
+      	{
+      		binding = postOffice.addBinding(expiryQueue, expiryQueue, null, true, false);
+      	}
+      	
+         ServerMessage copyMessage = makeCopyForDLQOrExpiry(false, persistenceManager);
+         
+         copyMessage.setDestination(binding.getAddress());
+         
+         tx.addMessage(copyMessage);
+         
+         tx.addAcknowledgement(this);                 
+      }
+      else
+      {
+         log.warn("Message has expired, no expiry queue is configured so dropping it");
+         
+         tx.addAcknowledgement(this);
+      }
+      
+      tx.commit();
+   }
+
+   // Public --------------------------------------------------------
+
+   public String toString()
+   {
+      return "Reference[" + getMessage().getMessageID() + "]:" + (getMessage().isDurable() ? "RELIABLE" : "NON-RELIABLE");
+   }
+
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------   
+   
+   // Private -------------------------------------------------------
+   
+   private ServerMessage makeCopyForDLQOrExpiry(final boolean expiry, final StorageManager pm) throws Exception
+   {
+      /*
+       We copy the message and send that to the dlq/expiry queue - this is
+       because otherwise we may end up with a ref with the same message id in the
+       queue more than once which would barf - this might happen if the same message had been
+       expire from multiple subscriptions of a topic for example
+       We set headers that hold the original message destination, expiry time
+       and original message id
+      */
+
+      ServerMessage copy = message.copy();
+      
+      long newMessageId = pm.generateMessageID();
+      
+      copy.setMessageID(newMessageId);
+      
+      // reset expiry
+      copy.setExpiration(0);
+      
+      if (expiry)
+      {
+         long actualExpiryTime = System.currentTimeMillis();
+      
+         copy.putLongProperty(Message.HDR_ACTUAL_EXPIRY_TIME, actualExpiryTime);
+      }
+      
+      return copy;
+   }
+
+   // Inner classes -------------------------------------------------
+   
+}
\ No newline at end of file

Modified: trunk/src/main/org/jboss/messaging/core/server/impl/QueueImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/QueueImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/QueueImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -36,12 +36,12 @@
 import org.jboss.messaging.core.list.PriorityLinkedList;
 import org.jboss.messaging.core.list.impl.PriorityLinkedListImpl;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.MessageReference;
 import org.jboss.messaging.core.persistence.StorageManager;
 import org.jboss.messaging.core.postoffice.FlowController;
 import org.jboss.messaging.core.server.Consumer;
 import org.jboss.messaging.core.server.DistributionPolicy;
 import org.jboss.messaging.core.server.HandleStatus;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
 import org.jboss.messaging.core.transaction.Transaction;
 import org.jboss.messaging.core.transaction.impl.TransactionImpl;

Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerBrowserImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerBrowserImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerBrowserImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -32,8 +32,6 @@
 import org.jboss.messaging.core.filter.impl.FilterImpl;
 import org.jboss.messaging.core.logging.Logger;
 import org.jboss.messaging.core.message.Message;
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
 import org.jboss.messaging.core.remoting.Packet;
 import org.jboss.messaging.core.remoting.PacketHandler;
 import org.jboss.messaging.core.remoting.PacketSender;
@@ -41,7 +39,9 @@
 import org.jboss.messaging.core.remoting.impl.wireformat.PacketType;
 import org.jboss.messaging.core.remoting.impl.wireformat.ReceiveMessage;
 import org.jboss.messaging.core.remoting.impl.wireformat.SessionBrowserHasNextMessageResponseMessage;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.core.server.ServerSession;
 import org.jboss.messaging.util.SimpleString;
 

Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerConsumerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerConsumerImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerConsumerImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -25,13 +25,13 @@
 
 import org.jboss.messaging.core.filter.Filter;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
 import org.jboss.messaging.core.persistence.StorageManager;
 import org.jboss.messaging.core.postoffice.PostOffice;
 import org.jboss.messaging.core.server.HandleStatus;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
 import org.jboss.messaging.core.server.ServerConsumer;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.core.server.ServerSession;
 import org.jboss.messaging.core.settings.HierarchicalRepository;
 import org.jboss.messaging.core.settings.impl.QueueSettings;

Copied: trunk/src/main/org/jboss/messaging/core/server/impl/ServerMessageImpl.java (from rev 4162, trunk/src/main/org/jboss/messaging/core/message/impl/ServerMessageImpl.java)
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerMessageImpl.java	                        (rev 0)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerMessageImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -0,0 +1,140 @@
+/*
+ * 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.messaging.core.server.impl;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.jboss.messaging.core.message.impl.MessageImpl;
+import org.jboss.messaging.core.server.MessageReference;
+import org.jboss.messaging.core.server.Queue;
+import org.jboss.messaging.core.server.ServerMessage;
+
+/**
+ * 
+ * A ServerMessageImpl
+ * 
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ *
+ */
+public class ServerMessageImpl extends MessageImpl implements ServerMessage
+{
+   private long messageID;
+   
+   private long connectionID;
+   
+   private final AtomicInteger durableRefCount = new AtomicInteger(0);
+              
+   /*
+    * Constructor for when reading from network
+    */
+   public ServerMessageImpl()
+   {      
+   }
+   
+   /*
+    * Construct a MessageImpl from storage
+    */
+   public ServerMessageImpl(final long messageID)
+   {
+      super();
+      
+      this.messageID = messageID;      
+   }
+   
+   /*
+    * Copy constructor
+    */
+   public ServerMessageImpl(final ServerMessageImpl other)
+   {
+      super(other);
+      
+      this.messageID = other.messageID;
+      
+      this.connectionID = other.connectionID;
+   }
+   
+   /**
+    * Only used in testing
+    */
+   public ServerMessageImpl(final int type, final boolean durable, final long expiration,
+                            final long timestamp, final byte priority)
+   {
+      super(type, durable, expiration, timestamp, priority);
+   }
+   
+   public long getMessageID()
+   {
+      return messageID;
+   }
+   
+   public void setMessageID(final long id)
+   {
+      this.messageID = id;
+   }
+   
+   public long getConnectionID()
+   {
+      return connectionID;
+   }
+   
+   public void setConnectionID(final long connectionID)
+   {
+      this.connectionID = connectionID;
+   }
+   
+   public MessageReference createReference(final Queue queue)
+   {
+      MessageReference ref = new MessageReferenceImpl(this, queue);
+      
+      //references.add(ref);
+      
+      if (durable && queue.isDurable())
+      {
+         durableRefCount.incrementAndGet();
+      }
+      
+      return ref;
+   }
+   
+   public int getDurableRefCount()
+   {
+      return durableRefCount.get();
+   }
+   
+   public void decrementDurableRefCount()
+   {
+      durableRefCount.decrementAndGet();
+   }
+   
+   public void incrementDurableRefCount()
+   {
+      durableRefCount.incrementAndGet();
+   }
+     
+   public ServerMessage copy()
+   {
+      return new ServerMessageImpl(this);
+   }
+   
+
+}
+

Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -22,11 +22,11 @@
 package org.jboss.messaging.core.server.impl;
 
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ServerMessage;
 import org.jboss.messaging.core.postoffice.FlowController;
 import org.jboss.messaging.core.remoting.Packet;
 import org.jboss.messaging.core.remoting.PacketSender;
 import org.jboss.messaging.core.remoting.impl.wireformat.ProducerReceiveTokensMessage;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.core.server.ServerProducer;
 import org.jboss.messaging.core.server.ServerSession;
 import org.jboss.messaging.util.SimpleString;

Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -38,8 +38,6 @@
 import org.jboss.messaging.core.filter.Filter;
 import org.jboss.messaging.core.filter.impl.FilterImpl;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
 import org.jboss.messaging.core.persistence.StorageManager;
 import org.jboss.messaging.core.postoffice.Binding;
 import org.jboss.messaging.core.postoffice.FlowController;
@@ -58,9 +56,11 @@
 import org.jboss.messaging.core.security.SecurityStore;
 import org.jboss.messaging.core.server.Delivery;
 import org.jboss.messaging.core.server.HandleStatus;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
 import org.jboss.messaging.core.server.ServerConnection;
 import org.jboss.messaging.core.server.ServerConsumer;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.core.server.ServerProducer;
 import org.jboss.messaging.core.server.ServerSession;
 import org.jboss.messaging.core.settings.HierarchicalRepository;

Modified: trunk/src/main/org/jboss/messaging/core/transaction/Transaction.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/transaction/Transaction.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/transaction/Transaction.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -25,8 +25,8 @@
 
 import javax.transaction.xa.Xid;
 
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
+import org.jboss.messaging.core.server.MessageReference;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.core.settings.HierarchicalRepository;
 import org.jboss.messaging.core.settings.impl.QueueSettings;
 

Modified: trunk/src/main/org/jboss/messaging/core/transaction/impl/TransactionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/transaction/impl/TransactionImpl.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/core/transaction/impl/TransactionImpl.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -30,11 +30,11 @@
 import javax.transaction.xa.Xid;
 
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
 import org.jboss.messaging.core.persistence.StorageManager;
 import org.jboss.messaging.core.postoffice.PostOffice;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.core.settings.HierarchicalRepository;
 import org.jboss.messaging.core.settings.impl.QueueSettings;
 import org.jboss.messaging.core.transaction.Transaction;

Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossBytesMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossBytesMessage.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossBytesMessage.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -28,9 +28,9 @@
 import javax.jms.MessageEOFException;
 import javax.jms.MessageFormatException;
 
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientSession;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
 import org.jboss.messaging.core.remoting.impl.mina.BufferWrapper;
 
 /**

Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossMapMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossMapMessage.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossMapMessage.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -30,8 +30,8 @@
 import javax.jms.MapMessage;
 import javax.jms.MessageFormatException;
 
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientSession;
-import org.jboss.messaging.core.message.ClientMessage;
 import org.jboss.messaging.util.SimpleString;
 import org.jboss.messaging.util.TypedProperties;
 

Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossMessage.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossMessage.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -36,11 +36,11 @@
 import javax.jms.MessageNotReadableException;
 import javax.jms.MessageNotWriteableException;
 
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientSession;
+import org.jboss.messaging.core.client.impl.ClientMessageImpl;
 import org.jboss.messaging.core.exception.MessagingException;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
-import org.jboss.messaging.core.message.impl.ClientMessageImpl;
 import org.jboss.messaging.jms.JBossDestination;
 import org.jboss.messaging.util.MessagingBuffer;
 import org.jboss.messaging.util.SimpleString;

Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossMessageConsumer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossMessageConsumer.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossMessageConsumer.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -33,10 +33,10 @@
 import javax.jms.TopicSubscriber;
 
 import org.jboss.messaging.core.client.ClientConsumer;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.MessageHandler;
 import org.jboss.messaging.core.exception.MessagingException;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
 
 /**
  * @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>

Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossObjectMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossObjectMessage.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossObjectMessage.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -30,8 +30,8 @@
 import javax.jms.JMSException;
 import javax.jms.ObjectMessage;
 
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientSession;
-import org.jboss.messaging.core.message.ClientMessage;
 
 /**
  * This class implements javax.jms.ObjectMessage

Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossQueueBrowser.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossQueueBrowser.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossQueueBrowser.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -28,9 +28,9 @@
 import javax.jms.QueueBrowser;
 
 import org.jboss.messaging.core.client.ClientBrowser;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.exception.MessagingException;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
 
 /**
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>

Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossStreamMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossStreamMessage.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossStreamMessage.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -28,9 +28,9 @@
 import javax.jms.MessageFormatException;
 import javax.jms.StreamMessage;
 
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientSession;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
 import org.jboss.messaging.core.remoting.impl.mina.BufferWrapper;
 import org.jboss.messaging.util.DataConstants;
 

Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossTextMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossTextMessage.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossTextMessage.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -25,9 +25,9 @@
 import javax.jms.JMSException;
 import javax.jms.TextMessage;
 
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientSession;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
 
 /**
  * This class implements javax.jms.TextMessage ported from SpyTextMessage in JBossMQ.

Modified: trunk/src/main/org/jboss/messaging/jms/client/JMSMessageListenerWrapper.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JMSMessageListenerWrapper.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/src/main/org/jboss/messaging/jms/client/JMSMessageListenerWrapper.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -24,10 +24,10 @@
 import javax.jms.MessageListener;
 import javax.jms.Session;
 
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.MessageHandler;
 import org.jboss.messaging.core.exception.MessagingException;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
 
 /**
  * 

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/CoreClientTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/CoreClientTest.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/CoreClientTest.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -5,14 +5,14 @@
 import org.jboss.messaging.core.client.ClientConnection;
 import org.jboss.messaging.core.client.ClientConnectionFactory;
 import org.jboss.messaging.core.client.ClientConsumer;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientProducer;
 import org.jboss.messaging.core.client.ClientSession;
 import org.jboss.messaging.core.client.Location;
 import org.jboss.messaging.core.client.impl.ClientConnectionFactoryImpl;
+import org.jboss.messaging.core.client.impl.ClientMessageImpl;
 import org.jboss.messaging.core.client.impl.LocationImpl;
 import org.jboss.messaging.core.config.impl.ConfigurationImpl;
-import org.jboss.messaging.core.message.ClientMessage;
-import org.jboss.messaging.core.message.impl.ClientMessageImpl;
 import org.jboss.messaging.core.remoting.TransportType;
 import org.jboss.messaging.core.server.impl.MessagingServerImpl;
 import org.jboss.messaging.jms.client.JBossTextMessage;

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/ClientCrashTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/ClientCrashTest.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/ClientCrashTest.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -27,15 +27,15 @@
 import org.jboss.messaging.core.client.ClientConnection;
 import org.jboss.messaging.core.client.ClientConnectionFactory;
 import org.jboss.messaging.core.client.ClientConsumer;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientProducer;
 import org.jboss.messaging.core.client.ClientSession;
 import org.jboss.messaging.core.client.impl.ClientConnectionFactoryImpl;
+import org.jboss.messaging.core.client.impl.ClientMessageImpl;
 import org.jboss.messaging.core.client.impl.LocationImpl;
 import org.jboss.messaging.core.config.impl.ConfigurationImpl;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
 import org.jboss.messaging.core.message.Message;
-import org.jboss.messaging.core.message.impl.ClientMessageImpl;
 import org.jboss.messaging.core.server.ConnectionManager;
 import org.jboss.messaging.core.server.MessagingServer;
 import org.jboss.messaging.core.server.impl.MessagingServerImpl;

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/CrashClient.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/CrashClient.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/CrashClient.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -29,15 +29,15 @@
 import org.jboss.messaging.core.client.ClientConnection;
 import org.jboss.messaging.core.client.ClientConnectionFactory;
 import org.jboss.messaging.core.client.ClientConsumer;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientProducer;
 import org.jboss.messaging.core.client.ClientSession;
 import org.jboss.messaging.core.client.Location;
 import org.jboss.messaging.core.client.impl.ClientConnectionFactoryImpl;
+import org.jboss.messaging.core.client.impl.ClientMessageImpl;
 import org.jboss.messaging.core.client.impl.LocationImpl;
 import org.jboss.messaging.core.config.impl.ConfigurationImpl;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
-import org.jboss.messaging.core.message.impl.ClientMessageImpl;
 import org.jboss.messaging.jms.client.JBossTextMessage;
 
 

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/GracefulClient.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/GracefulClient.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/GracefulClient.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -27,15 +27,15 @@
 import org.jboss.messaging.core.client.ClientConnection;
 import org.jboss.messaging.core.client.ClientConnectionFactory;
 import org.jboss.messaging.core.client.ClientConsumer;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientProducer;
 import org.jboss.messaging.core.client.ClientSession;
 import org.jboss.messaging.core.client.Location;
 import org.jboss.messaging.core.client.impl.ClientConnectionFactoryImpl;
+import org.jboss.messaging.core.client.impl.ClientMessageImpl;
 import org.jboss.messaging.core.client.impl.LocationImpl;
 import org.jboss.messaging.core.config.impl.ConfigurationImpl;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
-import org.jboss.messaging.core.message.impl.ClientMessageImpl;
 import org.jboss.messaging.jms.client.JBossTextMessage;
 
 /**

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/PacketFilterTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/PacketFilterTest.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/impl/PacketFilterTest.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -14,16 +14,16 @@
 import org.jboss.messaging.core.client.ClientConnection;
 import org.jboss.messaging.core.client.ClientConnectionFactory;
 import org.jboss.messaging.core.client.ClientConsumer;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientProducer;
 import org.jboss.messaging.core.client.ClientSession;
 import org.jboss.messaging.core.client.Location;
 import org.jboss.messaging.core.client.impl.ClientConnectionFactoryImpl;
+import org.jboss.messaging.core.client.impl.ClientMessageImpl;
 import org.jboss.messaging.core.client.impl.LocationImpl;
 import org.jboss.messaging.core.config.impl.ConfigurationImpl;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
 import org.jboss.messaging.core.message.Message;
-import org.jboss.messaging.core.message.impl.ClientMessageImpl;
 import org.jboss.messaging.core.remoting.TransportType;
 import org.jboss.messaging.core.server.impl.MessagingServerImpl;
 import org.jboss.messaging.jms.client.JBossTextMessage;

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/ssl/CoreClientOverSSL.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/ssl/CoreClientOverSSL.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/core/remoting/ssl/CoreClientOverSSL.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -27,16 +27,16 @@
 
 import org.jboss.messaging.core.client.ClientConnection;
 import org.jboss.messaging.core.client.ClientConnectionFactory;
+import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientProducer;
 import org.jboss.messaging.core.client.ClientSession;
 import org.jboss.messaging.core.client.ConnectionParams;
 import org.jboss.messaging.core.client.Location;
 import org.jboss.messaging.core.client.impl.ClientConnectionFactoryImpl;
+import org.jboss.messaging.core.client.impl.ClientMessageImpl;
 import org.jboss.messaging.core.client.impl.ConnectionParamsImpl;
 import org.jboss.messaging.core.client.impl.LocationImpl;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.ClientMessage;
-import org.jboss.messaging.core.message.impl.ClientMessageImpl;
 import org.jboss.messaging.jms.client.JBossTextMessage;
 
 /**

Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/filter/impl/FilterTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/filter/impl/FilterTest.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/filter/impl/FilterTest.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -26,9 +26,9 @@
 import org.jboss.messaging.core.exception.MessagingException;
 import org.jboss.messaging.core.filter.Filter;
 import org.jboss.messaging.core.filter.impl.FilterImpl;
-import org.jboss.messaging.core.message.ServerMessage;
 import org.jboss.messaging.core.message.impl.MessageImpl;
-import org.jboss.messaging.core.message.impl.ServerMessageImpl;
+import org.jboss.messaging.core.server.ServerMessage;
+import org.jboss.messaging.core.server.impl.ServerMessageImpl;
 import org.jboss.messaging.util.SimpleString;
 
 /**

Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/message/impl/MessageTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/message/impl/MessageTest.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/message/impl/MessageTest.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -21,15 +21,15 @@
  */
 package org.jboss.messaging.tests.unit.core.message.impl;
 
-import org.jboss.messaging.core.message.ClientMessage;
+import org.jboss.messaging.core.client.ClientMessage;
+import org.jboss.messaging.core.client.impl.ClientMessageImpl;
 import org.jboss.messaging.core.message.Message;
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
-import org.jboss.messaging.core.message.impl.ClientMessageImpl;
 import org.jboss.messaging.core.message.impl.MessageImpl;
-import org.jboss.messaging.core.message.impl.ServerMessageImpl;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
 import org.jboss.messaging.core.server.QueueFactory;
+import org.jboss.messaging.core.server.ServerMessage;
+import org.jboss.messaging.core.server.impl.ServerMessageImpl;
 import org.jboss.messaging.tests.unit.core.server.impl.fakes.FakeQueueFactory;
 import org.jboss.messaging.tests.util.UnitTestCase;
 import org.jboss.messaging.util.SimpleString;

Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/postoffice/impl/PostOfficeTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/postoffice/impl/PostOfficeTest.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/postoffice/impl/PostOfficeTest.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -26,7 +26,6 @@
 
 import org.easymock.EasyMock;
 import org.jboss.messaging.core.filter.Filter;
-import org.jboss.messaging.core.message.ServerMessage;
 import org.jboss.messaging.core.persistence.StorageManager;
 import org.jboss.messaging.core.postoffice.Binding;
 import org.jboss.messaging.core.postoffice.PostOffice;
@@ -34,6 +33,7 @@
 import org.jboss.messaging.core.postoffice.impl.PostOfficeImpl;
 import org.jboss.messaging.core.server.Queue;
 import org.jboss.messaging.core.server.QueueFactory;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.tests.unit.core.server.impl.fakes.FakeQueueFactory;
 import org.jboss.messaging.tests.util.UnitTestCase;
 import org.jboss.messaging.util.SimpleString;

Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/QueueTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/QueueTest.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/QueueTest.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -29,11 +29,11 @@
 
 import org.easymock.EasyMock;
 import org.jboss.messaging.core.filter.Filter;
-import org.jboss.messaging.core.message.MessageReference;
 import org.jboss.messaging.core.persistence.StorageManager;
 import org.jboss.messaging.core.server.Consumer;
 import org.jboss.messaging.core.server.DistributionPolicy;
 import org.jboss.messaging.core.server.HandleStatus;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
 import org.jboss.messaging.core.server.impl.QueueImpl;
 import org.jboss.messaging.core.server.impl.RoundRobinDistributionPolicy;

Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/concurrent/QueueTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/concurrent/QueueTest.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/concurrent/QueueTest.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -24,11 +24,11 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
 import org.jboss.messaging.core.server.HandleStatus;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
 import org.jboss.messaging.core.server.QueueFactory;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.tests.unit.core.server.impl.fakes.FakeConsumer;
 import org.jboss.messaging.tests.unit.core.server.impl.fakes.FakeQueueFactory;
 import org.jboss.messaging.tests.util.UnitTestCase;

Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/fakes/FakeConsumer.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/fakes/FakeConsumer.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/fakes/FakeConsumer.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -25,9 +25,9 @@
 import java.util.List;
 
 import org.jboss.messaging.core.filter.Filter;
-import org.jboss.messaging.core.message.MessageReference;
 import org.jboss.messaging.core.server.Consumer;
 import org.jboss.messaging.core.server.HandleStatus;
+import org.jboss.messaging.core.server.MessageReference;
 
 /**
  * 

Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/fakes/FakeFilter.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/fakes/FakeFilter.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/fakes/FakeFilter.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -22,7 +22,7 @@
 package org.jboss.messaging.tests.unit.core.server.impl.fakes;
 
 import org.jboss.messaging.core.filter.Filter;
-import org.jboss.messaging.core.message.ServerMessage;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.util.SimpleString;
 
 /**

Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/timing/QueueTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/timing/QueueTest.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/timing/QueueTest.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -28,8 +28,8 @@
 
 import org.easymock.EasyMock;
 import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.message.MessageReference;
 import org.jboss.messaging.core.persistence.StorageManager;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
 import org.jboss.messaging.core.server.impl.QueueImpl;
 import org.jboss.messaging.tests.unit.core.server.impl.fakes.FakeConsumer;

Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/transaction/impl/TransactionTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/transaction/impl/TransactionTest.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/transaction/impl/TransactionTest.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -9,11 +9,11 @@
 
 import org.easymock.EasyMock;
 import org.jboss.messaging.core.message.Message;
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
 import org.jboss.messaging.core.persistence.StorageManager;
 import org.jboss.messaging.core.postoffice.PostOffice;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
+import org.jboss.messaging.core.server.ServerMessage;
 import org.jboss.messaging.core.server.impl.QueueImpl;
 import org.jboss.messaging.core.settings.HierarchicalRepository;
 import org.jboss.messaging.core.settings.impl.HierarchicalObjectRepository;

Modified: trunk/tests/src/org/jboss/messaging/tests/util/UnitTestCase.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/util/UnitTestCase.java	2008-05-08 10:59:15 UTC (rev 4162)
+++ trunk/tests/src/org/jboss/messaging/tests/util/UnitTestCase.java	2008-05-08 11:20:19 UTC (rev 4163)
@@ -35,10 +35,10 @@
 
 import junit.framework.TestCase;
 
-import org.jboss.messaging.core.message.MessageReference;
-import org.jboss.messaging.core.message.ServerMessage;
-import org.jboss.messaging.core.message.impl.ServerMessageImpl;
+import org.jboss.messaging.core.server.MessageReference;
 import org.jboss.messaging.core.server.Queue;
+import org.jboss.messaging.core.server.ServerMessage;
+import org.jboss.messaging.core.server.impl.ServerMessageImpl;
 
 /**
  * 




More information about the jboss-cvs-commits mailing list