Github user michaelandrepearce commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1317#discussion_r120379443
  
    --- 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 --
    
    the issue was if you setExceptionListener before clientId, it would 
fail/throw exceptions on setting clientId. Now it is possible to set it before 
setting the clientId, this test is testing this behaviour. (e.g. if you revert 
the change in the ActiveMQConnection , this test fails)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to