|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.avalon.excalibur.datasource.cluster.AbstractDataSourceCluster
Field Summary | |
protected int |
m_size
|
Constructor Summary | |
AbstractDataSourceCluster()
|
Method Summary | |
void |
configure(Configuration configuration)
Called by the Container to configure the component. |
void |
dispose()
Called by the Container to dispose the component. |
int |
getClusterSize()
Returns the number of DataSources in the cluster. |
java.sql.Connection |
getConnectionForIndex(int index)
Gets a Connection to a database given an index. |
void |
initialize()
Called by the Container to initialize the component. |
void |
service(ServiceManager manager)
Called by the Container to tell the component which ComponentLocator is controlling it. |
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 |
Field Detail |
protected int m_size
Constructor Detail |
public AbstractDataSourceCluster()
Method Detail |
public int getClusterSize()
public java.sql.Connection getConnectionForIndex(int index) throws java.sql.SQLException
index
- Index of the DataSource for which a connection is to be returned.
NoValidConnectionException
- when there is no valid Connection wrapper
available in the classloader or when the index is not valid.
NoValidConnectionException
- when there are no more available
Connections in the pool.
java.sql.SQLException
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
manager
- which curently owns the component.
ServiceException
- if an error occurspublic void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
configuration
- configuration info used to setup the component.
ConfigurationException
- if there are any problems with the configuration.public void initialize() throws java.lang.Exception
initialize
in interface Initializable
java.lang.Exception
- if there were any problems durring initialization.public void dispose()
dispose
in interface Disposable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |