qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgr...@apache.org
Subject svn commit: r495169 - in /incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server: ./ handler/ queue/ store/ txn/
Date Thu, 11 Jan 2007 09:39:41 GMT
Author: rgreig
Date: Thu Jan 11 01:39:40 2007
New Revision: 495169

URL: http://svn.apache.org/viewvc?view=rev&rev=495169
Log:
QPID-32 : Add persistence to work with ShortStrings

Modified:
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeleteHandler.java
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/WeakReferenceMessageHandle.java
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStore.java
    incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/LocalTransactionalContext.java

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java?view=diff&rev=495169&r1=495168&r2=495169
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
Thu Jan 11 01:39:40 2007
@@ -174,7 +174,7 @@
         try
         {
             queue.delete();
-            _messageStore.removeQueue(queueName);
+            _messageStore.removeQueue(new AMQShortString(queueName));
 
         }
         catch (AMQException ex)

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeleteHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeleteHandler.java?view=diff&rev=495169&r1=495168&r2=495169
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeleteHandler.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeleteHandler.java
Thu Jan 11 01:39:40 2007
@@ -98,7 +98,7 @@
             else
             {
                 int purged = queue.delete(body.ifUnused, body.ifEmpty);
-                _store.removeQueue(queue.getName().toString());
+                _store.removeQueue(queue.getName());
                 // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
                 // TODO: Connect this to the session version obtained from ProtocolInitiation
for this session.
                 // Be aware of possible changes to parameter order as versions change.

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/WeakReferenceMessageHandle.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/WeakReferenceMessageHandle.java?view=diff&rev=495169&r1=495168&r2=495169
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/WeakReferenceMessageHandle.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/WeakReferenceMessageHandle.java
Thu Jan 11 01:39:40 2007
@@ -180,11 +180,11 @@
 
     public void enqueue(StoreContext storeContext, long messageId, AMQQueue queue) throws
AMQException
     {
-        _messageStore.enqueueMessage(storeContext, queue.getName().toString(), messageId);
+        _messageStore.enqueueMessage(storeContext, queue.getName(), messageId);
     }
 
     public void dequeue(StoreContext storeContext, long messageId, AMQQueue queue) throws
AMQException
     {
-        _messageStore.dequeueMessage(storeContext, queue.getName().toString(), messageId);
+        _messageStore.dequeueMessage(storeContext, queue.getName(), messageId);
     }
 }

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java?view=diff&rev=495169&r1=495168&r2=495169
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MemoryMessageStore.java
Thu Jan 11 01:39:40 2007
@@ -24,6 +24,7 @@
 import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.ContentBody;
+import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.MessageMetaData;
 import org.apache.qpid.server.queue.QueueRegistry;
@@ -100,17 +101,17 @@
         // Not required to do anything
     }
 
-    public void removeQueue(String name) throws AMQException
+    public void removeQueue(AMQShortString name) throws AMQException
     {
         // Not required to do anything
     }
 
-    public void enqueueMessage(StoreContext context, String name, long messageId) throws
AMQException
+    public void enqueueMessage(StoreContext context, AMQShortString name, long messageId)
throws AMQException
     {
         // Not required to do anything
     }
 
-    public void dequeueMessage(StoreContext context, String name, long messageId) throws
AMQException
+    public void dequeueMessage(StoreContext context, AMQShortString name, long messageId)
throws AMQException
     {
         // Not required to do anything
     }

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStore.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStore.java?view=diff&rev=495169&r1=495168&r2=495169
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStore.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/store/MessageStore.java
Thu Jan 11 01:39:40 2007
@@ -23,6 +23,7 @@
 import org.apache.commons.configuration.Configuration;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.ContentBody;
+import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.MessageMetaData;
 import org.apache.qpid.server.queue.QueueRegistry;
@@ -52,11 +53,11 @@
 
     void createQueue(AMQQueue queue) throws AMQException;
 
-    void removeQueue(String name) throws AMQException;
+    void removeQueue(AMQShortString name) throws AMQException;
 
-    void enqueueMessage(StoreContext context, String name, long messageId) throws AMQException;
+    void enqueueMessage(StoreContext context, AMQShortString name, long messageId) throws
AMQException;
 
-    void dequeueMessage(StoreContext context, String name, long messageId) throws AMQException;
+    void dequeueMessage(StoreContext context, AMQShortString name, long messageId) throws
AMQException;
 
     void beginTran(StoreContext context) throws AMQException;
 

Modified: incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/LocalTransactionalContext.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/LocalTransactionalContext.java?view=diff&rev=495169&r1=495168&r2=495169
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/LocalTransactionalContext.java
(original)
+++ incubator/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/LocalTransactionalContext.java
Thu Jan 11 01:39:40 2007
@@ -143,6 +143,13 @@
             _ackOp = null;
         }
 
-        _txnBuffer.commit(_storeContext);
+        try
+        {
+            _txnBuffer.commit(_storeContext);
+        }
+        finally
+        {
+            _inTran = false;
+        }
     }
 }



Mime
View raw message