[jboss-jira] [JBoss JIRA] (WFCORE-973) JMX - Non string attributes dont work well with expressions & min/max
Enrique González Martínez (JIRA)
issues at jboss.org
Thu Sep 10 07:45:00 EDT 2015
[ https://issues.jboss.org/browse/WFCORE-973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107364#comment-13107364 ]
Enrique González Martínez commented on WFCORE-973:
--------------------------------------------------
Hi [~brian.stansberry]
The example is already in the test case of JMX. You need to uncomment a few things in the test case:
https://github.com/wildfly/wildfly-core/blob/2.0.0.Beta2/jmx/src/test/java/org/jboss/as/jmx/ModelControllerMBeanTestCase.java#L290
https://github.com/wildfly/wildfly-core/blob/2.0.0.Beta2/jmx/src/test/java/org/jboss/as/jmx/ModelControllerResourceDefinition.java#L211
I think the problem is in here (type converter is not taking into account the allowed expressions var of the model)
https://github.com/wildfly/wildfly-core/blob/2.0.0.Beta2/jmx/src/main/java/org/jboss/as/jmx/model/MBeanInfoFactory.java#L298
This returns AD string opentype as the type converter allows expressions ¿¿??
https://github.com/wildfly/wildfly-core/blob/2.0.0.Beta2/jmx/src/main/java/org/jboss/as/jmx/model/TypeConverters.java#L154
(variable expressions in TypeConverter object is true -> all values for the openmbean will be converted)
After that it fails to construct the openmbean information. (OpenMBeanParameterInfoSupport). The opentype is String so default values are converted from INT to STRING.
It only happens with param4 because it is the only one with default value
https://github.com/wildfly/wildfly-core/blob/2.0.0.Beta2/jmx/src/test/java/org/jboss/as/jmx/ModelControllerResourceDefinition.java#L210
I hope this helps.
> JMX - Non string attributes dont work well with expressions & min/max
> ---------------------------------------------------------------------
>
> Key: WFCORE-973
> URL: https://issues.jboss.org/browse/WFCORE-973
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management, JMX
> Reporter: Tomaz Cerar
> Assignee: Enrique González Martínez
> Priority: Minor
> Attachments: stacktrace.log
>
>
> See ModelControllerMBeanTestCase.java:255
> problem is in conversion of attributes and when we have expressions jmx attribute type becomes String even if AD is of type INT
> And if attribute has min/max setting mbean fails validation upon creation
> I am not actually sure how we can fix this.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list