@Factory
public class DatasourceFactory
extends java.lang.Object
implements java.lang.AutoCloseable
Constructor and Description |
---|
DatasourceFactory(DataSourceResolver dataSourceResolver)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
javax.sql.DataSource |
dataSource(DatasourceConfiguration datasourceConfiguration) |
TomcatDataSourcePoolMetadata |
tomcatPoolDataSourceMetadataProvider(javax.sql.DataSource dataSource)
Method to create a metadata object that allows pool value lookup for each datasource object.
|
public DatasourceFactory(@Nullable DataSourceResolver dataSourceResolver)
dataSourceResolver
- The data source resolver@Context @EachBean(value=DatasourceConfiguration.class) public javax.sql.DataSource dataSource(DatasourceConfiguration datasourceConfiguration)
datasourceConfiguration
- A DatasourceConfiguration
DataSource
@EachBean(value=javax.sql.DataSource.class) @Requires(beans=DatasourceConfiguration.class) public TomcatDataSourcePoolMetadata tomcatPoolDataSourceMetadataProvider(javax.sql.DataSource dataSource)
dataSource
- The datasourceTomcatDataSourcePoolMetadata
@PreDestroy public void close()
close
in interface java.lang.AutoCloseable