Bug 1001612 - Adding functionality to change "connector" to "discovery-group-name" for the existing JMS connection factories
Adding functionality to change "connector" to "discovery-group-name" for the ...
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JMS (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ER3
: EAP 6.2.0
Assigned To: Jeff Mesnil
Miroslav Novak
Russell Dickenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-27 07:49 EDT by Masafumi Miura
Modified: 2014-03-06 10:51 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-15 11:13:18 EST
Type: Enhancement
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker AS7-5107 Major Resolved define connectors as alternatives to discovery-group 2015-11-02 06:05 EST
JBoss Issue Tracker WFLY-2069 Major Resolved can not switch from connector to discovery-group-name for JMS (pooled-) connection factories 2015-11-02 06:05 EST

  None (edit)
Description Masafumi Miura 2013-08-27 07:49:45 EDT
### 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 10:28:01 EDT
Jeff Mesnil <jmesnil@redhat.com> made a comment on jira WFLY-2069

PR for master branch
Comment 4 JBoss JIRA Server 2013-10-04 04:36:20 EDT
Jeff Mesnil <jmesnil@redhat.com> made a comment on jira WFLY-2069

PR merged in master branch
Comment 6 Miroslav Novak 2013-10-07 04:01:52 EDT
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.