fr.gouv.culture.sdx.utils.rdbms
Class DataSourceComponentBacked
java.lang.Object
fr.gouv.culture.sdx.utils.AbstractSdxObject
fr.gouv.culture.sdx.utils.rdbms.JDBC
fr.gouv.culture.sdx.utils.rdbms.DataSourceComponentBacked
- All Implemented Interfaces:
- Describable, Encodable, Identifiable, Localizable, SdxObject, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.excalibur.xml.sax.XMLizable
- Direct Known Subclasses:
- AbstractDataSourceComponentBackedRepository, AbstractJDBCDatabase
public abstract class DataSourceComponentBacked
- extends JDBC
- implements org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable
This class will handle connections manaagement within the scope
of the coocoon jdbc connection pool
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.service.ServiceSelector |
dbSelector
The component selector. |
protected java.lang.String |
dsi
The data source _identifier. |
Fields inherited from class fr.gouv.culture.sdx.utils.rdbms.JDBC |
tableName |
Fields inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject |
_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitialized |
Method Summary |
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
|
protected void |
finalize()
|
protected org.apache.avalon.excalibur.datasource.DataSourceComponent |
getDataSourceComponent()
Get's the datasource service from Cocoon using the dbSelector and the dsi
class variables |
protected void |
releaseDataSourceComponent(org.apache.avalon.excalibur.datasource.DataSourceComponent dsc)
Releases the data source service using the dbSelector |
void |
service(org.apache.avalon.framework.service.ServiceManager manager)
Compose the object so that we get the Service s we need from the
ServiceManager . |
Methods inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject |
configureDescription, contextualize, enableLogging, getBaseAttributes, getClassNameSuffix, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, initToSax, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, toSAX, verifyConfigurationResources |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dsi
protected java.lang.String dsi
- The data source _identifier.
dbSelector
protected org.apache.avalon.framework.service.ServiceSelector 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
DataSourceComponentBacked
public DataSourceComponentBacked()
service
public void service(org.apache.avalon.framework.service.ServiceManager manager)
throws org.apache.avalon.framework.service.ServiceException
- Compose the object so that we get the
Service
s we need from the
ServiceManager
.
- Specified by:
service
in interface org.apache.avalon.framework.service.Serviceable
- Overrides:
service
in class AbstractSdxObject
- Parameters:
manager
- The service manager from Cocoon that allow us to acquire a database selector service.
- Throws:
org.apache.avalon.framework.service.ServiceException
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
- Overrides:
configure
in class AbstractSdxObject
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
getDataSourceComponent
protected org.apache.avalon.excalibur.datasource.DataSourceComponent getDataSourceComponent()
throws org.apache.avalon.framework.service.ServiceException
- Get's the datasource service from Cocoon using the dbSelector and the dsi
class variables
- Returns:
-
- Throws:
org.apache.avalon.framework.service.ServiceException
releaseDataSourceComponent
protected void releaseDataSourceComponent(org.apache.avalon.excalibur.datasource.DataSourceComponent dsc)
- Releases the data source service using the dbSelector
- Parameters:
dsc
- The service to release
finalize
protected void finalize()
throws java.lang.Throwable
- Overrides:
finalize
in class java.lang.Object
- Throws:
java.lang.Throwable
Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.