Interface DataSourceManager


  • public interface DataSourceManager
    Service interface that wraps the Apache commons-dbcp. It allows consumers to retrieve a name dataSource.
    Author:
    bramk
    • Field Detail

      • DEFAULT_DATASOURCE_NAME

        static final String DEFAULT_DATASOURCE_NAME
        Default data source use by WebManager to connect to a database.
        See Also:
        Constant Field Values
    • Method Detail

      • getAllSpecifications

        String[] getAllSpecifications()
        Returns:
      • getAllDataSourceNames

        String[] getAllDataSourceNames()
      • exists

        boolean exists​(String dataSourceName)
      • initialize

        void initialize()
        Initializes the DataSourceManager. The executed actions are implementation-specific.
      • getDatasourceType

        String getDatasourceType​(String datasourceName)
        Returns the datasource type for the datasource name.
        Parameters:
        datasourceName - the name of the datasource
        Returns:
        The type of datasource
      • getAllJDBCResources

        String[] getAllJDBCResources()
        Returns all JDBC resources as provided by the application server via JNDI.
        Returns:
        JNDI names of JDBC resources
      • getDataSource

        DataSource getDataSource()
                          throws SQLException
        Returns the default WebManager data source.
        Returns:
        the default WebManager data source
        Throws:
        SQLException - In case an SQL Exception occurs when retrieving the data source