public synchronized void registerMonitor(String name, ConnectionPool<?> pool) {
String monitorName = generateMonitorName(name);
if (!monitors.containsKey(monitorName)) {
JmxConnectionPoolMonitorMBean mbean;
try {
LOG.info("Registering mbean: " + monitorName);
ObjectName oName = new ObjectName(monitorName);
mbean = new JmxConnectionPoolMonitor(pool);
monitors.put(monitorName, mbean);