[jboss-as7-dev] inconsistent expression support
Brian Stansberry
brian.stansberry at redhat.com
Sat Dec 15 08:54:23 EST 2012
On 12/13/12 9:46 AM, Jeff Mesnil wrote:
> On 12/13/2012 09:56 AM, Heiko Braun wrote:
>>
>>
>> opening up the configuration to support expressions all over the place is desirable, but I wonder how far away we are from actually supporting it. We've been very restrictive in the console with using expressions, now we support it by default on all attributes. This is what happens:
>>
>> https://issues.jboss.org/browse/AS7-6154
>>
>> I wonder how we can actually verify full expression support, apart from simply declaring support in the meta data. IMO it would require to iterate over the current stock config and replace all occurrences of attributes that declare support for it with a default expression.
>
> That's what I did for the messaging subsystem. I used expressions in the subsystem XML tests for every attributes that are now
> allowing them.
> I found a few bugs like yours doing that but that was not enough.
>
> Another thing was to check during XML parsing for STRING attributes. Some have their value set and not parsed using
> AttributeDefinition.parseAndSetParameter() or ParseUtils functions. This results in a STRING ModelType (a literal
> "${exp:default}") while it must be an EXPRESSION instead.
Kabir, can the standard subsystem test check for this? If an attribute
supports expressions and the node in the model is ModelType.STRING,
check the value for expression syntax and fail if present.
> I had also to fix a few calls at runtime where the attribute value was not fetched using
> AttributeDefinition.resolveModelAttribute() and the expression was not resolved.
> These errors occurs at runtime and were easy to miss (I may not have found all of them).
>
> jeff
>
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
More information about the jboss-as7-dev
mailing list