Can't see statistics on a resource adapter deployed in JBoss EAP

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.4

Issue

After deploying a resource adapter in EAP and enabling statistics there is no way of displaying them:

[standalone@localhost:9990 /] /subsystem=resource-adapters/resource-adapter=wmq-ra/connection-definitions=wmqCF/statistics=pool:read-resource(recursive=true,include-defaults=true,include-runtime=true)
Failed to get the list of the operation properties: "WFLYCTL0030: No resource definition is registered for address [
    ("subsystem" => "resource-adapters"),
    ("resource-adapter" => "wmq-ra"),
    ("connection-definitions" => "wmqCF"),
    ("statistics" => "pool")
]"

Resolution

This is cause by missing JNDI context in the connection JNDI name. If the JNDI name for a resource adapter connection is defined as
jndi-name="/wmq/jms/cf/wmqCFXA" the statistics will not be shown. Adding appropriate JNDI context fixes the issue, for example a connection with JNDI name defined as jndi-name="java:/wmq/jms/cf/wmqCFXA" will show the connection statistics.

Note: The jndi-name has always been required as per the jboss-as-resource-adapters & wildfly-resource-adapters schemas and not specifying it will result in an error.

jboss-as-resource-adapters_1_0.xsd:    <xs:attribute name="jndi-name" type="xs:token" use="required">
jboss-as-resource-adapters_1_1.xsd:    <xs:attribute name="jndi-name" type="xs:token" use="required">
wildfly-resource-adapters_2_0.xsd:    <xs:attribute name="jndi-name" type="xs:token" use="required">
wildfly-resource-adapters_3_0.xsd:    <xs:attribute name="jndi-name" type="xs:token" use="required">
wildfly-resource-adapters_4_0.xsd:    <xs:attribute name="jndi-name" type="xs:token" use="required">
wildfly-resource-adapters_5_0.xsd:    <xs:attribute name="jndi-name" type="xs:token" use="required">
wildfly-resource-adapters_6_0.xsd:    <xs:attribute name="jndi-name" type="xs:token" use="required">

Root Cause

This is a defect This content is not included.JBEAP-23780

Components
Category
Tags

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.