You need to deploy a datasource, put a file named (for instance) mesu-ds.xml in JBoss deploy dir looking like :
Code:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>MesuDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/mesu</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name>hibernate</user-name>
<password>hibernate</password>
</local-tx-datasource>
</datasources>
And your hibernate-service.xml will get the DS with this attribute :
Code:
<attribute name="DatasourceName">java:/MesuDS</attribute>
You can add /jdbc to this JNDI name if you want.