class DSPool {

    private static BasicDataSource dsPool = null;

    private static final String BASE_DIR = AppConfig.CONFIG_DIR;
    private static final String DB_DRIVER = AppConfig.getProperty("dbDriver");
    private static final int MAX_ACTIVE = Integer.parseInt(AppConfig.getProperty("maxActive"));
    private static final boolean TEST_ON_BORROW = Boolean.parseBoolean(AppConfig.getProperty("testOnBorrow"));
    private static final int MIN_IDLE = Integer.parseInt(AppConfig.getProperty("minIdle"));
    private static final int MAX_WAIT = Integer.parseInt(AppConfig.getProperty("maxWait"));

    private DSPool() {
    }


    /**
     * fetches the data source for H2 db
     *
     * @return data source pool
     */

    public static BasicDataSource getDataSource() throws GeneralSecurityException {
        if (dsPool == null) {
            dsPool = registerDataSource();
        }
        return dsPool;

    }

    /**
     * register the data source for H2 DB
     *
     * @return pooling database object
     */

    private static BasicDataSource registerDataSource() throws GeneralSecurityException {<FILL_FUNCTION_BODY>}

}

        System.setProperty("h2.baseDir", BASE_DIR);

        // create a database connection
        String user = AppConfig.getProperty("dbUser");
        String password = AppConfig.decryptProperty("dbPassword");
        String connectionURL = AppConfig.getProperty("dbConnectionURL");

        if (connectionURL != null && connectionURL.contains("CIPHER=")) {
            password = "filepwd " + password;
        }

        String validationQuery = "select 1";

        BasicDataSource dataSource = new BasicDataSource();
        dataSource.setDriverClassName(DB_DRIVER);
        dataSource.setMaxTotal(MAX_ACTIVE);
        dataSource.setTestOnBorrow(TEST_ON_BORROW);
        dataSource.setMinIdle(MIN_IDLE);
        dataSource.setMaxWaitMillis(MAX_WAIT);
        dataSource.setValidationQuery(validationQuery);
        dataSource.setUsername(user);
        dataSource.setPassword(password);
        dataSource.setUrl(connectionURL);

        return dataSource;

    
<no_super_class>