Package io.quarkus.agroal.runtime
Class DataSources
java.lang.Object
io.quarkus.agroal.runtime.DataSources
Deprecated.
This class is sort of a producer for
AgroalDataSource.
It isn't a CDI producer in the literal sense, but it created a synthetic bean
from AgroalProcessor
The createDataSource method is called at runtime (see
AgroalRecorder.agroalDataSourceSupplier(String, DataSourcesRuntimeConfig))
in order to produce the actual AgroalDataSource objects.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataSources(DataSourcesBuildTimeConfig dataSourcesBuildTimeConfig, DataSourcesRuntimeConfig dataSourcesRuntimeConfig, DataSourcesJdbcBuildTimeConfig dataSourcesJdbcBuildTimeConfig, DataSourcesJdbcRuntimeConfig dataSourcesJdbcRuntimeConfig, TransactionManagerConfiguration transactionRuntimeConfig, jakarta.transaction.TransactionManager transactionManager, org.jboss.tm.XAResourceRecoveryRegistry xaResourceRecoveryRegistry, jakarta.transaction.TransactionSynchronizationRegistry transactionSynchronizationRegistry, DataSourceSupport dataSourceSupport, AgroalDataSourceSupport agroalDataSourceSupport, jakarta.enterprise.inject.Instance<io.agroal.api.AgroalPoolInterceptor> agroalPoolInterceptors, jakarta.enterprise.inject.Instance<AgroalOpenTelemetryWrapper> agroalOpenTelemetryWrapper) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionio.agroal.api.AgroalDataSourcedoCreateDataSource(String dataSourceName, boolean failIfInactive) Deprecated.static io.agroal.api.AgroalDataSourceDeprecated.This method should not be used as it can very easily lead to timing issues during bean creationDeprecated.io.agroal.api.AgroalDataSourcegetDataSource(String dataSourceName) Deprecated.booleanisDataSourceCreated(String dataSourceName) Deprecated.voidstart()Deprecated.voidstop()Deprecated.
-
Field Details
-
TRACING_DRIVER_CLASSNAME
Deprecated.- See Also:
-
-
Constructor Details
-
DataSources
public DataSources(DataSourcesBuildTimeConfig dataSourcesBuildTimeConfig, DataSourcesRuntimeConfig dataSourcesRuntimeConfig, DataSourcesJdbcBuildTimeConfig dataSourcesJdbcBuildTimeConfig, DataSourcesJdbcRuntimeConfig dataSourcesJdbcRuntimeConfig, TransactionManagerConfiguration transactionRuntimeConfig, jakarta.transaction.TransactionManager transactionManager, org.jboss.tm.XAResourceRecoveryRegistry xaResourceRecoveryRegistry, jakarta.transaction.TransactionSynchronizationRegistry transactionSynchronizationRegistry, DataSourceSupport dataSourceSupport, AgroalDataSourceSupport agroalDataSourceSupport, @Any jakarta.enterprise.inject.Instance<io.agroal.api.AgroalPoolInterceptor> agroalPoolInterceptors, jakarta.enterprise.inject.Instance<AgroalOpenTelemetryWrapper> agroalOpenTelemetryWrapper) Deprecated.
-
-
Method Details
-
fromName
Deprecated.This method should not be used as it can very easily lead to timing issues during bean creationMeant to be used from recorders that create synthetic beans that need access toDatasource. In such usingArc.container.instance(DataSource.class)is not possible becauseDatasourceis itself a synthetic bean.This method relies on the fact that
DataSourcesshould - given the same input - always return the sameAgroalDataSourceno matter how many times it is invoked (which makes sense becauseDataSourceis aSingletonbean).This method is thread-safe
-
isDataSourceCreated
Deprecated. -
getActiveDataSourceNames
Deprecated. -
getDataSource
Deprecated. -
start
@PostConstruct public void start()Deprecated. -
doCreateDataSource
public io.agroal.api.AgroalDataSource doCreateDataSource(String dataSourceName, boolean failIfInactive) Deprecated. -
stop
@PreDestroy public void stop()Deprecated.
-
AgroalDataSourceUtilinstead.