https://issues.apache.org/bugzilla/show_bug.cgi?id=52654

             Bug #: 52654
           Summary: Incomplete documentation about DataSource JMX
                    registration outside a container
           Product: Tomcat Modules
           Version: unspecified
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: jdbc-pool
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


In https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html there's written:
If you're running outside of a container, you can register the DataSource
yourself under any object name you specify...


Actually that what you need to register is not the dataSource itself, as the
sentence above suggests, but rather is it's jmxPool.
Furthermore it may be necessary to force pool creation explicitly by calling
dataSource.createPool() before calling
mBeanServer.registerMBean(dataSource.getPool().getJmxPool(),objectname)
otherwise a NPE exception will raise.

Please document this

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to