JBoss.org Community Documentation

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, we should change the JMS service to take advantage of the external database. To do that, we need to replace the file jboss-as/server/production/deploy/jms-singleton/hsqldb-jdbc2-service.xml with a file in jboss-as/docs/examples/jms/ depending on your external database. Notice that if you are using the default server profile, the file path is jboss-as/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.