public class JdbcManagedObjectSource extends AbstractManagedObjectSource<None,None>
ManagedObjectSource
for JDBC.AbstractAsyncManagedObjectSource.DependencyLabeller, AbstractAsyncManagedObjectSource.Labeller, AbstractAsyncManagedObjectSource.MetaDataContext<D extends Enum<D>,F extends Enum<F>>, AbstractAsyncManagedObjectSource.SpecificationContext
Modifier and Type | Field and Description |
---|---|
static String |
CONNECTION_POOL_DATA_SOURCE_CLASS_PROPERTY
Property name of the
ConnectionPoolDataSource class. |
static String |
CONNECTION_POOL_DATA_SOURCE_FACTORY_PROPERTY
Property name of the
ConnectionPoolDataSourceFactory class. |
static String |
DATA_SOURCE_INITIALISE_SCRIPT
Property name of script containing SQL to be run to initialise the
DataSource . |
protected ConnectionPoolDataSource |
dataSource
|
Constructor and Description |
---|
JdbcManagedObjectSource()
Default constructor as required.
|
Modifier and Type | Method and Description |
---|---|
protected ConnectionPoolDataSource |
getConnectionPoolDataSource(ManagedObjectSourceContext<?> context)
Obtains the
ConnectionPoolDataSource from the input properties. |
protected ManagedObject |
getManagedObject()
Synchronously obtains the
ManagedObject . |
protected void |
initialiseDataSource()
Initialises the
DataSource . |
protected void |
loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<None,None> context)
Overridden to load meta-data.
|
protected void |
loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Overridden to load specifications.
|
void |
start(ManagedObjectExecuteContext<None> context)
Called once after
ManagedObjectSource.init(ManagedObjectSourceContext) to indicate
this ManagedObjectSource should start execution. |
sourceManagedObject
getMetaData, getSpecification, init, stop
public static final String CONNECTION_POOL_DATA_SOURCE_FACTORY_PROPERTY
ConnectionPoolDataSourceFactory
class.public static final String CONNECTION_POOL_DATA_SOURCE_CLASS_PROPERTY
ConnectionPoolDataSource
class.public static final String DATA_SOURCE_INITIALISE_SCRIPT
DataSource
.protected ConnectionPoolDataSource dataSource
public JdbcManagedObjectSource()
protected ConnectionPoolDataSource getConnectionPoolDataSource(ManagedObjectSourceContext<?> context) throws Exception
ConnectionPoolDataSource
from the input properties.context
- ManagedObjectSourceContext
.ConnectionPoolDataSource
.Exception
- Should there be a failure creating or configuring the
ConnectionPoolDataSource
.protected void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
AbstractAsyncManagedObjectSource
loadSpecification
in class AbstractAsyncManagedObjectSource<None,None>
context
- Specifications.protected void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<None,None> context) throws Exception
AbstractAsyncManagedObjectSource
loadMetaData
in class AbstractAsyncManagedObjectSource<None,None>
context
- Meta-data.Exception
- If fails to load the meta-data.public void start(ManagedObjectExecuteContext<None> context) throws Exception
ManagedObjectSource
Called once after ManagedObjectSource.init(ManagedObjectSourceContext)
to indicate
this ManagedObjectSource
should start execution.
On invocation of this method, ProcessState
instances may be
invoked via the ManagedObjectExecuteContext
.
start
in interface ManagedObjectSource<None,None>
start
in class AbstractAsyncManagedObjectSource<None,None>
context
- ManagedObjectExecuteContext
to use in starting this
ManagedObjectSource
.Exception
- Should the ManagedObjectSource
fail to start
execution.protected ManagedObject getManagedObject() throws Throwable
AbstractManagedObjectSource
ManagedObject
.getManagedObject
in class AbstractManagedObjectSource<None,None>
ManagedObject
.Throwable
- If fails to obtain the ManagedObject
.protected void initialiseDataSource() throws Exception
DataSource
.Exception
- If fails to initialise DataSource
.Copyright © 2005–2016. All rights reserved.