-
1. Re: mySql with jboss+catalina
aqil Jan 29, 2002 2:12 AM (in response to aqil)1. Copy the code below and place it in the jboss.jcml file which you will find in the /conf directory. If you are running an integrated distribution
(jBoss + Tomcat for ex.) make sure you change the jBoss.jcml in the /conf/catalina directory as well.
<!-- ======================================-->
<!-- JDBC -->
<!-- ======================================-->
org.gjt.mm.mysql.Driver
DefaultDS
org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
jdbc:mysql://192.168.10.100:3306/MyDatabaseName
1200000
MyDataBaseUsername
MyDataBasePassword
10
false
false
false
true
120000
1800000
false
false
1.0
0
2. You will have to change the following attributes in the above code to
match your specific setup:
jdbc:mysql://192.168.10.100:3306/MyDatabaseName
MyDataBaseUsername
MyDataBasePassword
For example if mySQL is on a different box your URL may be:
jdbc:mysql://192.168.10.100:3306/BOS
or
if mySQl is listening on another port you will change the 3306 to that port.
3. COMMENT OUT or remove the existing Hypersonic pool.4. In the standardjaws.xml file, which is in the same directory as the
jboss.jcml file, change the beginning of the listing at the
very top of the file to this.
java:/DefaultDS
<type-mapping>mySQL</type-mapping>
false
.....................
.........................
......................
5. Restart jBoss. (That's it.)
One more thing, when you lookup for a datasource with the above setting. use
.lookup("java:/DefaultDS").
Regards.
Yasir Siraj.