B.4. Change Database for the JMS Services

The JMS service in the JBoss AS uses relational databases to persist its messages. For improved performance, you should change the JMS service to take advantage of the external database. To do that, you need to replace the file jboss-as/server/production/deploy/jboss-messaging.sar/clustered-hsqldb-persistence-service.xml with a file in jboss-as/docs/examples/jms/ depending on your external database and restart your server.
  • MySQL: mysql-persistence-service.xml
  • PostgreSQL: postgresql-persistence-service.xml
  • Oracle: oracle-persistence-service.xml
  • Sybase: sybase-persistence-service.xml
  • MS SQL Server: mssql-persistence-service.xml
For the default and all configurations, replace the files jboss-as/server/default/deploy/jboss-messaging.sar/hsqldb-persistence-service.xml and jboss-as/server/all/deploy/jboss-messaging.sar/clustered-hsqldb-persistence-service.xml respectively.