org.apache.avalon.excalibur.datasource
Interface DataSourceComponent

All Superinterfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.thread.ThreadSafe
All Known Subinterfaces:
HashedDataSourceCluster, IndexedDataSourceCluster, RoundRobinDataSourceCluster, TraceableDataSourceComponent
All Known Implementing Classes:
DefaultHashedDataSourceCluster, DefaultIndexedDataSourceCluster, DefaultRoundRobinDataSourceCluster, InformixDataSource, J2eeDataSource, JdbcDataSource, ResourceLimitingJdbcDataSource

public interface DataSourceComponent
extends org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.thread.ThreadSafe

The standard interface for DataSources in Avalon.

Since:
4.0
Version:
CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:14 $
Author:
Avalon Development Team

Field Summary
static java.lang.String ROLE
          The name of the role for convenience
 
Method Summary
 java.sql.Connection getConnection()
          Gets the Connection to the database
 
Methods inherited from interface org.apache.avalon.framework.configuration.Configurable
configure
 

Field Detail

ROLE

static final java.lang.String ROLE
The name of the role for convenience

Method Detail

getConnection

java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Gets the Connection to the database

Returns:
Connection a valid connection for you to use
Throws:
NoValidConnectionException - when there is no valid Connection wrapper available in the classloader.
NoAvailableConnectionException - when there are no more available Connections in the pool.
java.sql.SQLException


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.