Interface PersistenceUnitInfoBean.DataSourceProvider

Enclosing class:
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface PersistenceUnitInfoBean.DataSourceProvider
A functional interface indicating that its implementations can supply DataSources.
See Also:
  • Method Summary

    Modifier and Type
    getDataSource(boolean jta, boolean useDefaultJta, String dataSourceName)
    Supplies a DataSource.
  • Method Details

    • getDataSource

      DataSource getDataSource(boolean jta, boolean useDefaultJta, String dataSourceName)
      Supplies a DataSource.

      Implementations of this method are permitted to return null.

      jta - if true, the DataSource that is returned may be enrolled in JTA-compliant transactions
      useDefaultJta - if true, and if the jta parameter value is true, the supplied dataSourceName may be ignored and a default DataSource eligible for enrolling in JTA-compliant transactions will be returned if possible
      dataSourceName - the name of the DataSource to return; may be null; ignored if both jta and useDefaultJta are true
      an appropriate DataSource, or null
      See Also: