0

I would like to know what does the numIdle attribute refers to.

On the tomcat FAQ there the attributes numActive and numIdle are reffered on the JNDI DataSource section. I have been able to identify that numActive is the number of active connections on the pool. I would like to know what connections are established but idle(with no running thread associated to it). I imagined that value was numIdle but its value is different from Probe's "number of established connections that can be reused"; On probe that value is always 8 but numIdle is constantly 0.

Is there an attribute that provides that value?

1 Answers1

2

According to this link it means the following:

enter image description here

I wonder if it is still supported by Tomcat 7 and 8. It seems that it is supported by Tomcat 6 (see last edited 2013-12-19 10:14:01 by DmytroMrachkovskyi at the bottom of the website). Have you tried to configure it in Tomcat 7 and 8. Does it start?

What is an Idle Instance?

According to this URL it is:

an instance that has not been started

Code

SpringSource / org.apache.tomcat .....pache.tomcat.jdbc / 1.0.8.5 [1.0.8.5 - 1.0.9.3] [1.0.9.0] / org / apache / tomcat / jdbc / pool / mbeans-descriptors.xml

The number of established connections in the pool that are idle

<mbeans-descriptors>

    <mbean        name="TomcatJDBCPool"
           description="Provides per diagnostic metrics and notifications for JDBC operations"
                domain="tomcat"
                 group="jdbc"
                  type="org.apache.tomcat.jdbc.pool.DataSource">

...

    <attribute    name="idle"
           description="The number of established connections in the pool that are idle"
                  type="java.lang.Integer"
             writeable="false"/>

    <attribute    name="numIdle"
           description="Same as the idle attribute"
                  type="java.lang.Integer"
             writeable="false"/>

    <attribute    name="active"
           description="The number of established connections in the pool that are in use"
                  type="java.lang.Integer"
             writeable="false"/>

    <attribute    name="numActive"
           description="Same as the active attribute"
                  type="java.lang.Integer"
             writeable="false"/>

...

    <operation    name="testIdle" 
                  description="forces a validation of abandoned connections" 
                  impact="ACTION" 
                  returnType="void" />
  </mbean>

</mbeans-descriptors>
030
  • 5,901
  • 13
  • 68
  • 110
  • Reading psy-probe's [source code](https://github.com/psi-probe/psi-probe/blob/eeb4ca7a69cecb36dc52b341e4d9cea707a29fee/tomcat70adapter/src/main/java/com/googlecode/psiprobe/beans/Tomcat7DbcpDatasourceAccessor.java#L33) `established = busy + inactive`. Adding that to the information you provided, now I'm able to understand the those values. – Marcelo Lacerda Dec 03 '15 at 14:13