Bug 816169

Summary: [as7] Backup connector for HornetQ connection factory not needed, connector XOR discovery-group-name
Product: [Other] RHQ Project Reporter: Heiko W. Rupp <hrupp>
Component: PluginsAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: high    
Version: 4.3CC: hrupp
Target Milestone: ---   
Target Release: RHQ 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-01 10:15:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 707223    

Description Heiko W. Rupp 2012-04-25 12:02:10 UTC
This is related to Bug 802467 and Bug 816057

The backup connector name is not needed as it is not used at all

The connector may not be given at all when a discovery-group-name is given


[09:52:23] <+jmesnil> pilhuhn,  /subsystem=messaging/hornetq-server=default/connection-factory=myCF/:add(entries=["java:jboss/exported/jms/myCF"], connector={"netty" => undefined})
[09:52:47] <+jmesnil> pilhuhn, only the keys of the connector map are used
[09:53:14] <+jmesnil> pilhuhn, i'm not understanding why the model uses a map instead of a list (except to have unique name...)
[09:53:15] <pilhuhn> jmesnil but is required  -no?
[09:53:29] <+jmesnil> pilhuhn, yeah, you must have at least 1 entry in the connector

[11:53:42] <+jmesnil> pil-afk-bbl, I did some digging to understand what's going on with the connector thing and the story is this:
[11:54:12] <+jmesnil> at some time, HornetQ accepted a map of <live,backup> connectors
[11:54:25] <+jmesnil> then it changed its API to only take a list of connectors
[11:54:32] rsmeral is now known as rsmeral_afk
[11:54:43] <+jmesnil> AS7 domain model was not changed to reflect the HornetQ API change
[11:55:44] <+jmesnil> I'll add some comments in the XSD schema and the resource descriptions to explain that the backup connectors are not used and undefined value must be used for any connector key

[13:26:14] <pil-afk-bbl> jmesnil so backup connector must be undefined - or can it contain arbitrary values, that are just not honored?
[13:26:20] pil-afk-bbl is now known as pilhuhn
[13:27:05] <+AndyTaylor> pilhuhn: backup connector is not used at all, so ignore the setting
[13:29:35] <pilhuhn> AndyTaylor what would happen when I specify it?
[13:29:55] <+AndyTaylor> pilhuhn: ive no idea, but it isnt used so its academic
[13:30:04] <pilhuhn> that is what I wanted to hear

[13:56:13] <+jmesnil> pilhuhn, one thing that is not explicit in the messaging domain model: when you create a connection-factory, you must define either a connector object or a discovery-group-name
[13:57:06] <+jmesnil> pilhuhn, I was wrong when I told you connector is mandatory. It is not. if you set the discovery-group-name you don't need to set the connector
[13:57:42] <pilhuhn> h*ly sh*t
[13:57:49] ChanServ sets mode +v magesh
[13:58:16] <+jmesnil> pilhuhn, yeah, I just saw that it is not enforced by the model :(

Comment 1 Charles Crouch 2012-04-27 03:03:12 UTC
So what needs to be done for this BZ?

Comment 2 Heiko W. Rupp 2012-05-02 10:04:01 UTC
This is not entirely clear in totality and depends a little on how this will be 
exposed in the next version of as7:

- in rhq-plugin.xml: make connector optional
- in code: check that either 1 connector XOR discovery-group-name is set

This is supposed to be activated in 7.1.2-final


[12:01:20] <+jmesnil> pilhuhn, I deprecated the backup-connector-name but did 
not change the map structure to avoid break the management API
[12:02:14] <+jmesnil> pilhuhn, in the code we now check whether there is one 
and only one of <connectors> and <discovery-group-ref> but this is not enforced 
by the schema

Comment 3 Heiko W. Rupp 2012-05-02 12:22:55 UTC
master 874f7e3

As previously said, the UI Config editor can not enforce the restrictions, so they are done in code.
Unfortunately the comment on Connector element is not shown (Bug 818173)

Comment 4 Heiko W. Rupp 2013-09-01 10:15:44 UTC
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.