First step is setting up a mysql service.
(- a file can be found @ $JBOSS_HOME/docs\examples\jca)
Move this file to $JBOSS_HOME/server/default/deploy.
After that a JNDI name is available for this database.
Tying this jndi name to the cmp2 bean. Set the datasource name in jbosscmp-jdbc.xml to the jndi name that was just created.