Bug 833187 - [as7] Empty lists should be null for some HornetQ sub-resources
Summary: [as7] Empty lists should be null for some HornetQ sub-resources
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHQ 4.5.0
Assignee: Stefan Negrea
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: as7-plugin 835696
TreeView+ depends on / blocked
 
Reported: 2012-06-18 20:22 UTC by Stefan Negrea
Modified: 2013-09-01 10:07 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
: 835696 (view as bug list)
Environment:
Last Closed: 2013-09-01 10:07:40 UTC
Embargoed:


Attachments (Terms of Use)

Description Stefan Negrea 2012-06-18 20:22:36 UTC
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 21:56:22 UTC
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:
http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=755964e1ac732505f8ef2261e9ed601205679f29

Comment 2 Stefan Negrea 2012-08-14 19:37:23 UTC
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:
http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=9e5352d85ca3b4ee98d52771930b61e72f73f579

Comment 3 Heiko W. Rupp 2013-09-01 10:07:40 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.


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