Class DatasourceFactory
java.lang.Object
io.micronaut.configuration.jdbc.ucp.DatasourceFactory
- All Implemented Interfaces:
AutoCloseable
Creates an ucp data source for each configuration bean.
- Since:
- 2.0.1
- Author:
- toddsharp
-
Constructor Summary
ConstructorDescriptionDatasourceFactory
(io.micronaut.context.ApplicationContext applicationContext) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
oracle.ucp.jdbc.PoolDataSource
dataSource
(DatasourceConfiguration datasourceConfiguration) Method to get a PoolDataSource from theDatasourceConfiguration
.
-
Constructor Details
-
DatasourceFactory
public DatasourceFactory(io.micronaut.context.ApplicationContext applicationContext) throws oracle.ucp.UniversalConnectionPoolException Default constructor.- Parameters:
applicationContext
- The application context- Throws:
oracle.ucp.UniversalConnectionPoolException
-
-
Method Details
-
dataSource
@Context @EachBean(DatasourceConfiguration.class) public oracle.ucp.jdbc.PoolDataSource dataSource(DatasourceConfiguration datasourceConfiguration) throws oracle.ucp.UniversalConnectionPoolException Method to get a PoolDataSource from theDatasourceConfiguration
.- Parameters:
datasourceConfiguration
- ADatasourceConfiguration
- Returns:
- A
PoolDataSource
- Throws:
oracle.ucp.UniversalConnectionPoolException
-
close
@PreDestroy public void close()- Specified by:
close
in interfaceAutoCloseable
-