The second case worked for me without an issue.
[standalone@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.