The Server Labs Blog Rotating Header Image


Database storage in TIBCO EMS 5.0

Earlier this year TIBCO released a new version of their particular implementation of the JMS standard. TIBCO Enterprise Message Service 5.0 which, among others, includes some features which I personally consider very interesting.

One of them is the possibility to store persistent messages in a database. In previous versions, the only possibility was to use file based storage. In case you wanted to use fault tolerant groups of servers, this caused some difficulties as having both the messages and the shared state information in files required them to be in a shared storage device, either via hardware (SCSI and SAN, NAS or NAS with NFS) or software (Cluster Server or Clustered File System). These solutions are expensive and hard to maintain while using a database eases the configuration and leaves the hard work on the DBMS. You can even combine file and database based storage depending on the queue or topic.

Database storage is based in Hibernate, so any database server supported by Hibernate could be used to store the data. To use it, first we will need to enable it, setting the following parameters in the tibemsd.conf file:

  • dbstore_classpath: pointing to the hibernate and DB driver jar files.
  • dbstore_driver_name: specifies the jdbc driver.
  • dbstore_driver_dialect: specifies the hibernate driver dialect.
  • jre_library: associated JVM libraries.

Second, we will have to create the stores in the stores.conf file, for example:


Third, link the destinations with the appropriate store, either in the topics.conf and queues.conf files or using the command line administration tool with the setprop command, e.g.

setprop topic my.topic store=dbstore

Finally, we will need to export the EMS database tables using the EMS Schema export tool provided with EMS:

java -jar <EMS_home>/bin/tibemsd_util.jar -tibemsdconf <route_to_tibemds.conf>/tibemsd.conf -createall -export

As a postscript, let me recommend you not to install EMS as root, at least in a Solaris machine. With EMS 5.0 version it will not work unless you change the owner after the installation. This happens because once installed, if we try to run in as root, Solaris, due to security reasons, will execute the process with the user nobody4 but the folder which will contain the datastore files (if we choose file-based storage) will have write permissions set only for root user. As EMS will not be able to create the datastores, it will automatically shutdown. Moreover, even if we change the rights of that folder we will have the same problem with the configuration files, they will only have write permissions for root user which will return errors if we try to change the configuration using the command line administration tool.