[jboss-as7-dev] Do new model attributes require manual setup of transformers?

Brian Stansberry brian.stansberry at redhat.com
Tue Mar 5 10:21:46 EST 2013


On 3/5/13 9:14 AM, Jaikiran Pai wrote:
> On Tuesday 05 March 2013 08:24 PM, Kabir Khan wrote:
>> On 5 Mar 2013, at 14:23, Jaikiran Pai wrote:
>>
>>> I've been trying to implement a new feature which requires the addition
>>> of a new model attribute for the EJB3 subsystem root resource. This
>>> model attribute is supposed to be "mandatory" (i.e. non-nullable at
>>> model level and "required" at xml level). All works fine without
>>> bringing into picture older versions of the model. Now while testing
>>> with older versions of the model and compatibility, things start failing
>>> for obvious reasons- the older model handlers, parsers etc... have no
>>> clue about this new attribute. I'm aware that that's where the
>> The old parsers should make it possible to construct the current model. Is the new attribute something which is now configurable, so you have two choices whereas previously one of those choices was assumed? In that case I think the old parser should create the resulting operation with the assumed default.
> The new (xml and model) attribute that I'm introducing is for EJB 3.2
> spec support. This attribute had no semantics in the previous model
> versions. So this is a completely new one in terms of semantics.
>
>>> subsystems and resources introducing a new attribute in the
>>> higher model would expect that that attribute to be ignored (I'm not
>>> using the term discarded or rejected because I am not 100% sure I
>>> understand the difference yet :) ) by lower versions of the model.
>> discard = silently discard the attribute
>> reject = if the attribute is used/does not have some value/is defined/other conditions the transformation should fail
>>
>> Normally we prefer reject. So for your case, again assuming that the added attribute has some assumed value in the old version, you should fail transformation if the current model does not have that assumed value.
> Sorry, my initial mail didn't have the attribute specifics. This new
> attribute is a EJB 3.2 specific thing so I think "discard" would be
> applicable in this case.
>

Probably not.

The cardinal rule is, the servers running on the legacy version must run 
consistently with other servers running the new version. If they cannot 
(because they don't understand some new piece of config), a reject is 
necessary, and the legacy servers must ignore the profile.

The goal is not to hide unresolvable configuration incompatibilities.


-- 
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat


More information about the jboss-as7-dev mailing list