0 Replies Latest reply on Jan 25, 2016 11:39 AM by Conrad Armstrong

    Getting datasource properties via MBeanServer

    Conrad Armstrong Newbie

      This is using JBoss 6.1. I have a deployed data source XML file in the following format:




        <connection-url>the value I want to see</connection-url>






      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?