org.ow2.jonas.dbm.internal.mbean
Class JDBCDataSource
java.lang.Object
org.ow2.jonas.lib.management.javaee.ManagedObject
org.ow2.jonas.lib.management.javaee.J2EEManagedObject
org.ow2.jonas.dbm.internal.mbean.JDBCDataSource
public class JDBCDataSource
- extends J2EEManagedObject
MBean class for JDBCDataSource Management.
This MBean manages a connection manager and its associated pool. This couple
represents the JOnAS data source implementation
- Author:
- Eric Hardesty JSR 77 (J2EE Management Standard), Adriana Danes add support for persistent reconfiguration
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDBCDataSource
public JDBCDataSource(String objectName,
ConnectionManager cm)
- Parameters:
objectName
- This MBean's OBJECT_NAMEcm
- Associated ConnectionManager reference
getJdbcDriver
public String getJdbcDriver()
- Returns:
- The OBJECT_NAME of the associated JDBCDriver MBean
setJdbcDriver
public void setJdbcDriver(String jdbcDriverObjectName)
- Parameters:
jdbcDriverObjectName
- OBJECT_NAME of the associated JDBCDriver MBean
getName
public String getName()
- Return the current data source name. Returns the local attribute value (optimize
call) - this value can't be changed, moreover, its used by private methods.
- Returns:
- The current data source name
getJndiName
public String getJndiName()
- Returns:
- The JNDI name
getDescription
public String getDescription()
- Returns:
- Description of this data source
getUrl
public String getUrl()
- Returns:
- The JDBC URL for the database
getUserName
public String getUserName()
- Returns:
- The user name for connection to the database
getUserPassword
public String getUserPassword()
- Returns:
- The password for connection to the database
getMapperName
public String getMapperName()
- Returns:
- The mapper JORM for the database
getJdbcConnCheckLevel
public Integer getJdbcConnCheckLevel()
- Returns:
- JDBC connection checking level
setJdbcConnCheckLevel
public void setJdbcConnCheckLevel(Integer level)
- Sets the JDBC connection checking level
- Parameters:
level
- connection level
getJdbcConnMaxAge
public Integer getJdbcConnMaxAge()
- Returns:
- JDBC connections maximum age
setJdbcConnMaxAge
public void setJdbcConnMaxAge(Integer mn)
- Parameters:
mn
- JDBC connections maximum age
getJdbcMaxConnPool
public Integer getJdbcMaxConnPool()
- Returns:
- max maximum size of JDBC connection pool
setJdbcMaxConnPool
public void setJdbcMaxConnPool(Integer max)
- Parameters:
max
- maximum size of JDBC connection pool
getJdbcMaxOpenTime
public Integer getJdbcMaxOpenTime()
- Returns:
- maximum opening time of JDBC connections
setJdbcMaxOpenTime
public void setJdbcMaxOpenTime(Integer mn)
- Parameters:
mn
- maximum opening time in minutes for JDBC connections
getJdbcMaxWaiters
public Integer getJdbcMaxWaiters()
- Returns:
- maximum nb of waiters allowed
setJdbcMaxWaiters
public void setJdbcMaxWaiters(Integer max)
- Parameters:
max
- maximum nb of waiters allowed
getJdbcMaxWaitTime
public Integer getJdbcMaxWaitTime()
- Returns:
- maximum time to wait for a connection, in seconds
setJdbcMaxWaitTime
public void setJdbcMaxWaitTime(Integer max)
- Parameters:
max
- maximum time to wait for a connection, in seconds
getJdbcPstmtMax
public Integer getJdbcPstmtMax()
- Returns:
- PreparedStatement cache size
setJdbcPstmtMax
public void setJdbcPstmtMax(Integer max)
- Parameters:
max
- PreparedStatement cache size
getJdbcMinConnPool
public Integer getJdbcMinConnPool()
- Returns:
- minimum size of connection pool
setJdbcMinConnPool
public void setJdbcMinConnPool(Integer min)
- MBean method allowing to set the minimum size of connection pool
- Parameters:
min
- minimum size of connection pool
getJdbcSamplingPeriod
public Integer getJdbcSamplingPeriod()
- Returns:
- sampling period for refresching pool statistics
setJdbcSamplingPeriod
public void setJdbcSamplingPeriod(Integer i)
- Parameters:
i
- sampling period for refresching pool statistics
getJdbcAdjustPeriod
public Integer getJdbcAdjustPeriod()
- Returns:
- adjust period for pool limit recomputing (in sec.)
setJdbcAdjustPeriod
public void setJdbcAdjustPeriod(Integer i)
- Parameters:
i
- adjust period for pool limit recomputing (in sec.)
getJdbcTestStatement
public String getJdbcTestStatement()
- Returns:
- SQL query for JDBC connections test
setJdbcTestStatement
public String setJdbcTestStatement(String test)
- Parameters:
test
- SQL query for JDBC connection test
- Returns:
- the test statement if the test succeeded, an error message otherwise
getConnectionFailures
public Integer getConnectionFailures()
- Returns:
- number of connection failures
getConnectionLeaks
public Integer getConnectionLeaks()
- Returns:
- number of connection leaks
getCurrentBusy
public Integer getCurrentBusy()
- Returns:
- number of busy connections
getBusyMax
public Integer getBusyMax()
- Returns:
- number of busy connections
getBusyMin
public Integer getBusyMin()
- Returns:
- number of busy connections
getCurrentInTx
public Integer getCurrentInTx()
- Returns:
- number of connections used in transactions
getCurrentOpened
public Integer getCurrentOpened()
- Returns:
- number of opened connections
getCurrentWaiters
public Integer getCurrentWaiters()
- Returns:
- current number of connection waiters
getOpenedCount
public Integer getOpenedCount()
- Returns:
- number of opened physical JDBC connections
getRejectedFull
public Integer getRejectedFull()
- Returns:
- number of open calls that were rejected because too many waiters
getRejectedOpen
public Integer getRejectedOpen()
- Returns:
- total number of open calls that were rejected
getRejectedOther
public Integer getRejectedOther()
- Returns:
- number of open calls that were rejected by an unknown reason
getRejectedTimeout
public Integer getRejectedTimeout()
- Returns:
- number of open calls that were rejected by timeout
getServedOpen
public Integer getServedOpen()
- Returns:
- number of xa connection served
getWaiterCount
public Integer getWaiterCount()
- Returns:
- total number of waiters since datasource creation.
getWaitersHigh
public Integer getWaitersHigh()
- Returns:
- Maximum number of waiters since datasource creation.
getWaitersHighRecent
public Integer getWaitersHighRecent()
- Returns:
- Maximum nb of waiters in last sampling period
getWaitingHigh
public Long getWaitingHigh()
- Returns:
- Maximum waiting time (millisec) since datasource creation.
getWaitingHighRecent
public Long getWaitingHighRecent()
- Returns:
- Maximum waiting time (millisec) in last sampling period
getWaitingTime
public Long getWaitingTime()
- Returns:
- Total waiting time (millisec) since datasource creation.
getOpenedConnections
public int[] getOpenedConnections(int seconds)
getOpenedConnections
public int[] getOpenedConnections()
getConnectionDetails
public Map getConnectionDetails(int connectionId)
forceCloseConnection
public void forceCloseConnection(int connectionId)
setObservable
public void setObservable(boolean observable)
isObservable
public boolean isObservable()
getSequenceNumber
protected long getSequenceNumber()
- Gets the sequence number for reconfiguration opeartions
- Returns:
- the sequence number for reconfiguration operations
saveConfig
public void saveConfig()
- save updated configuration
Copyright © 2010 OW2 Consortium. All Rights Reserved.