1.
mysql-connector-java-3.1.12-bin.jar 放到 C:/jboss-4.0.2/server/default/lib
和C:/j2sdk1.4.2_04/jre/lib/ext/
2.
修改C:/jboss-4.0.2/server/default/conf/standardjaws.xml
<jaws>
<datasource>java:/MySqlDS</datasource>
<type-mapping>mySQL</type-mapping>
<debug>false</debug>...................................
修改C:/jboss-4.0.2/server/default/conf/standardjbosscmp-jdbc.xml
<jbosscmp-jdbc>
<defaults>
<datasource>java:/MySqlDS</datasource>
<datasource-mapping>mySQL</datasource-mapping>
<create-table>true</create-table>........................
3.
C:/jboss-4.0.2/docs/examples/jca/mysql-ds.xml 拷贝到目录
C:/jboss-4.0.2/server/default/deploy
并修改如下:
<datasources>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/ASPDB</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>...</password>
.......................................................
4.
ROOT.war放到目录
C:/jboss-4.0.2/server/default/deploy/jbossweb-tomcat55.sar/
--转自