Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
63d7d1c1
Commit
63d7d1c1
authored
5 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Plain Diff
Merge branch '564-c3p0-to-hikari' into 'master'
replaced C3P0 with Hikari Closes
#564
See merge request
!783
parents
27741bf3
5345dd54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!783
replaced C3P0 with Hikari
Pipeline
#10371
failed
5 years ago
Changes
4
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG
+2
-1
2 additions, 1 deletion
CHANGELOG
persist/pom.xml
+17
-9
17 additions, 9 deletions
persist/pom.xml
persist/src/main/java/lcsb/mapviewer/persist/SpringPersistConfig.java
+8
-22
8 additions, 22 deletions
...main/java/lcsb/mapviewer/persist/SpringPersistConfig.java
pom.xml
+3
-2
3 additions, 2 deletions
pom.xml
with
30 additions
and
34 deletions
CHANGELOG
+
2
−
1
View file @
63d7d1c1
...
...
@@ -2,9 +2,10 @@ minerva (14.0.0~alpha.0) unstable; urgency=low
* Feature: log4j is replaced with log4j2 logging mechanism (#291)
* Feature: database installed via debian package is done via dbconfig-commons
(#469)
* Feature: Replaced connection pool manager C3P0 with better maintained Hikari (#564)
* Feature removal: BioCompendium annotator removed (#32)
--
Piotr Gawron <piotr.gawron
@uni.lu>
Thu, 16
May 2019 1
5:0
0:00 +0200
--
Sascha Herzinger <sascha.herzinger
@uni.lu>
Wed, 22
May 2019 1
0:3
0:00 +0200
minerva (13.1.0~alpha.0) unstable; urgency=low
* Feature: annotators are more flexible - you can define set of input and
...
...
This diff is collapsed.
Click to expand it.
persist/pom.xml
+
17
−
9
View file @
63d7d1c1
...
...
@@ -158,15 +158,23 @@
<version>
${postgresql-jdbc.version}
</version>
</dependency>
<!--<dependency>-->
<!--<groupId>com.zaxxer</groupId>-->
<!--<artifactId>HikariCP</artifactId>-->
<!--<version>${hikari.version}</version>-->
<!--</dependency>-->
<dependency>
<groupId>
c3p0
</groupId>
<artifactId>
c3p0
</artifactId>
<version>
${c3p0.version}
</version>
<dependency>
<groupId>
com.zaxxer
</groupId>
<artifactId>
HikariCP
</artifactId>
<version>
${hikari.version}
</version>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-api
</artifactId>
<version>
${slf4jVersion}
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-slf4j-impl
</artifactId>
<version>
${log4j-slf4jVersion}
</version>
</dependency>
<dependency>
...
...
This diff is collapsed.
Click to expand it.
persist/src/main/java/lcsb/mapviewer/persist/SpringPersistConfig.java
+
8
−
22
View file @
63d7d1c1
package
lcsb.mapviewer.persist
;
import
com.
mchange.v2.c3p0.ComboPooled
DataSource
;
import
com.
zaxxer.hikari.Hikari
DataSource
;
import
org.hibernate.SessionFactory
;
import
org.hibernate.cfg.Environment
;
import
org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
;
...
...
@@ -15,7 +15,6 @@ import org.springframework.security.authentication.encoding.Md5PasswordEncoder;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
javax.sql.DataSource
;
import
java.beans.PropertyVetoException
;
import
java.util.Properties
;
@Configuration
...
...
@@ -28,29 +27,16 @@ public class SpringPersistConfig {
return
new
ConfigurationHolder
();
}
// @Bean
// public HikariDataSource dataSource(ConfigurationHolder config) {
// HikariDataSource dataSource = new HikariDataSource();
// dataSource.setDriverClassName("org.postgresql.Driver");
// dataSource.setJdbcUrl(config.getDbUri());
// dataSource.setUsername(config.getDbUsername());
// dataSource.setPassword(config.getDbPassword());
// dataSource.setIdleTimeout(30000);
// dataSource.setMaximumPoolSize(90);
// dataSource.setConnectionTestQuery("select 1");
// return dataSource;
// }
@Bean
(
destroyMethod
=
"close"
)
public
ComboPooled
DataSource
dataSource
(
ConfigurationHolder
config
)
throws
PropertyVetoException
{
ComboPooled
DataSource
dataSource
=
new
ComboPooled
DataSource
();
dataSource
.
setDriverClass
(
"org.postgresql.Driver"
);
public
Hikari
DataSource
dataSource
(
ConfigurationHolder
config
)
{
Hikari
DataSource
dataSource
=
new
Hikari
DataSource
();
dataSource
.
setDriverClass
Name
(
"org.postgresql.Driver"
);
dataSource
.
setJdbcUrl
(
config
.
getDbUri
());
dataSource
.
setUser
(
config
.
getDbUsername
());
dataSource
.
setUser
name
(
config
.
getDbUsername
());
dataSource
.
setPassword
(
config
.
getDbPassword
());
dataSource
.
set
MinPoolSize
(
5
);
dataSource
.
setMaxPoolSize
(
9
0
);
dataSource
.
set
MaxStatements
(
5
);
dataSource
.
set
IdleTimeout
(
30000
);
dataSource
.
setMax
imum
PoolSize
(
1
0
);
dataSource
.
set
ConnectionTestQuery
(
"select 1"
);
return
dataSource
;
}
...
...
This diff is collapsed.
Click to expand it.
pom.xml
+
3
−
2
View file @
63d7d1c1
...
...
@@ -69,8 +69,9 @@
<postgresql-jdbc.version>
42.2.5
</postgresql-jdbc.version>
<hikari.version>
3.2.0
</hikari.version>
<c3p0.version>
0.9.1.2
</c3p0.version>
<hikari.version>
3.3.1
</hikari.version>
<slf4jVersion>
1.7.25
</slf4jVersion>
<log4j-slf4jVersion>
2.11.2
</log4j-slf4jVersion>
<cglib.version>
3.2.8
</cglib.version>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment