|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.excalibur.datasource.cluster.AbstractDataSourceCluster
public abstract class 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. |
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 Connection getConnectionForIndex(int index)
throws 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.
SQLException
public void service(ServiceManager manager)
throws ServiceException
service in interface Serviceablemanager - which curently owns the component.
ServiceException
public void configure(Configuration configuration)
throws ConfigurationException
configure in interface Configurableconfiguration - configuration info used to setup the component.
ConfigurationException - if there are any problems with the configuration.
public void initialize()
throws Exception
initialize in interface InitializableException - 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 | |||||||||