Bug 833187 - [as7] Empty lists should be null for some HornetQ sub-resources
[as7] Empty lists should be null for some HornetQ sub-resources
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: RHQ 4.5.0
Assigned To: Stefan Negrea
Mike Foley
Depends On:
Blocks: as7-plugin 835696
  Show dependency treegraph
Reported: 2012-06-18 16:22 EDT by Stefan Negrea
Modified: 2013-09-01 06:07 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 835696 (view as bug list)
Last Closed: 2013-09-01 06:07:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Stefan Negrea 2012-06-18 16:22:36 EDT
Description of problem:
Three list properties should be sent as null if empty to the AS7. The current implementation treats all the lists in an equal manner, if the list is empty then an empty list is sent back to AS7 for a configuration update. The three list properties identified so far are: static-connectors (from Cluster Connection of HornetQ), static-connectors (from Bridge of HornetQ), and remoting-inceptors (of HornetQ).

How reproducible:
Every time

Steps to Reproduce:
1. Discovery and import an AS7 standalone server
2. Find the resource with the following path subsystem=messaging,hornetq-server=default,cluster-connection=my-cluster
3. Try to update the resource configuration.
Actual results:
The following error is received from AS7:
{JBAS014653: Composite operation failed and was rolled back. Steps that failed:={Operation step-16=JBAS014706: [0] is an invalid size for parameter static-connectors. A minimum length of [1] is required}},

Expected results:
The update should happen without an error.

Additional info:
For most cases sending an empty list back to the server is correct way of setting the property to empty; in those cases sending an null value will result in errors. So this update needs to be specific for the properties identified.
Comment 1 Stefan Negrea 2012-06-18 17:56:22 EDT
Added support for nullable lists. If a nullable list is empty then send back to the AS7 the null value instead of an empty list.

master branch commit:
Comment 2 Stefan Negrea 2012-08-14 15:37:23 EDT
A couple more updates were required to the loading and writing code for nullable lists. The code did not handle well the loading from JSON part.

One more commit to master branch:
Comment 3 Heiko W. Rupp 2013-09-01 06:07:40 EDT
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.

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