org.apache.openejb.resource.jdbc.dbcp
Class JMXBasicDataSource

java.lang.Object
  extended by org.apache.openejb.resource.jdbc.dbcp.JMXBasicDataSource

@Description(value="describe a datasource pool")
public class JMXBasicDataSource
extends Object


Constructor Summary
JMXBasicDataSource(String name, org.apache.commons.dbcp.BasicDataSource ds)
           
 
Method Summary
 String executeValidationQuery()
           
 boolean getDefaultAutoCommit()
           
 String getDefaultCatalog()
           
 boolean getDefaultReadOnly()
           
 int getDefaultTransactionIsolation()
           
 String getDriverClassName()
           
 int getInitialSize()
           
 int getMaxActive()
           
 int getMaxIdle()
           
 int getMaxOpenPreparedStatements()
           
 long getMaxWait()
           
 long getMinEvictableIdleTimeMillis()
           
 int getMinIdle()
           
 int getNumTestsPerEvictionRun()
           
 boolean getPoolPreparedStatements()
           
 boolean getTestOnBorrow()
           
 boolean getTestOnReturn()
           
 boolean getTestWhileIdle()
           
 long getTimeBetweenEvictionRunsMillis()
           
 String getUrl()
           
 String getUsername()
           
 String getValidationQuery()
           
 int getValidationQueryTimeout()
           
 void setDefaultAutoCommit(boolean auto)
           
 void setDefaultCatalog(String catalog)
           
 void setDefaultReadOnly(boolean ro)
           
 void setDefaultTransactionIsolation(int level)
           
 void setDriverClassName(String name)
           
 void setInitialSize(int size)
           
 void setMaxActive(int max)
           
 void setMaxIdle(int max)
           
 void setMaxOpenPreparedStatements(int max)
           
 void setMaxWait(long max)
           
 void setMinEvictableIdleTimeMillis(long time)
           
 void setMinIdle(int min)
           
 void setNumTestsPerEvictionRun(int num)
           
 void setPoolPreparedStatements(boolean pool)
           
 void setTestOnBorrow(boolean test)
           
 void setTestOnReturn(boolean test)
           
 void setTestWhileIdle(boolean test)
           
 void setTimeBetweenEvictionRunsMillis(long time)
           
 void setUrl(String url)
           
 void setUsername(String user)
           
 void setValidationQuery(String query)
           
 void setValidationQueryTimeout(int timeout)
           
 void unregister()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMXBasicDataSource

public JMXBasicDataSource(String name,
                          org.apache.commons.dbcp.BasicDataSource ds)
Method Detail

unregister

public void unregister()

getDriverClassName

@ManagedAttribute
@Description(value="The class driver name.")
public String getDriverClassName()

getUrl

@ManagedAttribute
@Description(value="The connection URL to be passed to our JDBC driver to establish a connection.")
public String getUrl()

getValidationQuery

@ManagedAttribute
@Description(value="The SQL query that will be used to validate connections from this pool before returning them to the caller.")
public String getValidationQuery()

getUsername

@ManagedAttribute
@Description(value="The connection username to be passed to our JDBC driver to establish a connection.")
public String getUsername()

getValidationQueryTimeout

@ManagedAttribute
@Description(value="Timeout in seconds before connection validation queries fail.")
public int getValidationQueryTimeout()

getInitialSize

@ManagedAttribute
@Description(value="The initial number of connections that are created when the pool is started.")
public int getInitialSize()

getMaxActive

@ManagedAttribute
@Description(value="The maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit.")
public int getMaxActive()

getMaxIdle

@ManagedAttribute
@Description(value="The maximum number of connections that can remain idle in the pool, without extra ones beingdestroyed, or negative for no limit.")
public int getMaxIdle()

getMinIdle

@ManagedAttribute
@Description(value="The minimum number of active connections that can remain idle in the pool, without extra ones being created when the evictor runs, or 0 to create none.")
public int getMinIdle()

getNumTestsPerEvictionRun

@ManagedAttribute
@Description(value="The minimum number of active connections that can remain idle in the pool, without extra ones being created when the evictor runs, or 0 to create none.")
public int getNumTestsPerEvictionRun()

getMinEvictableIdleTimeMillis

@ManagedAttribute
@Description(value="The minimum amount of time an object may sit idle in the pool before it is eligible for eviction by the idle object evictor (if any).")
public long getMinEvictableIdleTimeMillis()

getTimeBetweenEvictionRunsMillis

@ManagedAttribute
@Description(value="The number of milliseconds to sleep between runs of the idle object evictor thread.")
public long getTimeBetweenEvictionRunsMillis()

getMaxOpenPreparedStatements

@ManagedAttribute
@Description(value="The maximum number of open statements that can be allocated from the statement pool at the same time, or non-positive for no limit.")
public int getMaxOpenPreparedStatements()

getMaxWait

@ManagedAttribute
@Description(value="The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or <= 0 to wait indefinitely.")
public long getMaxWait()

getDefaultAutoCommit

@ManagedAttribute
@Description(value="The default auto-commit state of connections created by this pool.")
public boolean getDefaultAutoCommit()

getPoolPreparedStatements

