public interface DataSourceFactory extends Serializable
DataSource instance according to the declared getDataSourceType() type
name and using a DataSourceConfigProperties property set.
The DataSource type name corresponds to the one specified through the property
DataSourceConfigProperties.TYPE.
The DataSourceFactory implementations are used by DataSourceBuilder to create DataSource
instances and can be registered using default Java ServiceLoader extension, through a
com.holonplatform.jdbc.DataSourceFactory file under the META-INF/services folder.
The Priority annotation on DataSourceFactory class (where less priority value means higher priority
order) can be used to order the factories.
DataSourceBuilder| Modifier and Type | Method and Description |
|---|---|
DataSource |
build(DataSourceConfigProperties configurationProperties)
Build a DataSource instance using given configuration properties.
|
String |
getDataSourceType()
Get the symbolic DataSource type name to which this factory is bound
|
String getDataSourceType()
DataSource build(DataSourceConfigProperties configurationProperties) throws com.holonplatform.core.config.ConfigPropertySet.ConfigurationException
configurationProperties - Configuration propertiescom.holonplatform.core.config.ConfigPropertySet.ConfigurationException - If an error occurredCopyright © 2019 The Holon Platform. All rights reserved.