Small adition: The DataSource file declared in the hibernate.cfg.xml is in the Jboss_Home/server/default/deploy. Here is the file:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>SampleDS</jndi-name>
<connection-url>jdbc:mysql://localhost/astrachallenge</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<user-name>root</user-name>
<password>kralitsa6817</password>-->
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>