org.qi4j.library.sql.datasource
Class AbstractDataSourceServiceImporterMixin<PooledDataSourceType extends javax.sql.DataSource>
java.lang.Object
org.qi4j.library.sql.datasource.AbstractDataSourceServiceImporterMixin<PooledDataSourceType>
- All Implemented Interfaces:
- ServiceImporter<javax.sql.DataSource>, DataSourceServiceImporterActivation
- Direct Known Subclasses:
- BoneCPDataSourceServiceImporter.Mixin, C3P0DataSourceServiceImporter.Mixin, DBCPDataSourceServiceImporter.Mixin
public abstract class AbstractDataSourceServiceImporterMixin<PooledDataSourceType extends javax.sql.DataSource>
- extends java.lang.Object
- implements ServiceImporter<javax.sql.DataSource>, DataSourceServiceImporterActivation
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
protected static final org.slf4j.Logger LOGGER
module
@Structure
protected Module module
AbstractDataSourceServiceImporterMixin
public AbstractDataSourceServiceImporterMixin()
passivateDataSourceService
public final void passivateDataSourceService()
throws java.lang.Exception
- Specified by:
passivateDataSourceService
in interface DataSourceServiceImporterActivation
- Throws:
java.lang.Exception
importService
public final javax.sql.DataSource importService(ImportedServiceDescriptor importedServiceDescriptor)
throws ServiceImporterException
- Description copied from interface:
ServiceImporter
- Imports an instance of the service type described in the service descriptor.
- Specified by:
importService
in interface ServiceImporter<javax.sql.DataSource>
- Parameters:
importedServiceDescriptor
- The service descriptor.
- Returns:
- The imported service instance.
- Throws:
ServiceImporterException
- if import failed.
isAvailable
public final boolean isAvailable(javax.sql.DataSource instance)
- Description copied from interface:
ServiceImporter
- Ask if the service is available or not.
- Specified by:
isAvailable
in interface ServiceImporter<javax.sql.DataSource>
- Parameters:
instance
- the instance to be checked
- Returns:
- true if the service is available, false if not
setupDataSourcePool
protected abstract PooledDataSourceType setupDataSourcePool(DataSourceConfigurationValue configuration)
throws java.lang.Exception
- Throws:
java.lang.Exception
passivateDataSourcePool
protected abstract void passivateDataSourcePool(PooledDataSourceType dataSourcePool)
throws java.lang.Exception
- Throws:
java.lang.Exception