Interface PersistenceUnitInfoBean.DataSourceProvider

Enclosing class:
PersistenceUnitInfoBean
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
    Method
    Description
    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.

      Parameters:
      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
      Returns:
      an appropriate DataSource, or null
      See Also: