Hi Heiko,

>use read-attribute:
well that was my first trial, however it seems that attribute names does not map to earlier AS Mbean attributes:

[localhost:9999 /] /subsystem=datasources/data-source="java:/H2DS":read-attribute
(name="ConnectionCount")
{
    "outcome" => "failed",
    "failure-description" => "No known attribute called ConnectionCount"
}

By using
/subsystem=datasources/data-source="java:/H2DS":read-resource(include-runtime=true)
produces the just the initial set of properties, though it may be that simply no runtime information is available at the moment......

[localhost:9999 /] /subsystem=datasources/data-source="java:/H2DS":read-resource
(include-runtime=true)
{
    "outcome" => "success",
    "result" => {
        "connection-url" => "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1",
        "driver-class" => "org.h2.Driver",
        "jndi-name" => "java:/H2DS",
        "driver" => "org.h2.Driver#1.2",
        "pool-name" => "H2DS",
        "use-java-context" => true,
        "enabled" => true,
        "pool-prefill" => true,
        "pool-use-strict-min" => false,
        "user-name" => "sa",
        "password" => "sa",
        "share-prepared-statements" => false,
        "background-validation" => false,
        "use-fast-fail" => false,
        "validate-on-match" => false,
        "idle-timeout-minutes" => undefined,
        "blocking-timeout-wait-millis" => undefined,
        "background-validation-minutes" => undefined,
        "min-pool-size" => undefined,
        "max-pool-size" => undefined
    },
    "compensating-operation" => undefined
}


Francesco




2011/5/9 Heiko W.Rupp <hrupp@redhat.com>

Am 09.05.2011 um 13:31 schrieb Francesco Marchioni:

> Dear devs,
> I'm wondering how runtime attributes (such as ConnectionCount for a ManagedConnection Pool, or Thread's QueueSize) could be gathered on AS 7.
> By using CLI ? Using a recursive read-resource, just dumps the resource startup properties.....


use read-attribute:

[domain@localhost:9999 connector=http] :read-attribute(name=maxTime)
{
   "outcome" => "success",
   "result" => "no metrics available",
   "compensating-operation" => undefined
}



_______________________________________________
jboss-as7-dev mailing list
jboss-as7-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev