vorburger commented on a change in pull request #722: Fineract-796 - Use Hikari 
instead of Tomcat Connection Pool
URL: https://github.com/apache/fineract/pull/722#discussion_r390252682
 
 

 ##########
 File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/db/DataSourceConfiguration.java
 ##########
 @@ -38,19 +39,19 @@
     @Autowired JDBCDriverConfig config ;
 
     @Bean
-    public DataSourceProperties dataSourceProperties() {
-    return new DataSourceProperties(config.getDriverClassName(), 
config.getProtocol(), config.getSubProtocol(), config.getPort());
+    public DataSourceProperties DataSourceProperties() {
+        return new DataSourceProperties(config.getDriverClassName(), 
config.getProtocol(), config.getSubProtocol(), config.getPort());
     }
 
     @Bean
-    public DataSource tenantDataSourceJndi() {
-    PoolConfiguration p = getProperties();
-        org.apache.tomcat.jdbc.pool.DataSource ds = new 
org.apache.tomcat.jdbc.pool.DataSource(p);
-        logger.info("Created new DataSource; url=" + p.getUrl());
+    public DataSource hikariTenantDataSource() {
 
 Review comment:
   So this class is actually one I wrote myself, many many years ago, to get 
pure Spring Boot working (which subsequently got broken again somehow; fixing 
it is the point of https://issues.apache.org/jira/browse/FINERACT-764 and 
https://issues.apache.org/jira/browse/FINERACT-730), because as long as there 
was a DS in JNDI from Tomcat's server.xml, this was needed. But now that with 
this change there is an equivalent `hikariTenantDataSource` bean already, we 
should be able to just get rid of this class entirely... do you want to try to 
just delete it, and see if that just works? Anything that requires this bean 
should now get it from your new `hikariDataSource.xml` - makes sense?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to