JBoss.org Community Documentation

13.5. Change Database for the JMS Services

The JMS service in the JBoss AS uses relational databases to persist its messages. For improved performance, we should change the JMS service to take advantage of the external database. To do that, we need to replace the file <JBoss_Home>/server/all/deploy/jms-singleton/hsqldb-jdbc2-service.xml with a file in <JBoss_Home>/docs/examples/jms/ depending on your external database. Notice that if you are using the default server profile, the file path is <JBoss_Home>/server/default/deploy/jms/hsqldb-jdbc2-service.xml.

  • MySQL: mysql-jdbc2-service.xml

  • PostgreSQL: postgres-jdbc2-service.xml

  • Oracle: oracle-jdbc2-service.xml

  • DB2: db2-jdbc2-service.xml

  • Sybase: sybase-jdbc2-service.xml

  • MS SQL Server: mssql-jdbc2-service.xml

What about the hsqldb-jdbc-state-service.xml file?

Despite its name, the hsqldb-jdbc-state-service.xml file applies to all databases. So, there is no need to use a special jdbc-state-service.xml for each database.