public interface JDBCResourceConnectionPoolManagementMBean
JDBCResourceConnectionPoolManagementMBean
interface provides methods to modify
the configuration settings of a JDBC resource's connection pool.
The JMX Object Name of a JDBCResourceConnectionPoolManagementMBean
can be obtained
from a PersistenceManagementMBean
.
Modifier and Type | Field and Description |
---|---|
static String |
MBEAN_NAME
The name of MBeans of this type, equal to the string "JdbcResourceConnectionPool".
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Notify the SLEE that the
JDBCResourceConnectionPoolManagementMBean is no longer
required by the management client. |
CompositeData |
getConfiguration()
Get a description of the connection pool configuration.
|
long |
getConnectionPoolTimeout()
Get the connection pool timeout.
|
int |
getIdleCheckInterval()
Get the time between idle connection discard checks.
|
int |
getMaxConnections()
Get the maximum total number of connections that can exist at any one time.
|
int |
getMaxIdleConnections()
Get the maximum number of idle connections that can exist at any one time.
|
int |
getMaxIdleTime()
Get the time a connection can be idle for before becoming eligible for discard.
|
int |
getMinConnections()
Get the minimum total number of connections that should exist at any one time.
|
void |
setConnectionPoolTimeout(long timeout)
Set the connection pool timeout.
|
void |
setIdleCheckInterval(int idleCheckInterval)
Set the time between idle connection discard checks.
|
void |
setMaxConnections(int maxConnections)
Set the maximum total number of connections that can exist at any one time.
|
void |
setMaxIdleConnections(int maxIdleConnections)
Set the maximum number of idle connections that can exist at any one time.
|
void |
setMaxIdleTime(int maxIdleTime)
Set the time period after which an idle connection may become eligible for discard.
|
void |
setMinConnections(int minConnections)
Set the minimum total number of connections that should exist at any one time.
|
void |
setParameters(Map<String,Object> parameters)
Bulk set a number of connection pool configuration parameters.
|
static final String MBEAN_NAME
int getMaxConnections() throws ConfigurationException
ConfigurationException
- if the operation fails due to a configuration error.void setMaxConnections(int maxConnections) throws ConfigurationException
maxConnections
- the maximum total number of connections. This value must be
greater than 0 and greater than or equal to getMaxIdleConnections()
.ConfigurationException
- if the operation fails due to a configuration error.int getMinConnections() throws ConfigurationException
ConfigurationException
- if the operation fails due to a configuration error.void setMinConnections(int minConnections) throws ConfigurationException
minConnections
- the minimum total number of connections that should exist..
This value must be at least 0 and less than or equal to getMaxIdleConnections()
.ConfigurationException
- if the operation fails due to a configuration error.int getMaxIdleConnections() throws ConfigurationException
ConfigurationException
- if the operation fails due to a configuration error.void setMaxIdleConnections(int maxIdleConnections) throws ConfigurationException
maxIdleConnections
- the maximum number of idle connections. This value must be
at least 0, less than or equal to getMaxConnections()
, and greater than
or equal to getMinConnections()
ConfigurationException
- if the operation fails due to a configuration error.int getMaxIdleTime() throws ConfigurationException
ConfigurationException
- if the operation fails due to a configuration error.void setMaxIdleTime(int maxIdleTime) throws ConfigurationException
getMinConnections()
.maxIdleTime
- the maximum idle time, measured in seconds. This value must be at
least 0, with 0 meaning that idle connections will never be discarded for this
reason.ConfigurationException
- if the operation fails due to a configuration error.int getIdleCheckInterval() throws ConfigurationException
getMaxIdleTime()
is greater than 0.ConfigurationException
- if the operation fails due to a configuration error.void setIdleCheckInterval(int idleCheckInterval) throws ConfigurationException
getMaxIdleTime()
is greater than 0.idleCheckInterval
- the idle connection discard check period, measured in seconds.
This value must be greater than 0.ConfigurationException
- if the operation fails due to a configuration error.long getConnectionPoolTimeout() throws ConfigurationException
ConfigurationException
- if the operation fails due to a configuration error.void setConnectionPoolTimeout(long timeout) throws ConfigurationException
timeout
- the connection pool timeout, measured in milliseconds. This value
must be greater than or equal to 0.ConfigurationException
- if the operation fails due to a configuration error.void setParameters(Map<String,Object> parameters) throws ConfigurationException
The parameters
argument is a map who's keys are property names (case insensitive)
and values are the values to be assigned to the corresponding property. The legal property
names and the expected type of their respective property value are given in the table below:
Property name (case insensitive) | Property value type |
---|---|
max-connections | java.lang.Integer |
min-connections | java.lang.Integer |
max-idle-connections | java.lang.Integer |
max-idle-time | java.lang.Integer |
idle-check-interval | java.lang.Integer |
connection-pool-timeout | java.lang.Long |
parameters
- a map of the configuration to set, as given above.ConfigurationException
- if an unrecognised configuration parameter is included,
a configuration parameter is given an invalid value, the final set of configuration
properties fails a validation check, or the operation fails due to an internal
configuration error.CompositeData getConfiguration() throws ConfigurationException
The CompositeData
object returned by this method has the following structure:
Field | Open Type | Description |
---|---|---|
max-connections | Integer | The value returned from the getMaxConnections() method. |
min-connections | Integer | The value returned from the getMinConnections() method. |
max-idle-connections | Integer | The value returned from the getMaxIdleConnections() method. |
max-idle-time | Integer | The value returned from the getMaxIdleTime() method. |
idle-check-interval | Integer | The value returned from the getIdleCheckInterval() method. |
connection-pool-timeout | Long | The value returned from the getConnectionPoolTimeout() method. |