Openfire (ARCHIVED)

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

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 3.6.0
  • Component/s: Database
  • Labels:
    None
  • Acceptance Test - Add?:
    No

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).

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: