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 Mon, 18 Apr 2016 12:44:15 GMT
Repository: activemq
Updated Branches:
  refs/heads/activemq-5.13.x 9d545cf11 -> 840583df0


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

Moving beforeMarshall back to the store implementations because we don't
want all store implementations to marshall (such as memory store)

This reverts commit 32913408a68ec92e3d202f5dcc3923d5c7d7588a.


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

Branch: refs/heads/activemq-5.13.x
Commit: 840583df090bdca6ef1a709d1a2e7701aaeda637
Parents: 9d545cf
Author: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Authored: Mon Apr 18 12:42:46 2016 +0000
Committer: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Committed: Mon Apr 18 12:43:28 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, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/840583df/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 8e2943a..d61c49e 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,7 +840,6 @@ 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());
                             result.addListener(new PendingMarshalUsageTracker(message));
                         } else {

http://git-wip-us.apache.org/repos/asf/activemq/blob/840583df/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 cd47137..8c63c02 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,7 +511,6 @@ 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/840583df/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 de03ac1..06a60a5 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,6 +384,7 @@ 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);
@@ -752,6 +753,7 @@ 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/840583df/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 a4cdcac..745f36d 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,6 +754,7 @@ 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