Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-30

Allow flushing of connection pool on fatal connection events

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Critical
    • 1.0.0.Beta6
    • None
    • Core
    • None

    Description

      As an alternative to validating connections (either on borrow or in the background), we could implement a feature similar to WebSphere's purge policy. The idea is that we can assume in certain cases that a single fatal exception means every connection in the pool will subsequently throw fatal exceptions. Such is the case in situations where the connected database has been restarted. Rather than implementing a purge policy per se, we would implement an "on fatal behavior". The behavior could define one of three actions to be taken when a fatal exception is encountered:

      1. Destroy single connection (equivalent to WAS policy of "single connection")
      2. Initiate validation run
      3. Flush entire pool (equivalent to WAS policy of "whole pool")

      Note that all of the above (indeed this entire feature) requires the use of an ExceptionSorter.

      In terms of implementation, I see two possibilities:

      1. Implement this feature as an MBean, which means we'd need some way of registering connection event listeners outside JCA.
      2. Implement this feature as part of the JCA adapter which I think makes more sense, but is more impactful.

      Regarding #1, if it's possible to simply add a way to register connection event listeners from outside the adapter, that could become its own feature request and this feature simply turns into an MBean that can be implemented separately.

      Attachments

        Activity

          People

            jpederse@redhat.com Jesper Pedersen
            rhn-support-cbredese Chris Bredesen
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: