### Description of problem: As per AS7-5107, cluster-connections, bridges and JMS connection factories defines either connectors or discovery-group but not both. Therefore, since EAP 6.1.0 we can not write "discovery-group-name" attribute to JMS connection factories when the connection factories is already defined with "connector" attribute: ~~~ [standalone@localhost:9999 /] /subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory:write-attribute(name=discovery-group-name,value=dg-group1) { "outcome" => "failed", "failure-description" => "JBAS011630: Alternative attribute of (discovery-group-name) is already defined.", "rolled-back" => true } ~~~ Also we can not undefine predefined "connector" attribute of the connection factories: ~~~ [standalone@localhost:9999 /] /subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory:undefine-attribute(name=connector) { "outcome" => "failed", "failure-description" => "JBAS014749: Operation handler failed: JBAS011664: Runtime handling for connector is not implemented", "rolled-back" => true } ~~~ I also tried batch CLI but it did not help. We can not undefine the predefined "connector" attribute regardless of using batch CLI or not: ~~~ [standalone@localhost:9999 /] batch [standalone@localhost:9999 / #] /subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory:undefine-attribute(name=connector) #1 /subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory:undefine-attribute(name=connector) [standalone@localhost:9999 / #] /subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory:write-attribute(name=discovery-group-name,value=dg-group1) #2 /subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory:write-attribute(name=discovery-group-name,value=dg-group1) [standalone@localhost:9999 / #] list-batch #1 /subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory:undefine-attribute(name=connector) #2 /subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory:write-attribute(name=discovery-group-name,value=dg-group1) [standalone@localhost:9999 / #] run-batch {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "JBAS011630: Alternative attribute of (connector) is already defined."}} ~~~ To change change "connector" to "discovery-group-name", we need to remove the existing connection factories then recreate a new connection factories. For example: ~~~ /subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory:remove :reload /subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory/:add(entries=["java:jboss/exported/jms/RemoteConnectionFactory"],discovery-group-name=dg-group1) ~~~ The customer asks us for adding functionality to change "connector" to "discovery-group-name" (and vice-versa) for the existing JMS connection factories without removing the connection factories. Because doing remove and create connection factories lose all predefined attribute for the connection factories. ### Version-Release number of selected component (if applicable): EAP 6.1.0 / "full" or "full-ha" profile ### How reproducible: Everytime. ### Steps to Reproduce: 1. Start out-of-the-box EAP 6.1.0 with standalone-full-ha.xml 2. Try out the above CLI scripts ### Actual results: You can not write "discovery-group-name" attribute to the connection factories and also you can not undefine predefined "connector" attribute of the connection factories. ### Expected results: You can write "discovery-group-name" attribute to the connection factories and also you can undefine predefined "connector" attribute of the connection factories in order to change "connector" to "discovery-group-name".
Jeff Mesnil <jmesnil> made a comment on jira WFLY-2069 PR for master branch
Jeff Mesnil <jmesnil> made a comment on jira WFLY-2069 PR merged in master branch
BZ was verified in EAP 6.2.0.ER4 by following batch: batch /subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory:undefine-attribute(name=connector) /subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory:write-attribute(name=discovery-group-name,value=dg-group1) run-batch In this way connector for connection factory can be undefined and set discovery-group. Or discovery-group undefined and changed set connector. This must be done in a batch or commands will fail as it is reported in description.