How to retrieve connection statistics for a resource adapter in EAP 6

Solution Verified - Updated -


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x


  • How can the "Active", "In-Use" and "Available" connections for a resource adapter be monitored?

  • I am trying to get the statistics in domain mode using the below example -


but when I am using tab to run command as above cli doesnt recognising "subsystem"

[domain@X.X.X.X:9999 /] /deployment=wmq.jmsra.rar/[not able to go further]


  • For a simple resource adapter (testRar.rar) with a connection factory bound in JNDI as java:/eis/ABCConnectionFactory the following CLI commands return connection statistics:
[disconnected /] connect
[standalone@localhost:9999 /] /deployment=testRar.rar/subsystem=resource-adapters/statistics=statistics/connection-definitions=java\:\/eis\/ABCConnectionFactory:read-resource(include-runtime=true)
    "outcome" => "success",
    "result" => {
        "ActiveCount" => "1",
        "AvailableCount" => "20",
        "AverageBlockingTime" => "0",
        "AverageCreationTime" => "0",
        "CreatedCount" => "1",
        "DestroyedCount" => "0",
        "InUseCount" => "0",
        "MaxCreationTime" => "0",
        "MaxUsedCount" => "1",
        "MaxWaitCount" => "0",
        "MaxWaitTime" => "0",
        "TimedOut" => "0",
        "TotalBlockingTime" => "0",
        "TotalCreationTime" => "0"
  • For domain mode CLI command will be :
[domain@localhost:9999 /] /host=<HOST_NAME>/server=<SERVER_NAME>/deployment=testRar.rar/subsystem=resource-adapters/statistics=statistics/connection-definitions=java\:\/eis\/ABCConnectionFactory:read-resource(include-runtime=true)

NOTE - From EAP 6.3.x onwards, resource adapter's statistics are disabled by default. Hence you need to enable it using CLI command :

[domain@localhost:9999 /] /host=<HOST_NAME>/server=<SERVER_NAME>/deployment=testRar.rar/subsystem=resource-adapters/statistics=statistics/connection-definitions=java\:\/eis\/ABCConnectionFactory:write-attribute(name=statistics-enabled,value=true)                            
  • It is not possible to obtain statistics if the resource adapter is deployed as a module and not as a deployment (i.e in deploy directory).

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.