FINERACT-796

Use Hikari instead of Tomcat Connection Pool
 - Created hikari connection pool bean
 - Configured connection parameters to match hikari
 - Removed tomcat-jdbc and dbcp
 - Remove unused classes
 - Add Hikari to logback
 - update hikaridatasource bean

closes https://issues.apache.org/jira/browse/FINERACT-796

remove hikaricp import from gradle files

more specific bean config

- Set up datasource properties
- Cleanup unused classes
- Add hikari to logback
This commit is contained in:
xurror
2020-03-28 15:06:34 +01:00
committed by Michael Vorburger ⛑️
parent 2e620b4de8
commit 3475c0cfb7
20 changed files with 100 additions and 496 deletions
@@ -39,7 +39,7 @@ public class TestsWithoutDatabaseAndNoJobsConfiguration extends AbstractApplicat
*/
@Bean
public TenantDatabaseUpgradeService tenantDatabaseUpgradeService() {
return new TenantDatabaseUpgradeService(null, null, null) {
return new TenantDatabaseUpgradeService(null, null) {
@Override
public void upgradeAllTenants() {
// NOOP
@@ -62,7 +62,7 @@ public class TestsWithoutDatabaseAndNoJobsConfiguration extends AbstractApplicat
* DataSource with Mockito RETURNS_MOCKS black magic.
*/
@Bean
public DataSource tenantDataSourceJndi() {
public DataSource hikariTenantDataSource() {
DataSource mockDataSource = Mockito.mock(DataSource.class, Mockito.RETURNS_MOCKS);
return mockDataSource;
}
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<Context>
<Resource type="javax.sql.DataSource" name="jdbc/fineract_tenants"
driverClassName="org.drizzle.jdbc.DrizzleDriver" url="jdbc:mysql:thin://localhost:3306/fineract_tenants"
username="root" password="mysql" validationQuery="select 1" maxActive="10"
maxIdle="4" />
</Context>