jbossas/jboss-as — pull request #3130 by jmesnil (2012-09-27 09:31:21+00:00)
Title: [AS7-5417] fix messaging paths 

a HornetQ server always have 4 messaging path subresources (journal, paging, largemessages & bindings).
However, a path subresource was only created if the user redefines it in the XML. This made the model incoherent as it was not possible to manage a path subresource if it has not been configured in XML.

This patch ensures that the server always have 4 messaging path subresources. If an user does not define them in the XML, we create the resources (using their default values) in a operation step just before creating the HornetQ server.

I also fix the path resources attributes that were not correct (they define default values, must restart all services on modifications, etc.) and leverage them to simplify the code to resolve the attributes and marshall them in XML.

Comparing it to 7.1.2.Final model gives these warnings (comments embedded):

--- Problems for relative address to root ["hornetq-server" => "*","path" => "bindings-directory"]:
Different 'nillable' for attribute 'path'. Current: true; legacy: false
=> a path is now nillable as it has a default value
Different 'expressions-allowed' for attribute 'path'. Current: true; legacy: false
=> this was changed in AS7-4917
Different 'default' for attribute 'path'. Current: "messagingbindings"; legacy: undefined
=> this was a bug in the previous management model which did not expose the default value
Different 'default' for attribute 'relative-to'. Current: "jboss.server.data.dir"; legacy: undefined
=> this was a bug in the previous management model which did not expose the default value
Different 'nillable' for parameter 'path' of operation 'add'. Current: true; legacy: false
=> if the path param is null, we use its default value
Different 'expressions-allowed' for parameter 'path' of operation 'add'. Current: true; legacy: false
=> this was changed in AS7-4917
--- Problems for relative address to root ["hornetq-server" => "*","path" => "journal-directory"]:
[...]
=> the differences on bindings-directory applies here too
Different 'default' for attribute 'path'. Current: "messagingjournal"; legacy: undefined
=> each messaging path has a different default value for its path
--- Problems for relative address to root ["hornetq-server" => "*","path" => "large-messages-directory"]:
[...]
=> same as above
--- Problems for relative address to root ["hornetq-server" => "*","path" => "paging-directory"]:
[...]
=> same as above