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

Add support for datasource failover

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • JBossAS-4.0.2 Final
    • JBossAS-3.2.7 Final, JBossAS-4.0.1 Final
    • JCA service
    • None

    Description

      The change to org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory
      is easier than org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory

      In LocalManagedConnectionFactory add a property "delimiter"
      which when present will parse the connectionURL into multiple urls.

      In XAManagedConnectionFactory you will also need a property to identify which of the xaProps needs to be parsed for mulitple urls.
      i.e. you need to identify which property contains the server to contact.

      In both cases, if createManagedConnection fails for the first url, replace it with the second url, and try again until all urls are exhausted.

      Of course, you can get clever and remember which urls are currently failing and try the non failing urls first, And also if the db is replicating, you might want it to "load balance"
      connections across the urls?

      Also, this design does not allow for using different properties with different db servers, e.g. user and password might change across the servers.

      It also doesn't enforce that only connections from one connectionURL (db server) are in the pool at the same time in the event the db is not replicating.

      If you are going to do this, I would suggest you subclass/replicate the managed connection factories and create separate rars so we can mark them as experimental.

      xxxxxxxxxxxxxxxxxxxxxxxx
      Adrian Brock
      Director of Support
      Back Office
      JBoss Inc.
      xxxxxxxxxxxxxxxxxxxxxxxx

      Attachments

        Activity

          People

            olubyans@redhat.com Alexey Loubyansky
            starksm64 Scott Stark (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: