This closes #1323
This commit is contained in:
commit
9d5d2d5344
|
@ -267,8 +267,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
|
||||||
public ConnectionMetaData getMetaData() throws JMSException {
|
public ConnectionMetaData getMetaData() throws JMSException {
|
||||||
checkClosed();
|
checkClosed();
|
||||||
|
|
||||||
justCreated = false;
|
|
||||||
|
|
||||||
if (metaData == null) {
|
if (metaData == null) {
|
||||||
metaData = new ActiveMQConnectionMetaData(thisVersion);
|
metaData = new ActiveMQConnectionMetaData(thisVersion);
|
||||||
}
|
}
|
||||||
|
@ -323,7 +321,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
|
||||||
session.stop();
|
session.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
justCreated = false;
|
|
||||||
started = false;
|
started = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,15 @@ public class ConnectionTest extends JMSTestCase {
|
||||||
connection2.setClientID(clientID);
|
connection2.setClientID(clientID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSetClientIdAfterStop() throws Exception {
|
||||||
|
try (Connection connection = createConnection()) {
|
||||||
|
connection.stop();
|
||||||
|
connection.setClientID("clientId");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetClientAfterStart() throws Exception {
|
public void testSetClientAfterStart() throws Exception {
|
||||||
Connection connection = null;
|
Connection connection = null;
|
||||||
|
@ -174,6 +183,14 @@ public class ConnectionTest extends JMSTestCase {
|
||||||
connection.close();
|
connection.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSetClientIdAfterGetMetadata() throws Exception {
|
||||||
|
try (Connection connection = createConnection()) {
|
||||||
|
connection.getMetaData();
|
||||||
|
connection.setClientID("clientId");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test creation of QueueSession
|
* Test creation of QueueSession
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue