[jboss-as7-dev] min-occurs / max-occurs contraints

Tomaz Cerar tomaz.cerar at redhat.com
Thu Jul 12 17:16:13 EDT 2012


Hi,

we ware talking with Kabir about min/max-occurs that we have defined in many manually written DescriptionProviders
They are supposed to be used to define constraints on on how many children resource can have.

The problem we have with this is that there is no support for it when using ResourceDefinition to define resources.
As we ware looking at adding it we found out that for us to do it properly support should be added to ResourceDefinition
and ImmutableManagementResourceRegistration (IMRR) which makes it look bit odd especaly as you would get min/max-occurs on resource
but it would actually apply to parent(you tell how may children resource can have and child holds information about this)
so any way we look at it is bit odd and looks like it does not belong.

The issue was brought up as result of Jeff's conversion of messaging subsystem (which is a great job btw) where resulting model
was missing min/max-occurs for children.

Question is do we even want to support this as currently there is no support for validating and enforcing this constraints.
only thing we have is that some manually written model defines it.
If we add support for this on RD and IMRR we should probably add support for enforcing / validating it.

Also we have figured out that when we converted subsystem we have lost this information. Would it make sense to re-add it?

I would purpose to remove min/max-occurs all together as adding proper support for it at this stage would be quite braking.
But it should be included from start in AS8. Support for it could be more easily and properly added...



--
tomaz


More information about the jboss-as7-dev mailing list