Skip to content

Commit 60a5224

Browse files
authored
Update README.md
1 parent 5b44d84 commit 60a5224

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
11
# ebean-datasource
22
Implementation of ebean-datasource-api - a SQL DataSource implementation
3+
4+
5+
### Example use:
6+
7+
```java
8+
9+
DataSourceConfig config = new DataSourceConfig();
10+
config.setDriver("org.postgresql.Driver");
11+
config.setUrl("jdbc:postgresql://127.0.0.1:5432/unit");
12+
config.setUsername("foo");
13+
config.setPassword("bar");
14+
15+
16+
DataSource pool = DataSourceFactory.create("app", config);
17+
18+
```
19+
20+
21+
### Robust and fast
22+
23+
This pool is robust in terms of handling loss of connectivity to the database and restoring connectivity.
24+
It will automatically reset itself as needed.
25+
26+
This pool is fast and simple. It uses a strategy of testing connections in the background and when connections
27+
are returned to the pool that have throw SQLException. This makes the connection testing strategy low overhead
28+
but also robust.
29+
30+
31+
32+
### Mature
33+
34+
This pool has been is heavy use for more that 10 years and stable since April 2010 (the last major refactor to use `java.util.concurrent.locks`).
35+
36+
This pool was previously part of Ebean ORM with prior history in sourceforge.
37+
38+
There are other good DataSource pools out there but this pool has proven to be fast, simple and robust and maintains it's status as the preferred pool for use with Ebean ORM.

0 commit comments

Comments
 (0)