You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by vo...@apache.org on 2020/04/17 23:47:11 UTC

[fineract] branch develop updated (c7b58b9 -> 1c74398)

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

vorburger pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git.


    from c7b58b9  escape all `grouping` in SQL files for MySQL 8 compatibility (#757)
     new 64e02bc  comment out broken MySQL JDBC driver logger (awaiting FINERACT-890)
     new 1c74398  add MySQL JDBC Driver (LGPL) to Dockerfile + doc (fixes FINERACT-762)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Dockerfile                                                    | 11 +++++++++--
 docker-compose.yml                                            |  6 ++++++
 .../core/service/TomcatJdbcDataSourcePerTenantService.java    |  2 +-
 .../src/main/resources/META-INF/spring/hikariDataSource.xml   |  2 +-
 4 files changed, 17 insertions(+), 4 deletions(-)


[fineract] 01/02: comment out broken MySQL JDBC driver logger (awaiting FINERACT-890)

Posted by vo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git

commit 64e02bc123c22f1352e135af169c76d7e864fa7c
Author: Michael Vorburger <mi...@vorburger.ch>
AuthorDate: Mon Apr 13 18:46:03 2020 +0200

    comment out broken MySQL JDBC driver logger (awaiting FINERACT-890)
---
 .../core/service/TomcatJdbcDataSourcePerTenantService.java              | 2 +-
 .../src/main/resources/META-INF/spring/hikariDataSource.xml             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TomcatJdbcDataSourcePerTenantService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TomcatJdbcDataSourcePerTenantService.java
index 71be36e..3b6fb7d 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TomcatJdbcDataSourcePerTenantService.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/TomcatJdbcDataSourcePerTenantService.java
@@ -109,7 +109,7 @@ public class TomcatJdbcDataSourcePerTenantService implements RoutingDataSourceSe
         config.addDataSourceProperty("maintainTimeStats", "false");
 
         // https://github.com/brettwooldridge/HikariCP/wiki/JDBC-Logging#mysql-connectorj
-        config.addDataSourceProperty("logger", "com.mysql.jdbc.log.StandardLogger");
+        // TODO FINERACT-890: config.addDataSourceProperty("logger", "com.mysql.cj.log.Slf4JLogger");
         config.addDataSourceProperty("logSlowQueries", "true");
         config.addDataSourceProperty("dumpQueriesOnException", "true");
 
diff --git a/fineract-provider/src/main/resources/META-INF/spring/hikariDataSource.xml b/fineract-provider/src/main/resources/META-INF/spring/hikariDataSource.xml
index 1ba0ba0..f28a8de 100644
--- a/fineract-provider/src/main/resources/META-INF/spring/hikariDataSource.xml
+++ b/fineract-provider/src/main/resources/META-INF/spring/hikariDataSource.xml
@@ -60,7 +60,7 @@
                 <prop key="maintainTimeStats">false</prop>
 
                 <!-- https://github.com/brettwooldridge/HikariCP/wiki/JDBC-Logging#mysql-connectorj -->
-                <prop key="logger">com.mysql.jdbc.log.StandardLogger</prop>
+                <!-- TODO FINERACT-890: <prop key="logger">com.mysql.cj.log.Slf4JLogger</prop>  -->
                 <prop key="logSlowQueries">true</prop>
                 <prop key="dumpQueriesOnException">true</prop>
             </props>


[fineract] 02/02: add MySQL JDBC Driver (LGPL) to Dockerfile + doc (fixes FINERACT-762)

Posted by vo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git

commit 1c74398d900cd8ec11166681684832519cc4b314
Author: Michael Vorburger <mi...@vorburger.ch>
AuthorDate: Mon Apr 13 18:44:53 2020 +0200

    add MySQL JDBC Driver (LGPL) to Dockerfile + doc (fixes FINERACT-762)
    
    Note that it is NOT enabled by default, which should be OK for the ASF.
    
    The main point here is just to clearly document it for end-users.
    
    I've obviously tried out what's documented, and can confirm it works.
---
 Dockerfile         | 11 +++++++++--
 docker-compose.yml |  6 ++++++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 14de81c..27f4e68 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -51,6 +51,13 @@ COPY ./docker/server.xml /opt/bitnami/tomcat/conf
 RUN chmod 664 /opt/bitnami/tomcat/conf/server.xml
 
 WORKDIR /opt/bitnami/tomcat/lib
-# org.drizzle.jdbc.DrizzleDriver is used in docker/server.xml for jdbc/fineract_tenants DataSource
-# (But note that connections to individual tenant DBs may use another driver...)
+# org.drizzle.jdbc.DrizzleDriver is used by default for both the all tenants and demo tenant DB DataSource
 RUN wget https://repo1.maven.org/maven2/org/drizzle/jdbc/drizzle-jdbc/1.4/drizzle-jdbc-1.4.jar
+
+# https://issues.apache.org/jira/browse/LEGAL-462
+# https://issues.apache.org/jira/browse/FINERACT-762
+# We include an alternative JDBC driver (which is faster, but not allowed to be default in Apache distribution)
+# allowing implementations to switch the driver used by changing start-up parameters (for both tenants and each tenant DB)
+# The commented out lines in the docker-compose.yml illustrate how to do this.
+# To be sure that this instead of Drizlle is used, comment out wget above.
+RUN wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.19/mysql-connector-java-8.0.19.jar
diff --git a/docker-compose.yml b/docker-compose.yml
index 9ad6911..80e1116 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -55,3 +55,9 @@ services:
       - FINERACT_DEFAULT_TENANTDB_PORT=3306
       - FINERACT_DEFAULT_TENANTDB_UID=root
       - FINERACT_DEFAULT_TENANTDB_PWD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
+
+# https://issues.apache.org/jira/browse/FINERACT-762
+# To use an altnerative JDBC driver (which is faster, but not allowed to be default in Apache distribution)
+# replace org.drizzle.jdbc.DrizzleDriver with com.mysql.jdbc.Driver in DRIVERCLASS_NAME and fineract_tenants_driver,
+# and remove ":thin:" from PROTOCOL and fineract_tenants_url.  Note that the mysql-connector-java-*.jar is already
+# bundled in the container by the Dockerfile, but just not used by default.