Package org.webharvest.runtime.database
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 toDefaultDriverManager
(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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addDriverResource(URI location)
Adds resource containing database driver (in most cases it is a JAR file).void
registerDriver(String driverClass)
Registers driver with the provided class name.void
removeDriverResource(URI location)
Removes previously added database driver resource.
-
-
-
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 benull
-
removeDriverResource
void removeDriverResource(URI location)
Removes previously added database driver resource.- Parameters:
location
- location of resource which is going to be removed; must not benull
-
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.
-
-