[rhmessaging-commits] rhmessaging commits: r1772 - store/trunk/java/bdbstore/src/main/java/com/redhat/rhm/server/store/berkeleydb/messageStore.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue Mar 18 05:00:14 EDT 2008


Author: asimon
Date: 2008-03-18 05:00:14 -0400 (Tue, 18 Mar 2008)
New Revision: 1772

Modified:
   store/trunk/java/bdbstore/src/main/java/com/redhat/rhm/server/store/berkeleydb/messageStore/MessageStoreImpl.java
Log:
Updated for fixing compilation issues, this class will have to be updated for the new 0.10 broker.

Modified: store/trunk/java/bdbstore/src/main/java/com/redhat/rhm/server/store/berkeleydb/messageStore/MessageStoreImpl.java
===================================================================
--- store/trunk/java/bdbstore/src/main/java/com/redhat/rhm/server/store/berkeleydb/messageStore/MessageStoreImpl.java	2008-03-17 21:11:19 UTC (rev 1771)
+++ store/trunk/java/bdbstore/src/main/java/com/redhat/rhm/server/store/berkeleydb/messageStore/MessageStoreImpl.java	2008-03-18 09:00:14 UTC (rev 1772)
@@ -462,7 +462,7 @@
             byte[] routingKey = ((AMQMessage) m).getMessagePublishInfo().getRoutingKey().getBytes();
             final int headerSize = HEADER_SIZE + m.getHeaderSize() + EXCHANGENAME_SIZE + exchangeName.length + ROUTINGKEY_SIZE
                     + routingKey.length + BOOLEAN_SIZE + BOOLEAN_SIZE;
-            // we write header size ¦ headerbody ¦ payload size
+            // we write header size � headerbody � payload size
             // The payload size is set during the first enqueue of the staged message
             byte[] underlying = new byte[HEADER_SIZE + headerSize + PAYLOAD_SIZE];
             ByteBuffer buf = ByteBuffer.wrap(underlying);
@@ -787,7 +787,7 @@
             {
                 //This is the first time this message is enqueued and it has not been staged.
                 //We need to write the header body, the payload and the queue name
-                // we write: headerSize ¦ headerBody ¦ payloadSize ¦ payload ¦ queueNames
+                // we write: headerSize � headerBody � payloadSize � payload � queueNames
                 underlying = new byte[HEADER_SIZE + headerSize + PAYLOAD_SIZE + m.getData().length + QUEUEID_SIZE];
                 ByteBuffer buf = ByteBuffer.wrap(underlying);
                 buf.putInt(headerSize);
@@ -1066,7 +1066,8 @@
             AbstractRecord foundRecord;
             com.redhat.rhm.server.store.berkeleydb.txn.TransactionImpl foundTx;
             AMQQueue recorQueue;
-            TransactionalContext txnContext = new NonTransactionalContext(this, new StoreContext(), null, null, null);
+            // TODO: changed for compilation issue, to be updated with the new 0.10 broker
+            TransactionalContext txnContext = null;// new NonTransactionalContext(this, new StoreContext(), null, null, null);
             MessageHandleFactory messageHandleFactory = new MessageHandleFactory();
             while (cursor.getNext(foundKey, foundData, LockMode.DEFAULT) == OperationStatus.SUCCESS)
             {
@@ -1079,7 +1080,8 @@
                     foundRecord.setMessage(recorQueue.getEnqueuedMessage(foundRecord.getMessageID()));
                 } else
                 {
-                    foundRecord.setMessage(new AMQMessage(foundRecord.getMessageID(), this, messageHandleFactory, txnContext));
+                    // TODO: changed for compilation issue, to be updated with the new 0.10 broker
+                    foundRecord.setMessage( null); // new AMQMessage(foundRecord.getMessageID(), this, messageHandleFactory, txnContext));
                 }
                 foundTx = result.get(foundXid);
                 if (foundTx == null)
@@ -1103,7 +1105,8 @@
                 foundTx.addRecord(foundRecord);
             }
         }
-        catch (AMQException e)
+        // TODO: changed for compilation issue, to be updated with the new 0.10 broker
+        catch (Exception e)
         {
             throw new InternalErrorException("Cannot recover in doubt tx", e);
         }
@@ -1455,7 +1458,8 @@
         try
         {
             StoreContext context = new StoreContext();
-            TransactionalContext txnContext = new NonTransactionalContext(this, new StoreContext(), null, null, null);
+            // TODO: changed for compilation issue, to be updated with the new 0.10 broker
+            TransactionalContext txnContext = null; //new NonTransactionalContext(this, new StoreContext(), null, null, null);
             MessageHandleFactory messageHandleFactory = new MessageHandleFactory();
             cursor = _messageDB.openCursor(tx, null);
             DatabaseEntry foundKey = new DatabaseEntry();
@@ -1491,7 +1495,8 @@
                     if (message.length > hs + ps + HEADER_SIZE + PAYLOAD_SIZE)
                     {
                         // this message has been enqueued
-                        foundMessage = new AMQMessage(foundMessageId, this, messageHandleFactory, txnContext);
+                        // TODO: changed for compilation issue, to be updated with the new 0.10 broker
+                        foundMessage = null; //new AMQMessage(foundMessageId, this, messageHandleFactory, txnContext);
                         for (int i = hs + ps + HEADER_SIZE + PAYLOAD_SIZE; i < message.length; i = i + QUEUEID_SIZE)
                         {
                             foundQueueID = buf.getInt();




More information about the rhmessaging-commits mailing list