[ https://issues.apache.org/jira/browse/ARTEMIS-1207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16038968#comment-16038968 ]
ASF GitHub Bot commented on ARTEMIS-1207: ----------------------------------------- Github user clebertsuconic commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1317#discussion_r120375080 --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerTest.java --- @@ -143,4 +143,22 @@ public void testListenerCalledForOneConnectionAndSessions() throws Exception { conn.close(); } + + /** + * The JMS Spec isn't specific about if ClientId can be set after Exception Listener or not, + * simply it states that clientId must be set before any operation (read as remote) + * + * QpidJMS and ActiveMQ5 both interpret that therefor you can set the exception lister first. + * As such we align with those, allowing the exception listener to be set prior to the clientId, + * This to avoid causing implementation nuance's, when switching code from one client to another. + * + * This test is to test this and to ensure it doesn't get accidentally regressed. + */ + @Test + public void testSetClientIdAfterSetExceptionListener() throws Exception { + Connection conn = cf.createConnection(); --- End diff -- You are not using getExceptionListener here.. is the test really duplicating the issue? > [Core JMS Client] Align order of when setClientId can be called with > AcitveMQ5 and QPID > --------------------------------------------------------------------------------------- > > Key: ARTEMIS-1207 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1207 > Project: ActiveMQ Artemis > Issue Type: Bug > Reporter: Michael Andre Pearce > > There is a difference in behaviour of when it is valid to be able to set > clientId though it seems the behaviour isn't clear in JMS spec, where QPID > and ActiveMQ5 allow you to set an exception listener first, where as > currently Artemis requires the very first call to setClientId if you wish to > set it. > As discussed will create and align the clients so even so not detailed in > spec, a user of ActiveMQ5 client or QPID client can expect the same behaviour. -- This message was sent by Atlassian JIRA (v6.3.15#6346)