Class ConnectionPoolMBean
- java.lang.Object
-
- org.logicalcobwebs.proxool.admin.jmx.ConnectionPoolMBean
-
- All Implemented Interfaces:
javax.management.DynamicMBean
,javax.management.MBeanRegistration
,javax.management.NotificationBroadcaster
,ConfigurationListenerIF
,ProxoolListenerIF
public class ConnectionPoolMBean extends java.lang.Object implements javax.management.DynamicMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, ProxoolListenerIF, ConfigurationListenerIF
JMX DynamicMBean adapter for a Proxool connection pool.
See the configuration documentation to learn how to activate a pool for JMX. No programming is necessary to do this.Attributes
- alias
- driverClass
- driverUrl
- driverProperties
- fatalSqlException
- houseKeepingSleeptime
- houseKeepingTestSql
- maximumActiveTime
- maximumConnectionCount
- maximumConnectionLifetime
- minimumConnectionCount
- maximumNewConnections
- overloadWithoutRefusalLifetime
- recentlyStartedThreshold
- prototypeCount
- trace
- verbose
Operations
- shutdown
Notifications
- Since:
- Proxool 0.8
- Version:
- $Revision: 1.16 $, $Date: 2007/06/19 11:33:36 $
- Author:
- Christian Nedregaard (christian_nedregaard@email.com), $Author: billhorsman $ (current maintainer)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NOTIFICATION_TYPE_DEFINITION_UPDATED
Notification type emitted when the pool definition is updated.
-
Constructor Summary
Constructors Constructor Description ConnectionPoolMBean(java.lang.String alias, java.util.Properties poolProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNotificationListener(javax.management.NotificationListener notificationListener, javax.management.NotificationFilter notificationFilter, java.lang.Object handBack)
void
definitionUpdated(ConnectionPoolDefinitionIF connectionPoolDefinition, java.util.Properties completeInfo, java.util.Properties changedInfo)
Update the attributes of this MBean and emit aNOTIFICATION_TYPE_DEFINITION_UPDATED
event.java.lang.Object
getAttribute(java.lang.String attributeName)
javax.management.AttributeList
getAttributes(java.lang.String[] attributeNames)
javax.management.MBeanInfo
getMBeanInfo()
javax.management.MBeanNotificationInfo[]
getNotificationInfo()
java.lang.Object
invoke(java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)
void
onRegistration(ConnectionPoolDefinitionIF connectionPoolDefinition, java.util.Properties completeInfo)
Not used.void
onShutdown(java.lang.String alias)
If the given alias equals this pools alias: Unregister this JMX bean.void
postDeregister()
void
postRegister(java.lang.Boolean success)
void
preDeregister()
javax.management.ObjectName
preRegister(javax.management.MBeanServer mBeanServer, javax.management.ObjectName objectName)
void
removeNotificationListener(javax.management.NotificationListener notificationListener)
void
setAttribute(javax.management.Attribute attribute)
javax.management.AttributeList
setAttributes(javax.management.AttributeList attributes)
-
-
-
Field Detail
-
NOTIFICATION_TYPE_DEFINITION_UPDATED
public static final java.lang.String NOTIFICATION_TYPE_DEFINITION_UPDATED
Notification type emitted when the pool definition is updated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConnectionPoolMBean
public ConnectionPoolMBean(java.lang.String alias, java.util.Properties poolProperties) throws ProxoolException
- Throws:
ProxoolException
-
-
Method Detail
-
getAttribute
public java.lang.Object getAttribute(java.lang.String attributeName) throws javax.management.AttributeNotFoundException, javax.management.MBeanException, javax.management.ReflectionException
- Specified by:
getAttribute
in interfacejavax.management.DynamicMBean
- Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
- See Also:
DynamicMBean.getAttribute(java.lang.String)
-
setAttribute
public void setAttribute(javax.management.Attribute attribute) throws javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException, javax.management.MBeanException, javax.management.ReflectionException
- Specified by:
setAttribute
in interfacejavax.management.DynamicMBean
- Throws:
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException
- See Also:
DynamicMBean.setAttribute(javax.management.Attribute)
-
getAttributes
public javax.management.AttributeList getAttributes(java.lang.String[] attributeNames)
- Specified by:
getAttributes
in interfacejavax.management.DynamicMBean
- See Also:
DynamicMBean.getAttributes(java.lang.String[])
-
setAttributes
public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
- Specified by:
setAttributes
in interfacejavax.management.DynamicMBean
- See Also:
DynamicMBean.setAttributes(javax.management.AttributeList)
-
invoke
public java.lang.Object invoke(java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature) throws javax.management.MBeanException, javax.management.ReflectionException
- Specified by:
invoke
in interfacejavax.management.DynamicMBean
- Throws:
javax.management.MBeanException
javax.management.ReflectionException
- See Also:
DynamicMBean.invoke(java.lang.String, java.lang.Object[], java.lang.String[])
-
getMBeanInfo
public javax.management.MBeanInfo getMBeanInfo()
- Specified by:
getMBeanInfo
in interfacejavax.management.DynamicMBean
- See Also:
DynamicMBean.getMBeanInfo()
-
onRegistration
public void onRegistration(ConnectionPoolDefinitionIF connectionPoolDefinition, java.util.Properties completeInfo)
Not used.- Specified by:
onRegistration
in interfaceProxoolListenerIF
- Parameters:
connectionPoolDefinition
- the new definition.completeInfo
- the properties that could be used to create this definition.- See Also:
ProxoolListenerIF.onRegistration(org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF, java.util.Properties)
-
onShutdown
public void onShutdown(java.lang.String alias)
If the given alias equals this pools alias: Unregister this JMX bean.- Specified by:
onShutdown
in interfaceProxoolListenerIF
- Parameters:
alias
- the alias of the pool about to be shut down.- See Also:
ProxoolListenerIF.onShutdown(java.lang.String)
-
definitionUpdated
public void definitionUpdated(ConnectionPoolDefinitionIF connectionPoolDefinition, java.util.Properties completeInfo, java.util.Properties changedInfo)
Update the attributes of this MBean and emit aNOTIFICATION_TYPE_DEFINITION_UPDATED
event.- Specified by:
definitionUpdated
in interfaceConfigurationListenerIF
- Parameters:
connectionPoolDefinition
- the new definitioncompleteInfo
- the properties that could be used to create this definitionchangedInfo
- only the properties that have changed since the pool was registered, or this method was las called.- See Also:
ConfigurationListenerIF.definitionUpdated(org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF, java.util.Properties, java.util.Properties)
-
addNotificationListener
public void addNotificationListener(javax.management.NotificationListener notificationListener, javax.management.NotificationFilter notificationFilter, java.lang.Object handBack) throws java.lang.IllegalArgumentException
- Specified by:
addNotificationListener
in interfacejavax.management.NotificationBroadcaster
- Throws:
java.lang.IllegalArgumentException
- See Also:
NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
-
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener notificationListener) throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interfacejavax.management.NotificationBroadcaster
- Throws:
javax.management.ListenerNotFoundException
- See Also:
NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener)
-
getNotificationInfo
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
- Specified by:
getNotificationInfo
in interfacejavax.management.NotificationBroadcaster
- See Also:
NotificationBroadcaster.getNotificationInfo()
-
preRegister
public javax.management.ObjectName preRegister(javax.management.MBeanServer mBeanServer, javax.management.ObjectName objectName) throws java.lang.Exception
- Specified by:
preRegister
in interfacejavax.management.MBeanRegistration
- Throws:
java.lang.Exception
- See Also:
MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName)
-
postRegister
public void postRegister(java.lang.Boolean success)
- Specified by:
postRegister
in interfacejavax.management.MBeanRegistration
- See Also:
MBeanRegistration.postRegister(java.lang.Boolean)
-
preDeregister
public void preDeregister() throws java.lang.Exception
- Specified by:
preDeregister
in interfacejavax.management.MBeanRegistration
- Throws:
java.lang.Exception
- See Also:
MBeanRegistration.preDeregister()
-
postDeregister
public void postDeregister()
- Specified by:
postDeregister
in interfacejavax.management.MBeanRegistration
- See Also:
MBeanRegistration.postDeregister()
-
-