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

    Constructors
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
    io.agroal.api.AgroalDataSource
    get()
     
    io.agroal.api.AgroalDataSource
     
    void
    start(org.jboss.msc.service.StartContext context)
     
    void
    stop(org.jboss.msc.service.StopContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      start in interface org.jboss.msc.Service
      Throws:
      org.jboss.msc.service.StartException
    • stop

      public void stop(org.jboss.msc.service.StopContext context)
      Specified by:
      stop in interface org.jboss.msc.Service
    • getValue

      public io.agroal.api.AgroalDataSource getValue() throws IllegalStateException, IllegalArgumentException
      Specified by:
      getValue in interface org.jboss.msc.value.Value<io.agroal.api.AgroalDataSource>
      Throws:
      IllegalStateException
      IllegalArgumentException
    • get

      public io.agroal.api.AgroalDataSource get()
      Specified by:
      get in interface Supplier<io.agroal.api.AgroalDataSource>