How do I remove Hypersonic SQL database (HSQLDB) from JBoss EAP?

Solution Verified - Updated

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.xml with another *-ds.xml file 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.xml with $JBOSS_HOME/docs/examples/jms/*-jdbc2-service.xml.
      • Note: Despite its name, the $JBOSS_HOME/server/$PROFILE/deploy/jms/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. Feel free to re-name this file for clarity's sake.
    • If using JBoss EAP 4.3
      • replace $JBOSS_HOME/server/$PROFILE/deploy/jboss-messaging.sar/hsqldb-persistence-service.xml with $JBOSS_HOME/docs/examples/jms/*-persistence-service.xml.
    • If using JBoss EAP 5
      • replace $JBOSS_HOME/server/$PROFILE/deploy/messaging/hsqldb-persistence-service.xml with $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.
    • 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

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 DefaultJMSProvider from $JBOSS_HOME/server/$PROFILE/conf/jbossts-properties.xml if present; the property is named com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING1
    • If using JBoss EAP 4.2
      • remove $JBOSS_HOME/server/$PROFILE/deploy/jms
      • remove the jbossmq application policy from $JBOSS_HOME/server/$PROFILE/conf/login-config.xml
    • If using JBoss EAP 4.3
      • remove $JBOSS_HOME/server/$PROFILE/deploy/jboss-messaging.sar
      • remove the messaging application 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 DefaultJMSProvider from $JBOSS_HOME/server/$PROFILE/conf/jbossjta-properties.xml if present; the property is named com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING1
  • 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 PersistencePolicy attribute of the jboss.ejb:service=EJBTimerService MBean to be "jboss.ejb:service=EJBTimerService,persistencePolicy=noop"
    • Comment out the "jboss.ejb:service=EJBTimerService,persistencePolicy=database" MBean
  • 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
Components
Category

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.