[jboss-jira] [JBoss JIRA] (WFLY-3732) RaOperationUtil cannot handle unusual address formats
Brian Stansberry (JIRA)
issues at jboss.org
Wed Aug 13 19:42:29 EDT 2014
[ https://issues.jboss.org/browse/WFLY-3732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Stansberry resolved WFLY-3732.
------------------------------------
Resolution: Out of Date
This isn't a problem in WF; the code is different.
> RaOperationUtil cannot handle unusual address formats
> -----------------------------------------------------
>
> Key: WFLY-3732
> URL: https://issues.jboss.org/browse/WFLY-3732
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JCA
> Affects Versions: 8.1.0.Final
> Reporter: Brian Stansberry
> Assignee: Brian Stansberry
> Fix For: 9.0.0.Beta1
>
>
> RaOperationUtil is using a very unorthodox method of reading the address of the operation:
> final List<ModelNode> address = operation.get(ModelDescriptionConstants.ADDRESS).asList();
> final String id = address.get(address.size()-1).get(0).asString();
> The issue is the ModelNode returned by "address.get(address.size()-1)".
>
> When you use the CLI, the ModelNode is of ModelType.PROPERTY.
> To create a ModelNode of ModelType.PROPERTY using JSON syntax is difficult. (TBH I'm not sure how to do it.) The syntax in a typical curl command results in a node of ModelType.OBJECT.
> {code}
> "address":[{"subsystem":"resource-adapters"},{"resource-adapter":"my-adapter"}]
> {code}
> That get(0) call fails on ModelType.OBJECT. It's quite the quirk that it works for ModelType.PROPERTY.
> I'll replace that logic with standard stuff using PathAddress.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the jboss-jira
mailing list