Package org.nuxeo.ecm.core.storage
Class DBCheck
java.lang.Object
org.nuxeo.ecm.core.storage.DBCheck
- All Implemented Interfaces:
BackingChecker
- Since:
- 9.2
- API Note:
- reworked in 11.5
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(ConfigurationHolder configHolder) Test if the check has to be done for the given configuration.voidcheck(ConfigurationHolder configHolder) Test the availability of the backing service.voidcheckDatabaseConnection(ConfigurationHolder configHolder) Check driver availability and database connectionprotected DriverlookupDriver(ConfigurationHolder configHolder, Path databaseTemplateDir, String classname) Builds anURLClassLoaderfor the given databaseTemplate looking in the templates directory and in the server lib directory, then looks for a driverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.launcher.config.backingservices.BackingChecker
getDescriptor, getDescriptor, getDescriptor, getDescriptor
-
Field Details
-
DB_EXCLUDE_CHECK_LIST
-
PARAM_DB_DRIVER
- See Also:
-
PARAM_DB_JDBC_URL
- See Also:
-
PARAM_DB_HOST
- See Also:
-
PARAM_DB_PORT
- See Also:
-
PARAM_DB_NAME
- See Also:
-
PARAM_DB_USER
- See Also:
-
PARAM_DB_PWD
- See Also:
-
-
Constructor Details
-
DBCheck
public DBCheck()
-
-
Method Details
-
accepts
Description copied from interface:BackingCheckerTest if the check has to be done for the given configuration.- Specified by:
acceptsin interfaceBackingChecker- Parameters:
configHolder- The current configuration- Returns:
- true if
BackingChecker.check(ConfigurationHolder)has to be called.
-
check
Description copied from interface:BackingCheckerTest the availability of the backing service.- Specified by:
checkin interfaceBackingChecker- Parameters:
configHolder- The current configuration- Throws:
ConfigurationException- if backing service is not available.
-
checkDatabaseConnection
public void checkDatabaseConnection(ConfigurationHolder configHolder) throws ConfigurationException, DatabaseDriverException, SQLException Check driver availability and database connection -
lookupDriver
protected Driver lookupDriver(ConfigurationHolder configHolder, Path databaseTemplateDir, String classname) throws DatabaseDriverException Builds anURLClassLoaderfor the given databaseTemplate looking in the templates directory and in the server lib directory, then looks for a driver- Parameters:
classname- Driver class name, defined byPARAM_DB_DRIVER- Returns:
- Driver driver if found, else an Exception must have been raised.
- Throws:
DatabaseDriverException- If there was an error when trying to instantiate the driver.- Since:
- 5.6
-