配置jboss entity bean:
首先需要在lib目录下加入mysql-connector-java-5.1.7-bin.jar
其次,在deployers目录下加入mysql-ds.xml
<datasources>
<local-tx-datasource>
<jndi-name>MySql</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/account</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password></password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>