After struggling for 2 weeks because of error "datasource-mapping mysql not find ",in jboss4.0.0. and put mysql-ds.xml to default\deploy .
I already finally configured as following :
in mysql-ds.xml
<local-tx-datasource>
<jndi-name>mysqldbstudents</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:mysql://localhost:3306/mysqldb</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name>as</user-name>
as
<type-mapping>mysql</type-mapping>
</local-tx-datasource> .....
in standardjaws.xml
java:/mysqldbstudents
<type-mapping>mysql</type-mapping>
.....
in standardjbosscmp-jdbc.xml
java:/mysqldbstudents
<datasource-mapping>mysql</datasource-mapping>
<create-table>true</create-table> .........
thanks.