10000 GitHub - Oorahdev/SledgeHammerCP: Sledge Hammer • Connection pooling that puts the developer in control
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Oorahdev/SledgeHammerCP

 
 

Repository files navigation

SledgeHammerCP

Connection pooling that puts the developer in control


Why SledgeHammerCP?

Admittedly, there are a lot of connection pooling options out there: c3p0, Hikari, DBCP, etc. But have you ever had a driver not properly validate connections? What about a connection leak with no insight into the root cause? Or a connection pool not enforce its maximum connection limit? These are the problems that SledgeHammerCP solves.

SledgeHammerCP is a simple connection pool manager [currently based on Apache Commons Pool] that focuses on putting the developer control and providing solid connection pool functionality over all else. It's meant to be easily debugged and pluggable in place of other popular connection pool libraries. If you have a problem with connections, SledgeHammerCP can solve it or at the very least highlight where the problem is occurring. In short, it's connection pooling that just works... no fluff, no slick coding tricks, just functional connection pooling that gets the job done while providing a lot of visibility to d 5830 evelopers.

Using SledgeHammerCP

Creating the DataSource

SledgeHammerConfig config = new SledgeHammerConfig();
config.setDriverClassName("com.mysql.jdbc.Driver");
config.setJdbcUrl("jdbc:mysql://localhost:3306/test?useUnicode=yes&characterEncoding=UTF-8");
config.setUsername("test");
config.setPassword("test");
config.setMaxTotal(5);
config.setBlockWhenExhausted(true);

SledgeHammerDataSource dataSource = new SledgeHammerDataSource(config);

Getting a Connection from the pool

Connection con = dataSource.getConnection();

Returning a Connection to the pool

con.close();

About

Sledge Hammer • Connection pooling that puts the developer in control

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 69.6%
  • Groovy 30.4%
0