Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7788

<check-valid-connection-sql> done after a failure maybe?

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Obsolete
    • Icon: Major Major
    • No Release
    • JBossAS-5.1.0.GA
    • JCA service
    • None
    • High

      related directly to this bug in seam https://jira.jboss.org/jira/browse/JBSEAM-4528

      I would prefer the <check-valid-connection-sql> be run AFTER any exceptions from the jdbc api rather than before it. This would fix half the bug in the ticket referred to above(at least with postgres' case)....

      ie.
      1. go get a wrapper connection(not from pool)
      2. when you make a real jdbc call, go get the real connection from the pool
      3. if that jdbc call fails with an exception, run the check-valid-connection-sql
      4. If check-valid-connection-sql fails, go get another connection from pool(or create one) and if fails, move to next
      5. once all connections are exhausted, throw exception back to framework or whoever called the jdbc call.

      NOTE: This gives the performance benefit on sunny day we are never running the check valid connection sql. It also solves half of the ticket above which tends to break postgres/jboss/seam combination from working. I have to have check valid connection sql or my seam app never recovers from a db outage but having that also causes all normal seam pages that don't need the database to spin the browser into infinite redirect(ie. if I hit login page it comes up in jboss/seam IF AND ONLY IF I don't have check-valid-connection-sql set).

      thanks,
      Dean

              jpederse@redhat.com Jesper Pedersen
              deanhiller_jira deanhiller (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: