Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I get the total number of active/idle connections for a Weblogic datasource?
    primarykey
    data
    text
    <p>In our WebLogic application (Spring 2.5x), I want to determine, via Java code, the number of active and idle database connections that we have open on our server.</p> <p>The WL domain for the app has a registered JDBCSystemResource. The app accesses it using JNDI, like:</p> <pre><code>&lt;bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"&gt; &lt;property name="jndiName" value="myJDBC.tx.ds" /&gt; &lt;/bean&gt; </code></pre> <p>However, the DataSource doesn't expose any information about the state of the connection pool.</p> <p>In the WL console, I've configured the connection pool to track the # of active connections. I can see that the information is being gathered; howerver, I don't know how to reach this information in my application code. What do I have to do to get the diagnostic info about the connection pool from WebLogic? I'm interested in doing it using app code, NOT through the WL console.</p> <p>Our group spent some time trying to figure out how to get the information through JMX, but we haven't had any luck, so far. Any guidance would be appreciated.</p> <p><strong>Update:</strong></p> <p>I determined that JDBCDataSourceRuntimeMBean (as +JoseK mentioned) provides the details that I need. I'm able to connect with JMX authentication disabled; but, when I enable JMX authentication, I get:</p> <pre><code>Error: Password file not found: C:\bea\JROCKI~1\jre\lib\management\jmxremote.password [JRockit] Failed to start the management agent. Note that the management agent requires that you either explicitly disable security or that you configure and enable security. Please see the documentation for details. java.lang.RuntimeException: Password file not found </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload