You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2018/08/06 13:50:21 UTC
[1/2] activemq-artemis git commit: [ARTEMIS-1947] Session metadata in session management operation
Repository: activemq-artemis
Updated Branches:
refs/heads/master d13b42def -> 3bb7df2de
[ARTEMIS-1947] Session metadata in session management operation
Fill the session's metadata in JSON properties instead of serializing it
as an opaque String.
JIRA: https://issues.apache.org/jira/browse/ARTEMIS-1947
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/fd9aad20
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/fd9aad20
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/fd9aad20
Branch: refs/heads/master
Commit: fd9aad202bbac331a14d6ff58c0546c5d027aa06
Parents: d13b42d
Author: Jeff Mesnil <jm...@gmail.com>
Authored: Mon Aug 6 14:11:40 2018 +0200
Committer: Jeff Mesnil <jm...@gmail.com>
Committed: Mon Aug 6 14:11:40 2018 +0200
----------------------------------------------------------------------
.../core/management/impl/ActiveMQServerControlImpl.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fd9aad20/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
index b0b3cc8..f708c1d 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
@@ -1923,10 +1923,12 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
obj.add("principal", sess.getValidatedUser());
}
- String metadata = sess.getMetaData() == null ? null : sess.getMetaData().toString();
- if (metadata != null) {
- // remove leading and trailing curly brackets
- obj.add("metadata", metadata.substring(1, metadata.length() - 1));
+ if (sess.getMetaData() != null) {
+ final JsonObjectBuilder metadata = JsonLoader.createObjectBuilder();
+ for (Entry<String, String> entry : sess.getMetaData().entrySet()) {
+ metadata.add(entry.getKey(), entry.getValue());
+ }
+ obj.add("metadata", metadata);
}
array.add(obj);
[2/2] activemq-artemis git commit: This closes #2215
Posted by jb...@apache.org.
This closes #2215
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/3bb7df2d
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/3bb7df2d
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/3bb7df2d
Branch: refs/heads/master
Commit: 3bb7df2de4fd1e5af0a722b23ddef650dffbf796
Parents: d13b42d fd9aad2
Author: Justin Bertram <jb...@apache.org>
Authored: Mon Aug 6 08:49:57 2018 -0500
Committer: Justin Bertram <jb...@apache.org>
Committed: Mon Aug 6 08:49:57 2018 -0500
----------------------------------------------------------------------
.../core/management/impl/ActiveMQServerControlImpl.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------