Package org.appng.core.repository.config
Class DataSourceFactory
- java.lang.Object
-
- org.appng.core.repository.config.DataSourceFactory
-
- All Implemented Interfaces:
DatasourceConfigurer
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<DataSource>
public class DataSourceFactory extends Object implements org.springframework.beans.factory.FactoryBean<DataSource>, org.springframework.beans.factory.DisposableBean, DatasourceConfigurer
- Author:
- Matthias Müller
-
-
Field Summary
-
Fields inherited from interface org.appng.core.repository.config.DatasourceConfigurer
DEFAULT_LIFE_TIME, DEFAULT_TIMEOUT, JMX_DOMAIN
-
-
Constructor Summary
Constructors Constructor Description DataSourceFactory()
DataSourceFactory(DatasourceConfigurer configurer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(DatabaseConnection connection)
Configures the instance using the settings of the givenDatabaseConnection
.void
destroy()
Destroys the instance.DataSource
getDataSource()
Returns aDataSource
DataSource
getObject()
Class<?>
getObjectType()
boolean
isSingleton()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.appng.core.repository.config.DatasourceConfigurer
setAutoCommit, setConnectionTimeout, setLogPerformance, setMaxLifetime, setValidationTimeout
-
-
-
-
Constructor Detail
-
DataSourceFactory
public DataSourceFactory()
-
DataSourceFactory
public DataSourceFactory(DatasourceConfigurer configurer)
-
-
Method Detail
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<DataSource>
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean<DataSource>
-
getObject
public DataSource getObject() throws Exception
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<DataSource>
- Throws:
Exception
-
configure
public void configure(DatabaseConnection connection)
Description copied from interface:DatasourceConfigurer
Configures the instance using the settings of the givenDatabaseConnection
.- Specified by:
configure
in interfaceDatasourceConfigurer
- Parameters:
connection
- aDatabaseConnection
-
destroy
public void destroy()
Description copied from interface:DatasourceConfigurer
Destroys the instance.- Specified by:
destroy
in interfaceDatasourceConfigurer
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-
getDataSource
public DataSource getDataSource()
Description copied from interface:DatasourceConfigurer
Returns aDataSource
- Specified by:
getDataSource
in interfaceDatasourceConfigurer
- Returns:
- the
DataSource
-
-