revised the connection pooling and fixed errors regarding DBConnection