@@ -0,0 +1,1122 @@
+package ro.gov.ithub.infotranspub.sql;%0Aimport java.io.IOException;%0Aimport java.sql.SQLException;%0A%0Aimport org.apache.commons.dbcp.BasicDataSource;%0A%0A%0Apublic class DataSource %7B%0A%0A    private static DataSource     datasource;%0A    private BasicDataSource ds;%0A%0A    private DataSource() throws IOException, SQLException %7B%0A        ds = new BasicDataSource();%0A        ds.setDriverClassName(%22org.postgresql.Driver%22);%0A        ds.setUsername(%22alex%22);%0A        ds.setPassword(%22%22);%0A        ds.setUrl(%22jdbc:postgresql://localhost/infotranspub%22);%0A       %0A     // the settings below are optional -- dbcp can work with defaults%0A        //ds.setMinIdle(5);%0A        //--ds.setMaxActive(20);%0A        //ds.setMaxIdle(20);%0A        //ds.setMaxOpenPreparedStatements(180);%0A%0A    %7D%0A%0A    public static DataSource getInstance() throws IOException, SQLException%7B%0A        if (datasource == null) %7B%0A            datasource = new DataSource();%0A            return datasource;%0A        %7D else %7B%0A            return datasource;%0A        %7D%0A    %7D%0A%0A    public java.sql.Connection getConnection() throws SQLException %7B%0A        return this.ds.getConnection();%0A    %7D%0A%0A%7D%0A

Add datasource for pool of connections to postgres