Skip to content

Commit 01a97db

Browse files
Configure C3P0 via properties and DataSourceBuilder
1 parent f72ddb6 commit 01a97db

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
@@ -2,12 +2,12 @@
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 C3P0 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 purposes, the application uses an `ExecutorService` for simulating concurrent users.
66

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

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

0 commit comments

Comments
 (0)