MySQL is an open-source database used by many open-source projects and small organizations. To use JBoss 4.0 with MySQL, we have to put the MySQL driver classes into the runtime classpath of JBoss application server and copy the MySQL Connector/J 5.1 driver JAR file to the C:\JBoss\jboss-4.0.5.GA\server\default\lib
directory. MySQL Connector/J 5.1 driver supports JDBC 4.0 and can be obtained from http://dev.mysql.com/downloads/connector/j/5.1.html. We also need to set the JAVA_HOME
environment variable to JDK 6.0.
To use the MySQL data source, copy /docs/examples/jca/mysql-ds.xml
to the /server/default/deploy
directory. Modify the mysql-ds.xml
configuration file by setting<driver-class/>
to com.mysql.jdbc.Driver
and<connection-url/>
to jdbc:mysql://localhost:3306/test.
Finally, modify server/default/conf/login-config.xml
with MySQL database settings and add the following<application-policy/>
element to \server\default\conf\login...