Bug 1001612 - Adding functionality to change "connector" to "discovery-group-name" for the existing JMS connection factories
Summary: Adding functionality to change "connector" to "discovery-group-name" for the ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JMS
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER3
: EAP 6.2.0
Assignee: Jeff Mesnil
QA Contact: Miroslav Novak
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-27 11:49 UTC by Masafumi Miura
Modified: 2018-12-02 15:55 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-12-15 16:13:18 UTC
Type: Enhancement
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1059882 0 unspecified CLOSED Cluster-connections, bridges and JMS connection factories must define either connectors or discovery-group but not both 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker AS7-5107 0 Major Resolved define connectors as alternatives to discovery-group 2015-11-02 11:05:45 UTC
Red Hat Issue Tracker WFLY-2069 0 Major Resolved can not switch from connector to discovery-group-name for JMS (pooled-) connection factories 2015-11-02 11:05:46 UTC

Internal Links: 1059882

Description Masafumi Miura 2013-08-27 11:49:45 UTC
### 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".

Comment 2 JBoss JIRA Server 2013-09-13 14:28:01 UTC
Jeff Mesnil <jmesnil> made a comment on jira WFLY-2069

PR for master branch

Comment 4 JBoss JIRA Server 2013-10-04 08:36:20 UTC
Jeff Mesnil <jmesnil> made a comment on jira WFLY-2069

PR merged in master branch

Comment 6 Miroslav Novak 2013-10-07 08:01:52 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.