[jboss-jira] [JBoss JIRA] (AS7-4913) Server sends "big interger <val>" for config entries when a reload is needed
Brian Stansberry (JIRA)
jira-events at lists.jboss.org
Tue Dec 11 12:06:17 EST 2012
[ https://issues.jboss.org/browse/AS7-4913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740696#comment-12740696 ]
Brian Stansberry commented on AS7-4913:
---------------------------------------
As for the limitation question, it's a weakness in our operation handling that we aren't converting operation inputs into the expected ModelType before storing in the model. We are validating that the provided type is convertible, but we aren't actually converting, e.g. reading ModelType.BIG_INTEGER but storing ModelType.INT.
The validation in ModelTypeValidator has flaws as well, since it's relying on the ModelNode throwing an exception if the conversion is invalid. But BigIntegerModelValue will not throw an exception from asInt() if a narrowing would occur.
> Server sends "big interger <val>" for config entries when a reload is needed
> ----------------------------------------------------------------------------
>
> Key: AS7-4913
> URL: https://issues.jboss.org/browse/AS7-4913
> Project: Application Server 7
> Issue Type: Bug
> Components: Domain Management, JCA
> Affects Versions: 7.1.2.Final (EAP)
> Reporter: Heiko Rupp
> Assignee: David Lloyd
> Priority: Minor
> Labels: rhq
> Fix For: 7.2.0.Alpha1
>
>
> RHQ sends JSON like this to change e.g. the max-pool-size setting of a data source:
> {"operation":"composite","steps":[{"operation":"write-attribute","address":[{"subsystem":"datasources"},{"data-source":"ExampleDS"}],"name":"max-pool-size","value":75},{"operation":"write-attribute","address":[{"subsystem":"datasources"},{"data-source":"ExampleDS"}],"name":"use-fast-fail","value":false}],"address":[]}
> Server returns success.
> When I directly go to the cli afterwards I see:
> [standalone at localhost:9999 /] /subsystem=datasources/data-source=ExampleDS:read-attribute(name=max-pool-size)
> {
> "outcome" => "success",
> "result" => big integer 75,
> "response-headers" => {"process-state" => "restart-required"}
> }
> Note the "big integer"
> [standalone at localhost:9999 /] /:reload
> {"outcome" => "success"}
> [standalone at localhost:9999 /] /subsystem=datasources/data-source=ExampleDS:read-attribute(name=max-pool-size)
> {
> "outcome" => "success",
> "result" => 75
> }
> [standalone at localhost:9999 /]
> Now the server acts as always.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list