You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2022/12/21 16:07:42 UTC

[jackrabbit-oak] branch 1.22 updated: OAK-9021: use SystemPropertySupplier in RDBDataSourceFactory

This is an automated email from the ASF dual-hosted git repository.

reschke pushed a commit to branch 1.22
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/1.22 by this push:
     new 5d2a26b22f OAK-9021: use SystemPropertySupplier in RDBDataSourceFactory
5d2a26b22f is described below

commit 5d2a26b22fbfbbdfbbcc696ba65e57be6fac1f10
Author: Julian Reschke <re...@apache.org>
AuthorDate: Mon Apr 20 10:25:42 2020 +0000

    OAK-9021: use SystemPropertySupplier in RDBDataSourceFactory
    
    git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1876752 13f79535-47bb-0310-9956-ffa450edef68
---
 .../jackrabbit/oak/plugins/document/rdb/RDBDataSourceFactory.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDataSourceFactory.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDataSourceFactory.java
index 7ef4557727..abee07ad21 100644
--- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDataSourceFactory.java
+++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDataSourceFactory.java
@@ -31,6 +31,7 @@ import java.util.logging.Logger;
 import javax.sql.DataSource;
 
 import org.apache.jackrabbit.oak.plugins.document.DocumentStoreException;
+import org.apache.jackrabbit.oak.plugins.document.util.SystemPropertySupplier;
 import org.slf4j.LoggerFactory;
 
 /**
@@ -77,9 +78,10 @@ public class RDBDataSourceFactory {
                 dsclazz.getMethod("setUsername", String.class).invoke(ds, username);
                 dsclazz.getMethod("setPassword", String.class).invoke(ds, passwd);
                 dsclazz.getMethod("setUrl", String.class).invoke(ds, url);
-                String interceptors = System.getProperty(
-                        "org.apache.jackrabbit.oak.plugins.document.rdb.RDBDataSourceFactory.jdbcInterceptors",
-                        "SlowQueryReport(threshold=10000);ConnectionState;StatementCache");
+                String interceptors = SystemPropertySupplier
+                        .create("org.apache.jackrabbit.oak.plugins.document.rdb.RDBDataSourceFactory.jdbcInterceptors",
+                                "SlowQueryReport(threshold=10000);ConnectionState;StatementCache")
+                        .loggingTo(LOG).get();
                 if (!interceptors.isEmpty()) {
                     dsclazz.getMethod("setJdbcInterceptors", String.class).invoke(ds, interceptors);
                 }