[jboss-jira] [JBoss JIRA] (AS7-6846) Expose module loading information via the management API

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Fri Apr 5 23:12:42 EDT 2013


Brian Stansberry created AS7-6846:
-------------------------------------

             Summary: Expose module loading information via the management API
                 Key: AS7-6846
                 URL: https://issues.jboss.org/browse/AS7-6846
             Project: Application Server 7
          Issue Type: Feature Request
          Components: Domain Management
            Reporter: Brian Stansberry
            Assignee: Brian Stansberry
             Fix For: 8.0.0.Alpha1


The layered distribution changes increase the possibility that a module will be loaded from a location other than the standard spot for modules that ship with the base AS distribution. So we want to expose via the management API information about the possible module loading roots as well as data about the locations from which a given module is loading resources.

To find the ordered list of module roots, read an attribute from a newly created resource, core-service=module-loading:
 
{code}
[standalone at localhost:9999 /] /core-service=module-loading:read-attribute(name=module-roots)
{
    "outcome" => "success",
    "result" => [
        "/Users/bstansberry/dev/jbossas/bootstrap/jboss-as/build/target/jboss-as-8.0.0.Alpha1-SNAPSHOT/modules",
        "/Users/bstansberry/dev/jbossas/bootstrap/jboss-as/build/target/jboss-as-8.0.0.Alpha1-SNAPSHOT/modules/system/layers/base"
    ]
}
{code} 

To find the paths from which a module loads resources, invoke an operation on that same resource:
 
{code}
[standalone at localhost:9999 /] /core-service=module-loading:list-resource-loader-paths(module=org.hibernate)
{
    "outcome" => "success",
    "result" => [
        "/Users/bstansberry/dev/jbossas/bootstrap/jboss-as/build/target/jboss-as-8.0.0.Alpha1-SNAPSHOT/modules/system/layers/base/org/hibernate/main/hibernate-core-4.2.0.Final.jar",
        "/Users/bstansberry/dev/jbossas/bootstrap/jboss-as/build/target/jboss-as-8.0.0.Alpha1-SNAPSHOT/modules/system/layers/base/org/hibernate/main/hibernate-entitymanager-4.2.0.Final.jar",
        "/Users/bstansberry/dev/jbossas/bootstrap/jboss-as/build/target/jboss-as-8.0.0.Alpha1-SNAPSHOT/modules/system/layers/base/org/hibernate/main/hibernate-infinispan-4.2.0.Final.jar",
        "/Users/bstansberry/dev/jbossas/bootstrap/jboss-as/build/target/jboss-as-8.0.0.Alpha1-SNAPSHOT/modules/system/layers/base/org/hibernate/main/lib"
    ]
}
{code} 
 
The formal description of the above:
 
{code}
[standalone at localhost:9999 /] /core-service=module-loading:read-resource-description(operations=true,inherited=false)
{
    "outcome" => "success",
    "result" => {
        "description" => "The modular classloading system.",
        "attributes" => {"module-roots" => {
            "type" => LIST,
            "description" => "A list of filesystem locations under which the module loading system looks for modules, arranged in order of precedence.",
            "expressions-allowed" => false,
            "nillable" => false,
            "deprecated" => {
                "since" => "1.4.0",
                "reason" => "Experimental and unsupported."
            },
            "value-type" => {"module-root" => {
                "type" => STRING,
                "description" => "Filesystem location under which the module loading system looks for modules.",
                "expressions-allowed" => false,
                "nillable" => false,
                "min-length" => 1L,
                "max-length" => 2147483647L
            }},
            "access-type" => "read-only",
            "storage" => "runtime"
        }},
        "operations" => {"list-resource-loader-paths" => {
            "operation-name" => "list-resource-loader-paths",
            "description" => "Provides a list of filesystem paths of the module, if there are any.",
            "request-properties" => {"module" => {
                "type" => STRING,
                "description" => "The identifier of the module, in <name>[:<slot>] format. If the slot is not provided, a value of \"main\" is assumed.",
                "expressions-allowed" => false,
                "required" => true,
                "nillable" => false,
                "min-length" => 1L,
                "max-length" => 2147483647L
            }},
            "reply-properties" => {
                "type" => LIST,
                "value-type" => STRING,
                "description" => "A list, each of whose elements is a filesystem location from which the module can load resources."
            },
            "deprecated" => {
                "since" => "1.4.0",
                "reason" => "Experimental and unsupported."
            }
        }},
        "children" => {}
    }
}
{code}

--
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