Skip to content

Commit 9007ffe

Browse files
Configure C3P0 via properties and DataSourceBuilder
1 parent aa9a65a commit 9007ffe

File tree

1 file changed

+5
-5
lines changed
  • HibernateSpringBootDataSourceBuilderC3P0Kickoff

1 file changed

+5
-5
lines changed

HibernateSpringBootDataSourceBuilderC3P0Kickoff/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
**[How To Customize BoneCP Settings Via Properties And `DataSourceBuilder`](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDataSourceBuilderBoneCPKickoff)**
1+
**[How To Customize C3P0 Settings Via Properties And `DataSourceBuilder`](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDataSourceBuilderC3P0Kickoff)**
22

33
**Note:** The best way to tune the connection pool parameters consist in using [Flexy Pool](https://github.com/vladmihalcea/flexy-pool) by Vlad Mihalcea. Via [Flexy Pool](https://github.com/vladmihalcea/flexy-pool) you can find the optim settings that sustain high-performance of your connection pool.
44

5-
**Description:** This is a kickoff application that set up BoneCP via `DataSourceBuilder`. The `jdbcUrl` is set up for a MySQL database. For testing purpose the application uses an `ExecutorService` for simulating concurrent users.
5+
**Description:** This is a kickoff application that set up C3P0 via `DataSourceBuilder`. The `jdbcUrl` is set up for a MySQL database. For testing purpose the application uses an `ExecutorService` for simulating concurrent users.
66

77
**Key points:**\
8-
- in `pom.xml` add the BoneCP dependency\
9-
- in `application.properties`, configure BoneCP via a custom prefix, e.g., `app.datasource.*`\
8+
- in `pom.xml` add the C3P0 dependency\
9+
- in `application.properties`, configure C3P0 via a custom prefix, e.g., `app.datasource.*`\
1010
- write a `@Bean` that returns the `DataSource`
1111

1212
**Output sample:**\
13-
![](https://github.com/AnghelLeonard/Hibernate-SpringBoot/blob/master/HibernateSpringBootDataSourceBuilderBoneCPKickoff/BoneCP%20trace%20log.png)
13+
![](https://github.com/AnghelLeonard/Hibernate-SpringBoot/blob/master/HibernateSpringBootDataSourceBuilderC3P0Kickoff/C3P0%20trace%20log.png)
1414

1515
------------------------------
1616

0 commit comments

Comments
 (0)