activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cshan...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-6256
Date Fri, 15 Apr 2016 14:23:18 GMT
Repository: activemq
Updated Branches:
  refs/heads/activemq-5.13.x dc3c5a719 -> 32913408a


https://issues.apache.org/jira/browse/AMQ-6256

Moving beforeMarshall call out of the store and into the actual
destination

(cherry picked from commit b9b98a45cee484b112dadeffa2d9a874c4ffe280)


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/32913408
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/32913408
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/32913408

Branch: refs/heads/activemq-5.13.x
Commit: 32913408a68ec92e3d202f5dcc3923d5c7d7588a
Parents: dc3c5a7
Author: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Authored: Fri Apr 15 14:17:00 2016 +0000
Committer: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Committed: Fri Apr 15 14:22:15 2016 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/activemq/broker/region/Queue.java     | 1 +
 .../src/main/java/org/apache/activemq/broker/region/Topic.java     | 1 +
 .../main/java/org/apache/activemq/store/kahadb/KahaDBStore.java    | 2 --
 .../src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala  | 1 -
 4 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/32913408/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
index 786640e..9540a93 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
@@ -840,6 +840,7 @@ public class Queue extends BaseDestination implements Task, UsageListener,
Index
                         //condition if the original add is processed after the update, which
can cause
                         //a duplicate message to be stored
                         if (messages.isCacheEnabled() && !isPersistJMSRedelivered())
{
+                        message.beforeMarshall(null);
                             result = store.asyncAddQueueMessage(context, message, isOptimizeStorage());
                             final PendingMarshalUsageTracker tracker = new PendingMarshalUsageTracker(message);
                             result.addListener(new Runnable() {

http://git-wip-us.apache.org/repos/asf/activemq/blob/32913408/activemq-broker/src/main/java/org/apache/activemq/broker/region/Topic.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Topic.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Topic.java
index 8c63c02..cd47137 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Topic.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Topic.java
@@ -511,6 +511,7 @@ public class Topic extends BaseDestination implements Task {
 
                 waitForSpace(context,producerExchange, systemUsage.getStoreUsage(), getStoreUsageHighWaterMark(),
logMessage);
             }
+            message.beforeMarshall(null);
             result = topicStore.asyncAddTopicMessage(context, message,isOptimizeStorage());
         }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/32913408/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
----------------------------------------------------------------------
diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
index 06a60a5..de03ac1 100644
--- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
+++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
@@ -384,7 +384,6 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter
{
         public ListenableFuture<Object> asyncAddQueueMessage(final ConnectionContext
context, final Message message)
                 throws IOException {
             if (isConcurrentStoreAndDispatchQueues()) {
-                message.beforeMarshall(wireFormat);
                 StoreQueueTask result = new StoreQueueTask(this, context, message);
                 ListenableFuture<Object> future = result.getFuture();
                 message.getMessageId().setFutureOrSequenceLong(future);
@@ -753,7 +752,6 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter
{
         public ListenableFuture<Object> asyncAddTopicMessage(final ConnectionContext
context, final Message message)
                 throws IOException {
             if (isConcurrentStoreAndDispatchTopics()) {
-                message.beforeMarshall(wireFormat);
                 StoreTopicTask result = new StoreTopicTask(this, context, message, subscriptionCount.get());
                 result.aquireLocks();
                 addTopicTask(this, result);

http://git-wip-us.apache.org/repos/asf/activemq/blob/32913408/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala
----------------------------------------------------------------------
diff --git a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala
b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala
index 745f36d..a4cdcac 100644
--- a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala
+++ b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala
@@ -754,7 +754,6 @@ class LevelDBStore extends LockableServiceSupport with BrokerServiceAware
with P
 
     def doAdd(uow: DelayableUOW, context: ConnectionContext, message: Message, delay:Boolean):
CountDownFuture[AnyRef] = {
       check_running
-      message.beforeMarshall(wireFormat);
       message.incrementReferenceCount()
       uow.addCompleteListener({
         message.decrementReferenceCount()


Mime
View raw message