Interface DataSourcePool

  • public interface DataSourcePool
    Combines multiple DataSourcePoolProvider services into a single service that gives access to preconfigured data sources.
    • Method Detail

      • getDataSource

        <AdapterType> AdapterType getDataSource​(String name,
                                                Class<AdapterType> desiredType)
                                         throws DataSourceNotFoundException,
        Return the named data source, if available
        name - Configured name of the data source
        desiredType - , expected type (for example DataSource.class for a j2ee DataSource).
        a data source object of the desired type, which must be properly closed or disposed of to be returned to the pool, according to the semantics of that data source type.
        DataSourceNotFoundException - no data source found with supplied name.
        TypeNotAvailableException - data source found but not compatible with desired type
      • getDataSource

        Object getDataSource​(String name)
                      throws DataSourceNotFoundException
        Return the named data source, if available, as an Object. Useful in scripting languages where the actual type is checked by the language, for other cases it is recommended to use the getDataSource method.
        name - name of the data source
        the datasource
        DataSourceNotFoundException - if the data source is not found
      • getAllJndiDataSourceNames

        Collection<String> getAllJndiDataSourceNames()
        Return the collection of all JNDI data sources available with the system. Useful for tooling which wants to show all datasources in the system
        Collection of all JNDI Data Sources that are register with this Pool