Configuring JBoss AS 5 JMS for MySQL

To round-out the JBoss AS 5 clustering stuff, I figured I'd add a little how-to for configuring JMS to use MySQL.

This is covered in the docs, but what the hell (the example DS config files leaves out transaction stuffs, which produces an warning like this: DataSource connection transaction isolation should be READ_COMMITTED, but it is currently REPEATABLE_READ.).

{jbossdir} = your jboss dir {serverdir} = your server dir {jbossdir}/server/{serverdir}

Firstly, create a mysql datasource file:{serverdir}/deploy/mysql-ds.xml

Fill it with something along these lines:


Delete the {serverdir}/deploy/hsqldb-ds.xml file.

Then delete the {serverdir}/deploy/messaging/hsqldb-persistence-service.xml file.

Copy {jbossdir}/docs/examples/jms/mysql-persistence-service.xml file to {serverdir}/deploy/messaging/mysql-persistence-service.xml.

If you're using clustering, be sure to set Clustered to true in mysql-persistence-service.xml.

Um, guess that's it.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Gary Gilbert's Gravatar I am guessing both nodes point to the same mySQL instance for the JMS or?
# Posted By Gary Gilbert | 9/22/09 2:53 AM
coldshen's Gravatar ja, I think the idea is to get that data someplace where a node going down doesn't take out the db. On the data tier vs. the app server tier, so to speak.
# Posted By coldshen | 9/22/09 9:52 PM
BlogCFC was created by Raymond Camden. This blog is running version Contact Blog Owner