If you've worked through the above sections, you've arleady
performed these steps. But we list them here for quick reference.
Driver Launched:
Download and unzip Connector/MXJ, add connector-mxj.jar to the
CLASSPATH
To the JDBC connection string add the following parameter:
"socketFactory=" + ServerLauncherSocketFactory.class.getName()
JBoss:
Download Connector/MXJ copy the
connector-mxj.jar
file to the
$JBOSS_HOME/server/default/lib
diretory.
Download Connector/J copy the
connector-mxj.jar
file to the
$JBOSS_HOME/server/default/lib
diretory.
Create an MBean service xml file in the
$JBOSS_HOME/server/default/deploy
directory with any attributes set, for instance the
datadir
and autostart
.
Set the JDBC parameters of your web application to use:
String driver = "com.mysql.jdbc.Driver"; String url
= "jdbc:mysql:///test?propertiesTransform="+
"com.mysql.management.jmx.ConnectorMXJPropertiesTransform";
String user = "root"; String password = "";
Class.forName(driver); Connection conn =
DriverManager.getConnection(url, user, password);
You may wish to create a separate users and database table spaces
for each application, rather than using "root and test".
We highly suggest having a routine backup procedure for backing up
the database files in the datadir
.