Class ProxoolJMXHelper
- java.lang.Object
-
- org.logicalcobwebs.proxool.admin.jmx.ProxoolJMXHelper
-
public class ProxoolJMXHelper extends java.lang.Object
Utilities for Proxool JMX instrumentation.- Since:
- Proxool 0.8
- Version:
- $Revision: 1.7 $, $Date: 2006/01/18 14:39:56 $
- Author:
- Christian Nedregaard (christian_nedregaard@email.com), $Author: billhorsman $ (current maintainer)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.management.ObjectName
getObjectName(java.lang.String alias)
Get the prefered JMX object name for a Proxool pool.static java.lang.String
getValidIdentifier(java.lang.String propertyName)
Generate a valid JMX identifier attribute name from a Proxool property name.static void
registerPool(java.lang.String alias, java.util.Properties poolPropeties)
Create and register aConnectionPoolMBean
to the given agents.static void
unregisterPool(java.lang.String alias, java.util.Properties poolPropeties)
Unregister aConnectionPoolMBean
from the given agents.
-
-
-
Method Detail
-
registerPool
public static void registerPool(java.lang.String alias, java.util.Properties poolPropeties) throws ProxoolException
Create and register aConnectionPoolMBean
to the given agents. Will log errors instead of throwing exceptions if one or more of the registrations fails.- Parameters:
poolPropeties
- the complete pool properties.- Throws:
ProxoolException
- if the pool can not be found.
-
unregisterPool
public static void unregisterPool(java.lang.String alias, java.util.Properties poolPropeties)
Unregister aConnectionPoolMBean
from the given agents. Will log errors instead of throwing exceptions if one or more of the unregistrations fails.- Parameters:
poolPropeties
- the complete pool properties.
-
getObjectName
public static javax.management.ObjectName getObjectName(java.lang.String alias) throws javax.management.MalformedObjectNameException
Get the prefered JMX object name for a Proxool pool.- Parameters:
alias
- the alias of the pool.- Returns:
- the generated object name.
- Throws:
javax.management.MalformedObjectNameException
- if the creation of the object name fails.
-
getValidIdentifier
public static java.lang.String getValidIdentifier(java.lang.String propertyName)
Generate a valid JMX identifier attribute name from a Proxool property name. This basically involves changing all occurences of-<char>
to<uppercase char>
.
driver-properties
will for instance becomedriverProperties
.- Parameters:
propertyName
- the name to be converted.- Returns:
- the converted attribute name.
-
-