How to enable JCA Resource Adapter statistics permanently in EAP 6/7?

Solution Verified - Updated -

Issue

  • While running the following JBoss CLI command to get the runtime statistics for one of the JCA Resource Adapters, getting the following output as 0 for all the attributes:
[standalone@padrt02:20155 /] /deployment=test.rar/subsystem=resource-adapters/statistics=statistics/connection-definitions=java\:\/global\/testConnector:read-resource(include-runtime=true)
{
    "outcome" => "success",
    "result" => {
        "ActiveCount" => "0",
        "AvailableCount" => "0",
        "AverageBlockingTime" => "0",
        "AverageCreationTime" => "0",
        "CreatedCount" => "0",
        "DestroyedCount" => "0",
        "InUseCount" => "0",
        "MaxCreationTime" => "0",
        "MaxUsedCount" => "0",
        "MaxWaitCount" => "0",
        "MaxWaitTime" => "0",
        "TimedOut" => "0",
        "TotalBlockingTime" => "0",
        "TotalCreationTime" => "0",
        "statistics-enabled" => false
    }
}
  • After enabling the resource-adapters statistics as below started getting the following outputs as expected but after restarting the server this resource-adapters statistics is again disabled:
[standalone@padrt02:20155 /] /deployment=jaf-rte-connector.rar/subsystem=resource-adapters/statistics=statistics/connection-definitions=java\:\/global\/OpscRteConnector:write-attribute(name=statistics-enabled, value=true)
{"outcome" => "success"}

[standalone@padrt02:20155 /] /deployment=jaf-rte-connector.rar/subsystem=resource-adapters/statistics=statistics/connection-definitions=java\:\/global\/OpscRteConnector:read-resource(include-runtime=true)
{
    "outcome" => "success",
    "result" => {
        "ActiveCount" => "5",
        "AvailableCount" => "31",
        "AverageBlockingTime" => "1",
        "AverageCreationTime" => "1",
        "CreatedCount" => "5",
        "DestroyedCount" => "0",
        "InUseCount" => "1",
        "MaxCreationTime" => "2",
        "MaxUsedCount" => "5",
        "MaxWaitCount" => "0",
        "MaxWaitTime" => "1",
        "TimedOut" => "0",
        "TotalBlockingTime" => "7",
        "TotalCreationTime" => "8",
        "statistics-enabled" => true
    }
}
  • How to enable JCA Resource Adapter statistics permanently in EAP 6?
  • Is there a way to have JBoss persist the enable-statistics setting after a system restart for a resource adapter?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.3, 6.4
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.