How do I remove Hypersonic SQL database (HSQLDB) from JBoss EAP?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 4.x
- 5.x
- Red Hat JBoss Enterprise SOA Platform (SOA-P)
- 4.x
- 5.x
Issue
- How do I remove Hypersonic SQL database from JBoss Enterprise Application Platform ?
- Where can I find instructions on how to remove the HSQL database references ?
- How can we remove Hypersonic SQL database, since there are some dependencies on that db?
- Is Replacing HSQLDB in Production supported?
Resolution
JBoss EAP comes with a default JDBC datasource which is used by a variety of services (e.g. JMS, EJB timers, UUID generator, etc.). This datasource is configured in $JBOSS_HOME/server/$PROFILE/deploy/hsqldb-ds.xml and uses "DefaultDS" as its <jndi-name>. It uses the in-memory Hypersonic SQL database.
Choose one of the following two options to replace or remove Hypersonic from JBoss EAP:
1) Replace Hypersonic with an alternative database
- Replace
hsqldb-ds.xmlwith another*-ds.xmlfile whose<jndi-name>is "DefaultDS". Examples can be found in$JBOSS_HOME/docs/examples/jca. - Replace JMS (JBoss Messaging or JBossMQ) persistence manager service
- If using JBoss EAP 4.2
- replace
$JBOSS_HOME/server/$PROFILE/deploy/jms/hsqldb-jdbc2-service.xmlwith$JBOSS_HOME/docs/examples/jms/*-jdbc2-service.xml. - Note: Despite its name, the
$JBOSS_HOME/server/$PROFILE/deploy/jms/hsqldb-jdbc-state-service.xmlfile applies to all databases. So, there is no need to use a special jdbc-state-service.xml for each database. Feel free to re-name this file for clarity's sake.
- replace
- If using JBoss EAP 4.3
- replace
$JBOSS_HOME/server/$PROFILE/deploy/jboss-messaging.sar/hsqldb-persistence-service.xmlwith$JBOSS_HOME/docs/examples/jms/*-persistence-service.xml.
- replace
- If using JBoss EAP 5
- replace
$JBOSS_HOME/server/$PROFILE/deploy/messaging/hsqldb-persistence-service.xmlwith$JBOSS_HOME/docs/examples/jms/*-persistence-service.xml. - Note: If you use non-clustered server profile based on "default" profile, you might face this issue mentioned in this article JMS error when switching persistence back-end in JBoss EAP 5. Please see the article for details and resolution.
- replace
- If using JBoss SOA-P
- Refer to the "Database Configuration" section of the Installation Guide or Administration Guide
- SOA-P 5.x https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_SOA_Platform/5/html/Installation_and_Configuration_Guide/chap-Configuring_the_Default_Database.html
- SOA-P 4.3 https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_SOA_Platform/4.3/html/Administration_Guide/database_configuration.html
- SOA-P 4.2 https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_SOA_Platform/4.2/html/SOA_ESB_Administrators_Guide/switching_databases.html
- Refer to the "Database Configuration" section of the Installation Guide or Administration Guide
- If using JBoss EAP 4.2
2) Remove the "DefaultDS" Hypersonic datasource and all the components that depends on or refer to it
- Remove JMS
- If using JBoss EAP 5
- remove
$JBOSS_HOME/server/$PROFILE/deploy/messaging - remove the recovery configuration for the
DefaultJMSProviderfrom$JBOSS_HOME/server/$PROFILE/conf/jbossts-properties.xmlif present; the property is namedcom.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING1
- remove
- If using JBoss EAP 4.2
- remove
$JBOSS_HOME/server/$PROFILE/deploy/jms - remove the
jbossmqapplication policy from$JBOSS_HOME/server/$PROFILE/conf/login-config.xml
- remove
- If using JBoss EAP 4.3
- remove
$JBOSS_HOME/server/$PROFILE/deploy/jboss-messaging.sar - remove the
messagingapplication policy from$JBOSS_HOME/server/$PROFILE/conf/login-config.xml - remove
$JBOSS_HOME/server/$PROFILE/deploy/*jms-ds.xml - remove the recovery configuration for the
DefaultJMSProviderfrom$JBOSS_HOME/server/$PROFILE/conf/jbossjta-properties.xmlif present; the property is namedcom.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING1
- remove
- If using JBoss EAP 5
- Remove
$JBOSS_HOME/server/$PROFILE/deploy/uuid-key-generator.sar - Change the EJB Timer persistence policy. If using JBoss EAP 4.x, change
$JBOSS_HOME/server/$PROFILE/deploy/ejb-deployer.xml. If using JBoss EAP 5 change$JBOSS_HOME/server/$PROFILE/deploy/ejb2-timer-service.xml.- Uncomment the
"jboss.ejb:service=EJBTimerService,persistencePolicy=noop"MBean. - Change the
PersistencePolicyattribute of thejboss.ejb:service=EJBTimerServiceMBean to be"jboss.ejb:service=EJBTimerService,persistencePolicy=noop" - Comment out the
"jboss.ejb:service=EJBTimerService,persistencePolicy=database"MBean
- Uncomment the
- Remove
$JBOSS_HOME/server/$PROFILE/deploy/juddi-sevice.sar. This is only necessary if using the "all" or "production" profile. - Comment out the
"jboss.jca:name=DefaultDS,service=ManagedConnectionPool"MBean from"$JBOSS_HOME/server/$PROFILE/deploy/snmp-adaptor.sar/attributes.xml". This is only necessary if using the "all" or "production" profile. - Remove
$JBOSS_HOME/server/$PROFILE/deploy/hsqldb-ds.xml
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.