The following are the steps that you will need to follow to setup mysql datasource in JBoss AS 7.
/jboss-as-7.1.1.Final/modules/com
/jboss-as-7.1.1.Final/modules/com/mysql/main
mysql-connector-java-5.1.XX-bin.jar
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.30-bin.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
standalone.xml
in the bin directory add the following:<driver name="mysql" module="com.mysql">
<driver-class>com.mysql.jdbc.Driver</driver-class>
</driver>
java:/mysql
You can watch this video, which demonstrates the above steps.