I'm not sure I catch your question.
You will find many basic examples how to access datasources with JNDI lookup or @Ressource injection, it depends on the EE version you use.
So you can write a simple example with a JDBC statement or a JPA entity to access the DS, nevertheless whether it is a MySql or somthing different.
The configuration is shown here https://community.jboss.org/wiki/DataSourceConfigurationinAS7#Installing_a_JDBC_driver_as_a_module