How to configure non-xa datasource failover in EAP 6/7?

Solution Verified - Updated -


  • We need to set up datasource failover in EAP 6 so that when one database is unavailable it will automatically transfer load to an alternate database.
  • We are looking for a way to implement datasource failover at the datasource level.
  • How to perform a task like, If primary datasource is not responding (or shut down forcefully, due to high CPU, errors, etc.), it will automatically fail-over to secondary datasource?
  • Fail-over is not working on JBoss EAP 6 datasources. In standalone-*.xml file the datasource configuration looks as below:
   <datasource jndi-name="java:/sampleDS" pool-name="sampleDS" enabled="true" > 
  • How to configure HA Data Source in JBoss EAP 6 ? Does JBoss need a restart when a database instance goes down?


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6
    • 7
  • url-delimiter and url-selector-strategy-class-name as defined in
    • jboss-as-datasources_1_0.xsd
    • jboss-as-datasources_1_1.xsd
    • wildfly-datasources_<version>.xsd for EAP 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content