code: public static DataSource createDataSource(String driverClassName, String url, String userName, String password, int initialSize, int maxActive) throws SQLException {
          assertNotNull(driverClassName);
          assertNotNull(url);
          assertNotNull(userName);
          assertNotNull(password);
  
          BasicDataSource ds = new BasicDataSource();
          ds.setDriverClassName(driverClassName);
          ds.setUrl(url);
          ds.setUsername(userName);
          ds.setPassword(password);
  
          ds.setMaxActive(maxActive);
          ds.setInitialSize(initialSize);
  
          return ds;
      }
docs: Returns new Pooled {@link DataSource} implementation
  <p/>
  In case this function won't work - use {@link #createDataSource(java.util.Properties)}
  
  @param driverClassName Driver Class name
  @param url             Database connection url
  @param userName        Database user name
  @param password        Database user password
  @param initialSize     initial pool size
  @param maxActive       max connection active
  @return new Pooled {@link DataSource} implementation
  @throws SQLException