org.outerj.daisy.datasource
Class JdbcDataSource
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.outerj.daisy.datasource.JdbcDataSource
- All Implemented Interfaces:
- java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.DataSource, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, JdbcDataSourceMBean
public class JdbcDataSource
- extends org.apache.avalon.framework.logger.AbstractLogEnabled
- implements javax.sql.DataSource, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.activity.Initializable, JdbcDataSourceMBean
A DataSource implementation based on Jakarta Commons DBCP.
Originally based on the JdbcDataSource from the Apache James projects.
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JdbcDataSource
public JdbcDataSource()
configure
public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Specified by:
configure
in interface org.apache.avalon.framework.configuration.Configurable
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
service
public void service(org.apache.avalon.framework.service.ServiceManager serviceManager)
throws org.apache.avalon.framework.service.ServiceException
- Specified by:
service
in interface org.apache.avalon.framework.service.Serviceable
- Throws:
org.apache.avalon.framework.service.ServiceException
initialize
public void initialize()
throws java.lang.Exception
- Specified by:
initialize
in interface org.apache.avalon.framework.activity.Initializable
- Throws:
java.lang.Exception
dispose
public void dispose()
- Specified by:
dispose
in interface org.apache.avalon.framework.activity.Disposable
getLoginTimeout
public int getLoginTimeout()
throws java.sql.SQLException
- Specified by:
getLoginTimeout
in interface javax.sql.CommonDataSource
- Throws:
java.sql.SQLException
setLoginTimeout
public void setLoginTimeout(int seconds)
throws java.sql.SQLException
- Specified by:
setLoginTimeout
in interface javax.sql.CommonDataSource
- Throws:
java.sql.SQLException
getLogWriter
public java.io.PrintWriter getLogWriter()
throws java.sql.SQLException
- Specified by:
getLogWriter
in interface javax.sql.CommonDataSource
- Throws:
java.sql.SQLException
setLogWriter
public void setLogWriter(java.io.PrintWriter out)
throws java.sql.SQLException
- Specified by:
setLogWriter
in interface javax.sql.CommonDataSource
- Throws:
java.sql.SQLException
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Specified by:
getConnection
in interface javax.sql.DataSource
- Throws:
java.sql.SQLException
getConnection
public java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
- Specified by:
getConnection
in interface javax.sql.DataSource
- Throws:
java.sql.SQLException
getNumActive
public int getNumActive()
- Specified by:
getNumActive
in interface JdbcDataSourceMBean
getNumIdle
public int getNumIdle()
- Specified by:
getNumIdle
in interface JdbcDataSourceMBean
getUrl
public java.lang.String getUrl()
- Specified by:
getUrl
in interface JdbcDataSourceMBean
getUserName
public java.lang.String getUserName()
- Specified by:
getUserName
in interface JdbcDataSourceMBean
getMinIdle
public int getMinIdle()
- Specified by:
getMinIdle
in interface JdbcDataSourceMBean
getMaxIdle
public int getMaxIdle()
- Specified by:
getMaxIdle
in interface JdbcDataSourceMBean
getMaxActive
public int getMaxActive()
- Specified by:
getMaxActive
in interface JdbcDataSourceMBean
unwrap
public <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
- Specified by:
unwrap
in interface java.sql.Wrapper
- Throws:
java.sql.SQLException
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
- Specified by:
isWrapperFor
in interface java.sql.Wrapper
- Throws:
java.sql.SQLException
Copyright © -2012 . All Rights Reserved.