class SqlDbConfiguration {

    public DataSource createDataSource() {
        final String driverClass = (String) dbConfig.get("javax.persistence.jdbc.driver");
        final String connectionUrl = (String) dbConfig.get("javax.persistence.jdbc.url");
        final String username = (String) dbConfig.get("javax.persistence.jdbc.user");
        final String password = (String) dbConfig.get("javax.persistence.jdbc.password");

        final BasicDataSource ds = new BasicDataSource();
        ds.setDriverClassName(driverClass);
        ds.setUsername(username);
        ds.setPassword(password);
        ds.setUrl(connectionUrl);
        ds.setMinIdle(1);
        ds.setMaxIdle(2);

        return ds;
    }

    public  SqlDbConfiguration(final PersistenceUnitDescriptor descriptor);

}