jbossas/jboss-as — pull request #2961 by jmesnil (2012-08-22 11:33:48+00:00)
Title: [AS7-4790] ResourceDefinition conversion

* convert JMS topic resource
* convert core queue and JMS queue resources
* convert regular JMS connection factory resource
* convert JMS pooled connection factory resource
* code cleanup

I ran the CompareModelVersionUtils to check it against 7.1.2.
I did not have a clean comparison but all the reported issues have an explanation:

> Enter legacy AS version: 7.1.2.Final
> Using target model: 7.1.2.Final
> Report on differences in the model when the management versions are different? y/[n]: y
> Not reporting on differences in the model when the management versions are different
> Loading legacy model versions for 7.1.2.Final....
> Loaded legacy model versions
> Loading legacy resource descriptions for 7.1.2.Final....
> Loaded legacy resource descriptions
> Loading model versions for currently running server...>

> ====== Resource root address: ["subsystem" => "messaging"] - Current version: 1.2.0; legacy version: 1.1.0 =======
> --- Problems for relative address to root []:
> Missing child types in current: []; missing in legacy [jms-bridge]

=> OK: jms-bridge is a new resource

> --- Problems for relative address to root ["hornetq-server" => "*","connection-factory" => "*"]:
> Different 'type' for attribute 'client-failure-check-period'. Current: LONG; legacy: INT

=> this is a bug in the manually written description in 7.1.2.Final. This attribute is a LONG, not an INT

> Different 'nillable' for attribute 'ha'. Current: true; legacy: false

=> this is also a bug in the manually written description in 7.1.2.Final. This attribute is nillable

> Different 'type' for parameter 'client-failure-check-period' of operation 'add'. Current: LONG; legacy: INT

=> same as above

> --- Problems for relative address to root ["hornetq-server" => "*","core-address" => "*"]:
> Different 'value-type' for attribute 'roles'. Current: {
> "name" => {
> "type" => STRING,
> "description" => "The name of the security role.",
> "expressions-allowed" => false,
> "nillable" => false,
> "min-length" => 1L,
> "max-length" => 2147483647L
> },
> "send" => {
> "type" => BOOLEAN,
> "description" => "Whether the role has permission to send to the address.",
> "expressions-allowed" => false,
> "nillable" => false
> }
> ...
> }; legacy: {
> "name" => {
> "description" => "The name of a security role.",
> "type" => STRING,
> "nillable" => false
> },
> "send" => {
> "description" => "This permission allows the user to send a message to matching addresses.",
> "type" => BOOLEAN,
> "nillable" => false

=> new model add "expressions-allowed" => false to the description

> Missing child types in current: []; missing in legacy [role]

=> the role child is a new resource

> --- Problems for relative address to root ["hornetq-server" => "*","path" => "bindings-directory"]:
> Different 'nillable' for attribute 'path'. Current: true; legacy: false
> Different 'expressions-allowed' for attribute 'path'. Current: true; legacy: false
> Different 'nillable' for parameter 'path' of operation 'add'. Current: true; legacy: false
> Different 'expressions-allowed' for parameter 'path' of operation 'add'. Current: true; legacy: false

ditto for journal-directory, large-messages-directory & paging-directory

=> in 7.2, messaging paths allows expressions.
=> since they also define default values, I made them nillable.... but the default value is not part of their description
=> I'll add a JIRA to fix all of this stuff

> --- Problems for relative address to root ["hornetq-server" => "*","pooled-connection-factory" => "*"]:
> Missing attributes in current: []; missing in legacy [compress-large-messages, use-auto-recovery]

=> new attributes with HornetQ 2.2.19.Final update

> Different 'type' for attribute 'client-failure-check-period'. Current: LONG; legacy: INT

=> this is a bug in the description in 7.1.2.Final. This attribute is a LONG, not an INT

> --- Problems for relative address to root ["hornetq-server" => "*","queue" => "*"]:
> Different 'reply-properties' for operation 'add'. Current: {}; legacy: undefined
> --- Problems for relative address to root ["hornetq-server" => "*","security-setting" => "*"]:
> Different 'reply-properties' for operation 'add'. Current: {}; legacy: undefined
> --- Problems for relative address to root ["hornetq-server" => "*","security-setting" => "*","role" => "*"]:
> Different 'reply-properties' for operation 'add'. Current: {}; legacy: undefined

=> I think these changes are OK