Skip to content

Connection Pooling

Muhammad Hewedy edited this page Mar 4, 2017 · 1 revision

Like stored-procedure-proxy spwrap doesn't provide connection pooling, however it delegate that whole thing to the DataSource implementation.

DataSources can provide connection pooling, and spwrap accepts dataSource object when being build:

DataSource dataSource = // ... read datasource from App server or from a lib like HikariCP etc..
DAO dao = new DAO.Builder(dataSource).build();
CustomerDAO customerDao = dao.create(CustomerDAO.class);