@ManagedAttribute
@Description(value="Prepared statement pooling for this pool.")
public boolean getPoolPreparedStatements()

getTestOnBorrow

@ManagedAttribute
@Description(value="The indication of whether objects will be validated before being borrowed from the pool.")
public boolean getTestOnBorrow()

getTestOnReturn

@ManagedAttribute
@Description(value="The indication of whether objects will be validated before being returned to the pool.")
public boolean getTestOnReturn()

getTestWhileIdle

@ManagedAttribute
@Description(value="The indication of whether objects will be validated by the idle object evictor (if any).")
public boolean getTestWhileIdle()

getDefaultCatalog

@ManagedAttribute
@Description(value="The default \"catalog\" of connections created by this pool.")
public String getDefaultCatalog()

getDefaultReadOnly

@ManagedAttribute
@Description(value="The default read-only state of connections created by this pool.")
public boolean getDefaultReadOnly()

getDefaultTransactionIsolation

@ManagedAttribute
@Description(value="The default TransactionIsolation state of connections created by this pool.")
public int getDefaultTransactionIsolation()

executeValidationQuery

@ManagedOperation
@Description(value="Execute the validation query.")
public String executeValidationQuery()

setDriverClassName

@ManagedAttribute
@Description(value="Set the class driver.")
public void setDriverClassName(String name)

setUrl

@ManagedAttribute
@Description(value="Set the connection URL.")
public void setUrl(String url)

setValidationQuery

@ManagedAttribute
@Description(value="Set the SQL validation query.")
public void setValidationQuery(String query)

setUsername

@ManagedAttribute
@Description(value="Set the connection username to be passed to our JDBC driver to establish a connection.")
public void setUsername(String user)

setValidationQueryTimeout

@ManagedAttribute
@Description(value="Set the timeout in seconds before connection validation queries fail.")
public void setValidationQueryTimeout(int timeout)

setInitialSize

@ManagedAttribute
@Description(value="Set the initial number of connections that are created when the pool is started.")
public void setInitialSize(int size)

setMaxActive

@ManagedAttribute
@Description(value="Set the maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit.")
public void setMaxActive(int max)

setMaxIdle

@ManagedAttribute
@Description(value="Set the maximum number of connections that can remain idle in the pool, without extra ones beingdestroyed, or negative for no limit.")
public void setMaxIdle(int max)

setMinIdle

@ManagedAttribute
@Description(value="Set the minimum number of active connections that can remain idle in the pool, without extra ones being created when the evictor runs, or 0 to create none.")
public void setMinIdle(int min)

setNumTestsPerEvictionRun

@ManagedAttribute
@Description(value="Set the minimum number of active connections that can remain idle in the pool, without extra ones being created when the evictor runs, or 0 to create none.")
public void setNumTestsPerEvictionRun(int num)

setMinEvictableIdleTimeMillis

@ManagedAttribute
@Description(value="Set the minimum amount of time an object may sit idle in the pool before it is eligible for eviction by the idle object evictor (if any).")
public void setMinEvictableIdleTimeMillis(long time)

setTimeBetweenEvictionRunsMillis

@ManagedAttribute
@Description(value="Set the number of milliseconds to sleep between runs of the idle object evictor thread.")
public void setTimeBetweenEvictionRunsMillis(long time)

setMaxOpenPreparedStatements

@ManagedAttribute
@Description(value="Set the maximum number of open statements that can be allocated from the statement pool at the same time, or non-positive for no limit.")
public void setMaxOpenPreparedStatements(int max)

setMaxWait

@ManagedAttribute
@Description(value="Set the maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or <= 0 to wait indefinitely.")
public void setMaxWait(long max)

setDefaultAutoCommit

@ManagedAttribute
@Description(value="Set the default auto-commit state of connections created by this pool.")
public void setDefaultAutoCommit(boolean auto)

setPoolPreparedStatements

@ManagedAttribute
@Description(value="Set the prepared statement pooling for this pool.")
public void setPoolPreparedStatements(boolean pool)

setTestOnBorrow

@ManagedAttribute
@Description(value="Set the indication of whether objects will be validated before being borrowed from the pool.")
public void setTestOnBorrow(boolean test)

setTestOnReturn

@ManagedAttribute
@Description(value="Set the indication of whether objects will be validated before being returned to the pool.")
public void setTestOnReturn(boolean test)

setTestWhileIdle

@ManagedAttribute
@Description(value="Set the indication of whether objects will be validated by the idle object evictor (if any).")
public void setTestWhileIdle(boolean test)

setDefaultCatalog

@ManagedAttribute
@Description(value="The default \"catalog\" of connections created by this pool.")
public void setDefaultCatalog(String catalog)

setDefaultReadOnly

@ManagedAttribute
@Description(value="Set the default read-only state of connections created by this pool.")
public void setDefaultReadOnly(boolean ro)

setDefaultTransactionIsolation

@ManagedAttribute
@Description(value="Set the default TransactionIsolation state of connections created by this pool ([NONE: 0, READ_COMMITTED: 2, READ_UNCOMMITTED: 4, SERIALIZABLE: 8]).")
public void setDefaultTransactionIsolation(int level)


Copyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.