Our development team uses maven jetty plugin for our local environment, and our production uses JBoss EAP 6.1
All you need to do is to create a jboss-web.xml in your WEB-INF with something like below:
<resource-ref>
<res-ref-name>jdbc/MyDS</res-ref-name>
<jndi-name>java:jboss/jdbc/MyDS</jndi-name>
</resource-ref>
In our web.xml we have something like this:
<resource-ref>
<res-ref-name>jdbc/MyDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>