Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-17517

Enable Apache DBCP JMX mbeans by default for runtime monitoring of database connection pool status

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 12.6
    • 12.5.1
    • Old Core
    • None
    • Unknown

    Description

      The documentation at https://commons.apache.org/proper/commons-dbcp/configuration.html exposes the following configuration parameter:

      jmxName 		Registers the DataSource as JMX MBean under specified name. The name has to conform to the JMX Object Name Syntax (see javadoc). 
      

      Following up on this and on a reply from https://stackoverflow.com/a/38337147/5198689, I got it working by adding the following parameter to hibernate.cfg.xml:

      <property name="hibernate.dbcp.jmxName">org.apache.dbcp:DataSource=dbcp</property>
      

      (Note: AFAIU, the name can be anything, just tried to follow the JMX naming, but it can be anything else)

      Produces the following info (viewed with glowroot):

      Attachments

        1. jmx-dbcp.png
          4.71 MB
          Eduard Moraru
        2. jmx-dbcp.png
          4.47 MB
          Eduard Moraru
        3. Screenshot 2020-07-03 at 22.27.22.png
          353 kB
          Vincent Massol

        Activity

          People

            vmassol Vincent Massol
            enygma Eduard Moraru
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: