org.apache.avalon.excalibur.datasource
クラス JdbcDataSource
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLogEnabled
|
+--org.apache.avalon.excalibur.datasource.JdbcDataSource
- すべての実装インタフェース:
- org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, DataSourceComponent, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.framework.thread.ThreadSafe
- public class JdbcDataSource
- extends org.apache.avalon.framework.logger.AbstractLogEnabled
- implements DataSourceComponent, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.logger.Loggable
The Default implementation for DataSources in Avalon. This uses the
normal java.sql.Connection
object and
java.sql.DriverManager
. The Configuration is like this:
<jdbc>
<pool-controller min="5" max="10" connection-class="my.overrided.ConnectionClass">
<keep-alive disable="false">select 1</keep-alive>
</pool-controller>
<driver>com.database.jdbc.JdbcDriver</driver>
<dburl>jdbc:driver://host/mydb</dburl>
<user>username</user>
<password>password</password>
</jdbc>
- 導入されたバージョン:
- 4.0
- バージョン:
- CVS $Revision: 1.14 $ $Date: 2002/01/26 16:58:06 $
- 作成者:
- Berin Loritsch
メソッドの概要 |
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
Configure and set up DB connection. |
void |
dispose()
Dispose properly of the pool |
java.sql.Connection |
getConnection()
Get the database connection |
void |
setLogger(org.apache.log.Logger logger)
|
クラス org.apache.avalon.framework.logger.AbstractLogEnabled から継承したメソッド |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_pool
protected JdbcConnectionPool m_pool
JdbcDataSource
public JdbcDataSource()
setLogger
public void setLogger(org.apache.log.Logger logger)
- 定義:
- インタフェース
org.apache.avalon.framework.logger.Loggable
内の setLogger
configure
public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Configure and set up DB connection. Here we set the connection
information needed to create the Connection objects. It must
be called only once.
- 定義:
- インタフェース
org.apache.avalon.framework.configuration.Configurable
内の configure
- パラメータ:
conf
- The Configuration object needed to describe the
connection.- 例外:
org.apache.avalon.framework.configuration.ConfigurationException
-
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Get the database connection
- 定義:
- インタフェース
DataSourceComponent
内の getConnection
- インタフェース
org.apache.avalon.excalibur.datasource.DataSourceComponent
からコピーされたタグ:
- 例外:
NoValidConnectionException
- when there is no valid Connection wrapper
available in the classloader.NoAvailableConnectionException
- when there are no more available
Connections in the pool.
dispose
public void dispose()
- Dispose properly of the pool
- 定義:
- インタフェース
org.apache.avalon.framework.activity.Disposable
内の dispose
"Copyright ? 2001 Apache Jakarta Project. All Rights Reserved."