This is using JBoss 6.1. I have a deployed data source XML file in the following format:
<datasources>
<local-tx-datasource>
<jndi-name>myOraclePool</jndi-name>
<connection-url>the value I want to see</connection-url>
<driver-class>something.appropriate</driver-class>
...
</local-tx-datasource>
</datasources>
The data source does deploy and works fine. I want to programmatically find the data source's properties at runtime. I'm using the exact Java code as shown on this blog: JBoss 6.x : Retrieve Datasource properties ( username, database name, password) at runtime, using JMX | My Fascinations
But I get this exception in the call to server.getAttribute(managedConnectionFactoryForDS, "TransactionSupport"):
Caused by: javax.management.InstanceNotFoundException: jboss.jca:name=myOraclePool,service=ManagedConnectionFactory is not registered.
at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:526)
at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:559)
Should I be using something other than "jboss.jca:name" in the formation of the ObjectName?