Posting for the "Googlers".
Well, I don't know if this is a bug or a configuration issue.
In fact, what solved the problem described on the initial post was to change the line below (in standalone.xml)
from:
<datasource jndi-name="java:/MySqlDS" enabled="true" use-java-context="true" pool-name="MySqlDS">
to:
<datasource jndi-name="java:/MySqlDS" enabled="true" use-java-context="true" pool-name="MySqlDS_pool">
then, after a server restart, I've got this:
fernando@kirk:/usr/local/jboss$ sudo su jboss
[sudo] password for fernando:
$ pwd
/usr/local/jboss-as-7.1.1.Final
$ bin/jboss-cli.sh --connect
[standalone@localhost:9999 /] /subsystem=datasources/data-source=MySqlDS_pool:test-connection-in-pool
{
"outcome" => "success",
"result" => [true]
}