Wednesday, July 14, 2010

Changing Default HSQLDB to User Database in Jboss for JMS

As we know jboss uses HSQLDB for the jms persistence to modify this to persist the JMS messages to user Database like mysql,oracle..e.t Following changes as to be made in jboss.

1. Delete the hsqldb-ds.xml from JBOSS_HOME/server/default/deploy folder.

2. Copy the respective database related ds file from JBOSS_HOME/docs/examples/jca/*-ds.xml file to deploy folder of default.

3. Change the jndi-name in *-ds.xml file to "DefaultDS".

4. Delete hsqldb-jdbc2-service.xml file from JBOSS_HOME/server/default/jms folder.

5. Copy the respective database persitence manager service xml file *-jdbc2-service.xml from JBOSS_HOME//docs/examples/jms to JBOSS_HOME/server/default/jms folder.

6. Change the jndi name in the *-jdbc2-service.xml to "DefaultDS" .
jboss.jca:service=DataSourceBinding,name=DefaultDS

7. Rename the hsqldb-jdbc-state-service.xml to respective database name *-jdbc-state-service.xml, its optional you can keep the file as it is.

8. Copy the respective database connector jar file to /JBOSS_HOME/server/default/lib folder.

Now the configuration is modified for the jms persistence to user database and data will persist to jms_message table only when the huge number of jms are generated and its a temporary storage once the jms message is consumed it will deleted automatically from the jms_message table.

HsqlDB change zip file.
Source file

0 comments:

Post a Comment