[ 
https://issues.apache.org/jira/browse/ARTEMIS-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16495227#comment-16495227
 ] 

ASF GitHub Bot commented on ARTEMIS-1895:
-----------------------------------------

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

    https://github.com/apache/activemq-artemis/pull/2116#discussion_r191787441
  
    --- Diff: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/SessionMetadataAddExceptionTest.java
 ---
    @@ -75,6 +88,24 @@ public void testInvalidClientIdSetFactory() throws 
Exception {
           cf.createConnection();
        }
     
    +   @Test(timeout = 5000, expected = JMSException.class)
    +   public void testDuplicateClientIdSet() throws Exception {
    +      ActiveMQConnectionFactory activeMQConnectionFactory = 
(ActiveMQConnectionFactory) cf;
    +      Connection con = cf.createConnection();
    +      Connection con2 = cf.createConnection();
    +      try {
    +         con.setClientID("valid");
    +         con2.setClientID("valid");
    +         fail("Should have failed for duplicate clientId");
    +      } catch (Exception e) {
    --- End diff --
    
    I switched it to catch the InvalidClientIdException that gets thrown


> Add duplicate metadata failure callback to ActiveMQServerPlugin
> ---------------------------------------------------------------
>
>                 Key: ARTEMIS-1895
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1895
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 2.6.0
>            Reporter: Christopher L. Shannon
>            Assignee: Christopher L. Shannon
>            Priority: Minor
>             Fix For: 2.7.0
>
>
> I have a usecase where it would be useful to have a callback as part of the 
> plugin api when there is duplicate session metadata detected (ie duplicate 
> clientId).  This new callback will allow a user to add custom handling such 
> as logging, etc.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to