1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-13 17:56:20 +00:00

#680: warning when using H2 database

This commit is contained in:
bgamard
2023-04-22 00:47:01 +02:00
parent 4634def93e
commit dd36e08d7d
2 changed files with 2 additions and 1 deletions

View File

@@ -85,6 +85,7 @@ public final class EMF {
Path dbDirectory = DirectoryUtil.getDbDirectory();
String dbFile = dbDirectory.resolve("docs").toAbsolutePath().toString();
if (Strings.isNullOrEmpty(databaseUrl)) {
log.warn("Using an embedded H2 database. Only suitable for testing purpose, not for production!");
props.put("hibernate.connection.driver_class", "org.h2.Driver");
props.put("hibernate.dialect", "org.hibernate.dialect.HSQLDialect");
props.put("hibernate.connection.url", "jdbc:h2:file:" + dbFile + ";CACHE_SIZE=65536;LOCK_TIMEOUT=10000");