1 Reply Latest reply on Feb 20, 2012 4:54 AM by Xi CHEN

    How to configure a HA DataSource in JBoss 7.1 ?

    Xi CHEN Newbie



          We are currnently  migrating a JBoss 5 App to JBoss 7.1. But we have a problem with the DataSource Configuration:

          can't find the way to configure a HA DataSource (set two urls in connection-url) to treate the database failover case.


          In JBoss 5.1, we simply separating the Databases' URL with "|", characters as follows:












          <check-valid-connection-sql>select COUNT(*) from VERSION





      The following is my attempt which does not work in JBoss 7.1 :


      <datasource jndi-name="java:/MyDatabase" pool-name="MyPool" enabled="true" use-java-context="true" use-ccm="false">












                  select COUNT(*) from VERSION





          <driver name="sqlserver" module="com.microsoft.sqlserver">







      I simply tried to separate the host and servername using "|" characters, just like in JBoss 5. But if I shutdown the first DB, it desn't try to make a new connection with the second DB url...


      Can anyone even point me in the right direction? Even an example of an ha xa datasource configuration would help.