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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.5.1
    • Fix Version/s: 12.6
    • Component/s: Old Core
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: