[
https://issues.jboss.org/browse/AS7-4525?page=com.atlassian.jira.plugin.s...
]
jaikiran pai edited comment on AS7-4525 at 4/16/12 10:34 AM:
-------------------------------------------------------------
The SimpleAttributeDefinition ends up wrapping the TimeUnitValidator within a
NillableOrExpressionParameterValidator
https://github.com/jbossas/jboss-as/blob/master/controller/src/main/java/....
So the AttributeDefinition's validator gets set as
NillableOrExpressionParameterValidator which then fails the instanceof
AllowedValuesValidator check while generating the model description.
(Edit - fixed minor typo)
was (Author: jaikiran):
The SimpleAttributeDefinition ends up wrapping the TimeUnitValidator within a
NillableOrExpressionParameterValidator
https://github.com/jbossas/jboss-as/blob/master/controller/src/main/java/....
So the AttributeDefinition's validator gets set as
NillableOrExpressionParameterValidator which then fails the instanceof
AllowedValuesValidator check while generation the model description.
"allowed-values" data not showing up in resource metadata
---------------------------------------------------------
Key: AS7-4525
URL:
https://issues.jboss.org/browse/AS7-4525
Project: Application Server 7
Issue Type: Bug
Components: Domain Management
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Priority: Critical
Fix For: 7.1.2.Final-redhat1
Jaikiran Pai reports:
IIRC some releases back, if an attribute in a domain model resource,
allowed a certain set of values, then a read-resource-description via
the CLI would show the allowed values. But checking against the latest
upstream, I don't see it available any more. For example the
timeout-unit attribute of the strict-max-bean-instance-pool resource no
longer shows the allowed values:
[standalone@localhost:9999 /]
/subsystem=ejb3/strict-max-bean-instance-pool=slsb-strict-max-pool:read-resource-description
{
"outcome" => "success",
"result" => {
"description" => "A bean instance pool with a strict upper
limit",
"attributes" => {
"timeout-unit" => {
"type" => STRING,
"description" => "The instance acquisition timeout
unit",
"expressions-allowed" => false,
"nillable" => true,
"default" => "MINUTES",
"access-type" => "read-write",
"storage" => "configuration",
"restart-required" => "no-services"
},
...
A quick look at the resource he mentioned shows that TimeUnitValidator is registered as
the validator and it implements AllowedValuesValidator. The standard AttributeDefinition
metadata generation logic is checking for AllowedValuesValidator and is using that to
create the "allowed-values" metadata. So on the surface it looks ok; must be
something subtle.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira