Do you need to deploy your DataSource along with your Enterprise Application ? (that is without having to install it in the "deploy" dir )
So, In your EAR file, create a jboss-app.xml file containing the following:


Place this jboss-app.xml in the META-INF folder of your EAR. And place the -ds.xml at the root of the EAR.  

JBoss AS 7 users

JBoss AS 7.1.1 supports deploying datasources along with your applications well: check this article to learn more about it.



Related articles available on

JBoss Datasource HA

This tutorial has been updated for the new release of JBoss Appli

JBoss run out of Connections ?

Have you got No ManagedConnections available error message ? well

How to connect to a DataSource from a remote client?

  If you want to connect to your JBoss Connection Pool from a re

WildFly Datasource configuration

A Datasource is a Java Naming and Directory Interface (JNDI) obje

How do I get the list of Datasources available ?

JBOSS AS 4/5 Users You can use either twiddle: $ que

How to change JBoss Connection pool size dynamically ?

JBoss recipe of the day