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

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

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

    https://github.com/apache/activemq-artemis/pull/2116#discussion_r191777420
  
    --- Diff: 
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
 ---
    @@ -263,6 +264,8 @@ private void validateClientID(ClientSession 
validateSession, String clientID) th
           } catch (ActiveMQException e) {
              if (e.getType() == ActiveMQExceptionType.DUPLICATE_METADATA) {
                 throw new InvalidClientIDException("clientID=" + clientID + " 
was already set into another connection");
    +         } else {
    +            throw new InvalidClientIDException("Error setting clientID=" + 
clientID + ": " + e.getMessage());
    --- End diff --
    
    The original exception here may not be related to InvalidClientId, seems a 
bit dangerous to catchall and throw like this. Maybe bubble up or convert the 
exception 


> 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