The default database for JBoss-3.2.3 is Hypersonic. Using the use we need to switch the database to mysql, oracle, etc., need to modify those files?
Below I take the mysql database as an example, switch the JBoss's default database to Mysql.
1. Download the mysql Driver from http://www.mysql.com/downloads/api-jdbc-stable.html, and copy it below $ jboss_disc / server / default / lib.
2, you must delete the HSQLDB-DS.XML below $ jboss_disc / server / default / deploy, add a mysql-ds.xml file, and include the content:
XML Version = "1.0" encoding = "UTF-8"?>
The database name, user name, and password here are replaced with Test. You need to modify the actual name.
In fact, the hsqldb-ds.xml here is not necessarily deleted, as long as the default name defaultds in JNDI Name does not have a conflict.
3, in $ jboss_disc / server / default / deploy / jms
Mysql-jdbc2-service.xml replaces HSQL-JDBC2-Service.xml. Put them
DEFAULTDS is modified into mysqlds. This file is responsible for the persistent storage of Message Quene.
4. If you want to use the CMP function, you have two ways to modify: add jbosscmp-jdbc.xml to
EJB deployment unit or modification
$ Jboss_disc / server / default / conf / standardjbosscmp-jdbc.xml, edit
Compiling the element Datasource-maping to mysql, like this:
Ok, now restart JBOSS, working in the MySQL database.