Failure to retrieve a connection from the database pool should trigger an Exception

Description

Currently, if a connection cannot be returned from the database pool, null is returned. As this is not documented, and as a SQLException is declared in the method signature, this is very confusing. Most implementors will try/catch for SQLException, but will not check for null. This introduced NullPointerExceptions (which are RuntimeExceptions, and therefor not handled by generic SQLExeption try/catches that usually surround code that involves database operations.

Not being able to return a connection from the database pool should trigger an SQLException to be thrown (the backend does this, but Openfire catches this and replaces it with a null value).

Environment

None

Activity

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created April 24, 2008 at 7:36 PM
Updated April 24, 2008 at 9:10 PM
Resolved April 24, 2008 at 9:10 PM