Copy the file mysql-connector-java-3.1.10-bin.jar from the folder c:\starthis_demo\mysql_driver into this location.
C:\starthis_demo\jboss-3.2.7\server\default\lib
It is assumed that you have installed JBoss into the folder c:\starthis_demo\jboss-3.2.7 as advised in Chapter 3, Installation of JBoss 3.2.7. If you had chosen a different location, you should look for the lib folder mentioned above in that location.
Now open any text (or XML) editor of your choice (Notepad, Wordpad etc) and do the following.
Obtain the IP address of the machine hosting the database. In other words, the machine on which you installed MySQL. Open a DOS window (Start->run->cmd) on this machine and type this command: ipconfig. It should display that computer's IP address.
Copy-paste the following text into the text editor that you just opened.
<datasources> <local-tx-datasource> <jndi-name>jdbc/rockwell</jndi-name> <connection-url>jdbc:mysql://10.10.2.6:3306/mysql</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <user-name>starthis</user-name> <password>starthis</password> </local-tx-datasource> </datasources>
Replace the string 10.10.2.6 in the text above with the IP address that you retrieved using the ipconfig command.
Save this text as a file with the name rockwell-mysql-ds.xml onto c:\starthis_demo\jboss-3.2.7\server\default\deploy. If you installed JBoss into a folder other than c:\starthis_demo, remember to use that location instead of c:\starthis_demo used above.