fr.gouv.culture.sdx.utils.rdbms
Class DataSourceComponentBacked

java.lang.Object
  extended byfr.gouv.culture.sdx.utils.SdxObjectImpl
      extended byfr.gouv.culture.sdx.utils.rdbms.JDBC
          extended byfr.gouv.culture.sdx.utils.rdbms.DataSourceComponentBacked
All Implemented Interfaces:
org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, SdxObject
Direct Known Subclasses:
AbstractDataSourceComponentBackedRepository, AbstractJDBCDatabase

public abstract class DataSourceComponentBacked
extends JDBC
implements org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable

This class will handle connections manaagement within the scope of the coocoon jdbc connection pool


Nested Class Summary
 
Nested classes inherited from class fr.gouv.culture.sdx.utils.rdbms.JDBC
JDBC.QueryExecutor, JDBC.Template
 
Field Summary
protected  java.lang.String ATTRIBUTE_DSI
          String representation of the "repository" attribute name "dsi", for dataSourceIdentifier (name of connection in cocoon.xconf).
protected  org.apache.avalon.framework.component.ComponentSelector dbSelector
          The component selector.
protected  java.lang.String dsi
          The data source identifier.
protected  org.apache.avalon.framework.component.ComponentManager manager
           
 
Fields inherited from class fr.gouv.culture.sdx.utils.rdbms.JDBC
id, tableName
 
Fields inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl
encoding, logger
 
Constructor Summary
DataSourceComponentBacked()
           
 
Method Summary
 void compose(org.apache.avalon.framework.component.ComponentManager manager)
          Compose the object so that we get the Components we need from the ComponentManager.
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
protected  org.apache.avalon.excalibur.datasource.DataSourceComponent getDataSourceComponent()
          Get's the datasource component from Cocoon using the dbSelector and the dsi class variables
protected  void releaseDataSourceComponent(org.apache.avalon.excalibur.datasource.DataSourceComponent dsc)
          Releases the data source component using the dbSelector
 
Methods inherited from class fr.gouv.culture.sdx.utils.rdbms.JDBC
createTable, getTableCreationQuery, getTableName, handleUnsupportedTokens
 
Methods inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl
enableLogging, getChildLogger, setEncoding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected org.apache.avalon.framework.component.ComponentManager manager

dsi

protected java.lang.String dsi
The data source identifier.


dbSelector

protected org.apache.avalon.framework.component.ComponentSelector dbSelector
The component selector.


ATTRIBUTE_DSI

protected final java.lang.String ATTRIBUTE_DSI
String representation of the "repository" attribute name "dsi", for dataSourceIdentifier (name of connection in cocoon.xconf).

See Also:
Constant Field Values
Constructor Detail

DataSourceComponentBacked

public DataSourceComponentBacked()
Method Detail

compose

public void compose(org.apache.avalon.framework.component.ComponentManager manager)
             throws org.apache.avalon.framework.component.ComponentException
Compose the object so that we get the Components we need from the ComponentManager.

Specified by:
compose in interface org.apache.avalon.framework.component.Composable
Parameters:
manager - The component manager from Cocoon that allow us to acquire a database selector component.
Throws:
org.apache.avalon.framework.component.ComponentException

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

getDataSourceComponent

protected org.apache.avalon.excalibur.datasource.DataSourceComponent getDataSourceComponent()
                                                                                     throws org.apache.avalon.framework.component.ComponentException
Get's the datasource component from Cocoon using the dbSelector and the dsi class variables

Returns:
Throws:
org.apache.avalon.framework.component.ComponentException

releaseDataSourceComponent

protected void releaseDataSourceComponent(org.apache.avalon.excalibur.datasource.DataSourceComponent dsc)
Releases the data source component using the dbSelector

Parameters:
dsc - The component to release


Copyright © 2000-2004 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.