Class DataSourceService
java.lang.Object
org.wildfly.extension.datasources.agroal.DataSourceService
- All Implemented Interfaces:
Supplier<io.agroal.api.AgroalDataSource>,org.jboss.msc.Service,org.jboss.msc.service.Service<io.agroal.api.AgroalDataSource>,org.jboss.msc.value.Value<io.agroal.api.AgroalDataSource>
public class DataSourceService
extends Object
implements org.jboss.msc.service.Service<io.agroal.api.AgroalDataSource>, Supplier<io.agroal.api.AgroalDataSource>
Defines an extension to provide DataSources based on the Agroal project
- Author:
- Luis Barreiro
-
Field Summary
Fields inherited from interface org.jboss.msc.service.Service
NULL -
Constructor Summary
ConstructorsConstructorDescriptionDataSourceService(Consumer<io.agroal.api.AgroalDataSource> consumer, Supplier<Class> driverSupplier, Supplier<org.wildfly.security.auth.client.AuthenticationContext> authenticationContextSupplier, Supplier<org.wildfly.common.function.ExceptionSupplier<org.wildfly.security.credential.source.CredentialSource, Exception>> credentialSourceSupplier, Supplier<jakarta.transaction.TransactionSynchronizationRegistry> transactionSynchronizationRegistrySupplier, String dataSourceName, String jndiName, boolean jta, boolean connectable, boolean xa, io.agroal.api.configuration.supplier.AgroalDataSourceConfigurationSupplier dataSourceConfiguration) -
Method Summary
-
Constructor Details
-
DataSourceService
public DataSourceService(Consumer<io.agroal.api.AgroalDataSource> consumer, Supplier<Class> driverSupplier, Supplier<org.wildfly.security.auth.client.AuthenticationContext> authenticationContextSupplier, Supplier<org.wildfly.common.function.ExceptionSupplier<org.wildfly.security.credential.source.CredentialSource, Exception>> credentialSourceSupplier, Supplier<jakarta.transaction.TransactionSynchronizationRegistry> transactionSynchronizationRegistrySupplier, String dataSourceName, String jndiName, boolean jta, boolean connectable, boolean xa, io.agroal.api.configuration.supplier.AgroalDataSourceConfigurationSupplier dataSourceConfiguration)
-
-
Method Details
-
start
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException - Specified by:
startin interfaceorg.jboss.msc.Service- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context) - Specified by:
stopin interfaceorg.jboss.msc.Service
-
getValue
public io.agroal.api.AgroalDataSource getValue() throws IllegalStateException, IllegalArgumentException- Specified by:
getValuein interfaceorg.jboss.msc.value.Value<io.agroal.api.AgroalDataSource>- Throws:
IllegalStateExceptionIllegalArgumentException
-
get
public io.agroal.api.AgroalDataSource get()
-