You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2017/06/07 14:18:20 UTC
[1/2] activemq-artemis git commit: ARTEMIS-1207: Align when
setClientId can be called
Repository: activemq-artemis
Updated Branches:
refs/heads/master dc9cee2f7 -> 9d5d2d534
ARTEMIS-1207: Align when setClientId can be called
Update ActiveMQConnection to change/alighn behaviour for addtional methods:
- getMetaData
- stop
Adding test to avoid regression.
This is aligning with qpid-jms and openwire clients
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/e8fa02bf
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/e8fa02bf
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/e8fa02bf
Branch: refs/heads/master
Commit: e8fa02bf80118738c52489c4bf2511aa0d1ef5b8
Parents: dc9cee2
Author: Michael Andre Pearce <Mi...@me.com>
Authored: Tue Jun 6 16:09:58 2017 +0100
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Jun 7 10:18:15 2017 -0400
----------------------------------------------------------------------
.../artemis/jms/client/ActiveMQConnection.java | 3 ---
.../activemq/artemis/jms/tests/ConnectionTest.java | 17 +++++++++++++++++
2 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e8fa02bf/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
index 51a89e3..0ff0a21 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
@@ -267,8 +267,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
public ConnectionMetaData getMetaData() throws JMSException {
checkClosed();
- justCreated = false;
-
if (metaData == null) {
metaData = new ActiveMQConnectionMetaData(thisVersion);
}
@@ -323,7 +321,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
session.stop();
}
- justCreated = false;
started = false;
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e8fa02bf/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionTest.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionTest.java
index 2d89713..8aac280 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionTest.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionTest.java
@@ -98,6 +98,15 @@ public class ConnectionTest extends JMSTestCase {
}
@Test
+ public void testSetClientIdAfterStop() throws Exception {
+ try (Connection connection = createConnection()) {
+ connection.stop();
+ connection.setClientID("clientId");
+ }
+ }
+
+
+ @Test
public void testSetClientAfterStart() throws Exception {
Connection connection = null;
try {
@@ -174,6 +183,14 @@ public class ConnectionTest extends JMSTestCase {
connection.close();
}
+ @Test
+ public void testSetClientIdAfterGetMetadata() throws Exception {
+ try (Connection connection = createConnection()) {
+ connection.getMetaData();
+ connection.setClientID("clientId");
+ }
+ }
+
/**
* Test creation of QueueSession
*/
[2/2] activemq-artemis git commit: This closes #1323
Posted by cl...@apache.org.
This closes #1323
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/9d5d2d53
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/9d5d2d53
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/9d5d2d53
Branch: refs/heads/master
Commit: 9d5d2d5344a87e49aee11854c5ce16b423fa6998
Parents: dc9cee2 e8fa02b
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed Jun 7 10:18:16 2017 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Jun 7 10:18:16 2017 -0400
----------------------------------------------------------------------
.../artemis/jms/client/ActiveMQConnection.java | 3 ---
.../activemq/artemis/jms/tests/ConnectionTest.java | 17 +++++++++++++++++
2 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------