|
||||||||||
| 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 | |
|---|---|
private java.lang.String[] |
m_dataSourceNames
|
private DataSourceComponent[] |
m_dataSources
|
private org.apache.avalon.framework.service.ServiceSelector |
m_dbSelector
|
protected int |
m_size
|
| Constructor Summary | |
|---|---|
AbstractDataSourceCluster()
|
|
| Method Summary | |
|---|---|
void |
configure(org.apache.avalon.framework.configuration.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(org.apache.avalon.framework.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
private java.lang.String[] m_dataSourceNames
private org.apache.avalon.framework.service.ServiceSelector m_dbSelector
private DataSourceComponent[] m_dataSources
| 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(org.apache.avalon.framework.service.ServiceManager manager)
throws org.apache.avalon.framework.service.ServiceException
service in interface org.apache.avalon.framework.service.Serviceablemanager - which curently owns the component.
org.apache.avalon.framework.service.ServiceException
public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfiguration - configuration info used to setup the component.
org.apache.avalon.framework.configuration.ConfigurationException - if there are any problems with the configuration.
public void initialize()
throws java.lang.Exception
initialize in interface org.apache.avalon.framework.activity.Initializablejava.lang.Exception - if there were any problems durring initialization.public void dispose()
dispose in interface org.apache.avalon.framework.activity.Disposable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||