Interface DriverManager

  • All Known Implementing Classes:
    DefaultDriverManager

    public interface DriverManager
    DriverManager allows to register database drivers placed in the arbitrary locations. Database driver being registered must be available on classpath or in any of previously added driver resources.

    If no resources has been added to DefaultDriverManager (as it is in most cases when web harvest is embedded into enterprise application running within container), all drivers being registered must be accessible within container's default class loader.

    Since:
    2.1.0-SNAPSHOT
    Version:
    %I%, %G%
    Author:
    Piotr Dyraga
    • Method Detail

      • addDriverResource

        void addDriverResource​(URI location)
        Adds resource containing database driver (in most cases it is a JAR file).
        Parameters:
        location - location of the resource; must not be null
      • removeDriverResource

        void removeDriverResource​(URI location)
        Removes previously added database driver resource.
        Parameters:
        location - location of resource which is going to be removed; must not be null
      • registerDriver

        void registerDriver​(String driverClass)
                     throws ClassNotFoundException
        Registers driver with the provided class name. Driver must be already accessible on classpath or in any of previously added resources.
        Parameters:
        driverClass - fully qualified name of the driver's class.
        Throws:
        ClassNotFoundException - thrown if the provided driver's class can not be found.