[wildfly-dev] Improve query() operation for complex attributes?

James Perkins jperkins at redhat.com
Tue Nov 22 17:11:21 EST 2016


The second case worked for me without an issue.
[standalone at localhost:9990 /]
/deployment=batch-chunk.war/subsystem=jaxrs/rest-resource=*:query(select=["rest-resource-paths"])
{
    "outcome" => "success",
    "result" => [{
        "address" => [
            ("deployment" => "batch-chunk.war"),
            ("subsystem" => "jaxrs"),
            ("rest-resource" =>
"org.jboss.example.batch.rest.BatchResource")
        ],
        "outcome" => "success",
        "result" => {"rest-resource-paths" => [
            {
                "resource-path" => "batch/jobs",
                "consumes" => undefined,
                "produces" => ["application/json"],
                "java-method" => "javax.ws.rs.core.Response
org.jboss.example.batch.rest.BatchResource.listBatchJobs()",
                "resource-methods" => ["GET /batch-chunk/rest/batch/jobs"]
            },
            {
                "resource-path" => "batch/jobs/{status}",
                "consumes" => undefined,
                "produces" => ["application/json"],
                "java-method" => "javax.ws.rs.core.Response
org.jboss.example.batch.rest.BatchResource.listBatchJobs(@PathParam
java.lang.String status)",
                "resource-methods" => ["GET
/batch-chunk/rest/batch/jobs/{status}"]
            }
        ]}
    }]
}

The read-resource operation really does the same thing though in this case.

On Tue, Nov 22, 2016 at 12:51 AM, Lin Gao <lgao at redhat.com> wrote:

> Hi,
>
>   Each management resource has an operation named 'query()' to filter
> resources according to the condition passed by 'selector' and 'where'
> parameters, however it does not work for complex attributes.
>
>   2 example of complex attributes:
>
>      - 'query()' operation cannot find which 'possible-capabilities'
> provides the capability with name 'org.wildfly.data-source'
>      - It cannot find which 'rest-resource-paths' provides the REST
> endpoint 'resource-path=/helloworld' in jaxrs subsystem of a war deployment
> either.
>
>   Especially for the second case in above examples, it will be helpful for
> users when doing troubleshooting in case of large deployment.
>
>   Actually, it does not limit to the complex attributes, it would be good
> to be able to filter resources by condition specified by attribute value of
> nested child resources(not only by the first level of child resource).
>
>   WDYT?
>
> Best Regards
>
> --
> Lin Gao
> Software Engineer
> JBoss by Red Hat
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>



-- 
James R. Perkins
JBoss by Red Hat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20161122/dcb4aa71/attachment-0001.html 


More information about the wildfly-dev mailing list