log.info("Testing FBWrapping DataSource Pooling on db: " + DB_DATASOURCE_URL);
if (log != null) log.info("Testing FBWrapping DataSource Pooling on db: " + DB_DATASOURCE_URL);
   public void testPooling() throws Exception {        log.info("Testing FBWrapping DataSource Pooling on db: " + DB_DATASOURCE_URL);        ds = new FBWrappingDataSource();        ds.setDatabaseName(DB_DATASOURCE_URL);        ds.setMinSize(3);        ds.setMaxSize(5);        ds.setBlockingTimeout(1000);        ds.setIdleTimeout(20000);        ds.setPooling(true);        connection = ds.getConnection(DB_USER, DB_PASSWORD);        assertTrue("Connection is null", connection != null);        Thread.sleep(2000);        int ccount = ds.getConnectionCount();        assertTrue("Wrong number of connections!" + ccount, ccount == ds.getMinSize());        connection.close();        ArrayList cs = new ArrayList();        for (int i = 0; i < ds.getMaxSize(); i++)        {           cs.add(ds.getConnection(DB_USER, DB_PASSWORD));        } // end of for ()        try        {           ds.getConnection(DB_USER, DB_PASSWORD);           fail("got a connection more than maxsize!");        }        catch (SQLException re)        {           //got a blocking timeout, good        } // end of try-catch        for (Iterator i = cs.iterator(); i.hasNext(); )        {           ((Connection)i.next()).close();        } // end of for ()        //This will be from same pool due to internal construction of FBDataSource.        ds.setUser(DB_USER);        ds.setPassword(DB_PASSWORD);        connection = ds.getConnection();        assertTrue("Connection is null", connection != null);        connection.close();    }