Interface PersistenceUnitInfoBean.DataSourceProvider

    • Method Detail

      • 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:
        PersistenceUnitInfoBean.getJtaDataSource(), PersistenceUnitInfoBean.getNonJtaDataSource()