Example usage for org.apache.commons.dbcp2 Constants JMX_CONNECTION_POOL_PREFIX

List of usage examples for org.apache.commons.dbcp2 Constants JMX_CONNECTION_POOL_PREFIX

Introduction

In this page you can find the example usage for org.apache.commons.dbcp2 Constants JMX_CONNECTION_POOL_PREFIX.

Prototype

String JMX_CONNECTION_POOL_PREFIX

To view the source code for org.apache.commons.dbcp2 Constants JMX_CONNECTION_POOL_PREFIX.

Click Source Link

Usage

From source file:JDBCPool.dbcp.demo.sourcecode.BasicDataSource.java

private void updateJmxName(GenericObjectPoolConfig config) {
    if (registeredJmxName == null) {
        return;//from ww w. j  a v a2  s .  c o m
    }
    StringBuilder base = new StringBuilder(registeredJmxName.toString());
    base.append(Constants.JMX_CONNECTION_POOL_BASE_EXT);
    config.setJmxNameBase(base.toString());
    config.setJmxNamePrefix(Constants.JMX_CONNECTION_POOL_PREFIX);
}