I needed to create a Virtual Box VM for my TIBCO experiments.
Here is how I created my base system, a CentOS VM with EMS 8.1.
This tutorial include all relevant scripts, and associated Gnome launchers.
Note: You could also take an existing image from a site like this one, but I prefer making my own.
On the target VM, I created only one non-root user (name=”user”).
I use the shared folder feature of Virtual Box to share file between the host and guest systems. If you choose this path, please make sure that the user you are using is in the group vboxsf, like so:
Nothing difficult here… a simple wizard based java installer. In my case, the tibco home is /opt/tibco. I specified /opt/cfgtibco as the configuration folder. In both cases, I had to create the folder with root and change the rights.
# /bin/bash # As root ! cd /opt mkdir tibco mkdir cfgtibco chown user tibco chown user cfgtibco chgrp user tibco chgrp user cfgtibco chmod 770 -R tibco chmod 770 -R cfgtibco
Note: The installer did not work at first with the OpenJDK provided by CentOS. Hence the Oracle JDK prerequisite.
Note 2 : DO NOT try to reorganize the configuration folder. As will be seen below, EMSCA can regenerate and deliver a configuration. When it does, it take into account the original configuration folder.
I used the provided utility to convert the old configuration fileS to the single JSON config file required for EMSCA:
cd /opt/cfgtibco/tibco/cfgmgmt/ems/data /opt/tibco/ems/8.1/bin/tibemsconf2json -conf tibemsd.conf -json tibemsd.json
As they will not be used anymore, I like to move the “old-style” EMS configuration to another folder:
cd /opt/cfgtibco/tibco/cfgmgmt/ems/data mkdir OLD_CONFIG mv *.conf OLD_CONFIG/ mv *.txt OLD_CONFIG/ mv *.conf_template OLD_CONFIG/
To use the new configuration, the lauching script (in my case EMS_HOME/bin/tibemsd64.sh) must be adjusted:
cd /opt/tibco/ems/8.1/bin ./tibemsd64 -config "/opt/cfgtibco/tibco/cfgmgmt/ems/data/tibemsd.json"
Then, I create a launcher for the script :
gnome-terminal -e "gnome-terminal -e /opt/tibco/ems/8.1/bin/tibemsd64.sh"
EMSCA is better managed with a simple initiator properties files, such as this one:
com.tibco.emsca.data.dir=/opt/cfgtibco/tibco/cfgmgmt/ems/emsca_data com.tibco.emsca.http.hostport=*:8080
Don’t forget to create the esmca_data folder:
cd /opt/cfgtibco/tibco/cfgmgmt/ems mkdir emsca_data
The final setup should look like this:
The self contained web server can then be started with this command, which I decide to include in a launcher script on the desktop:
/opt/tibco/ems/8.1/bin/tibemsca --config /opt/cfgtibco/tibco/cfgmgmt/ems/data/emsca.properties
OR, as a Gnome shortcut:
gnome-terminal -e “/opt/tibco/ems/8.1/bin/tibemsca –config /opt/cfgtibco/tibco/cfgmgmt/ems/data/emsca.properties”
We then use the browser to connect…
At first, EMSCA is empty of any servers. We must “create” a server (connection)
Then, it it a simple matter of following the server hyperlink to get in the main screen
To use EMSCA (or any other guest OS service) from your host system, follow this tutorial on port redirection with CentOS and VirtualBox.
1. Install a fresh Hermes with root (on Linux in my case)
2. Create a /home/USER/.hermes or /home/USER/hermes directory and copy the files from the /usr/local/HermesJMS/SOMETHING/cfg directory (again, only important on Linux)
mkdir ~/hermes cp /usr/local/HermesJMS/cfg/* ~/hermes
Then I was able to start Hermes with /usr/local/HermesJMS/bin/hermes.sh
3. In Hermes, the first step is to get into the “Options-> Configuration…->Providers” section
4. Then, you can right-click to create a new provider. I named mine “EMS8.1″, but the value can be anything.
5. Again, use the right-click to select “add jars” and select EVERY JARS in the EMS_HOME/lib directory (use *.jar in the textbox to clean other files). Select the “Scan” option when asked. Click “Apply” and close the configuration window with “OK”.
6. The last step is to create a new Tibco EMS session (by right clicking on sessions in the main screen or using the menu bar). This usually looks a lot like this:
Everything is important here:
You can now right click on the session and try to discover the destinations (Topics & Queues). They will be added automagically if the connection is successful.
Note: There may be a way to do some of this with JNDI, but I have not played with than yet.
GEMS is a “native(TIBCO EMS APIs) and JMS based” administration and debugging tool. It is rough on the edges and unsupported by TIBCO, but it can also be more powerful than Hermes.
It is available for download here.(Original Article)
The installation is not complex. It consist of:
#!/bin/sh #Edit 1 : to allow script to be executed from anywhere cd ~/Gems #Edit 2 : Adjust EMS location TIBEMS_ROOT=/opt/tibco/ems/8.1 TIBEMS_JAVA=${TIBEMS_ROOT}/lib #Edit 3 : Change to jms-2.0.jar for EMS8 or higher CLASSPATH=${TIBEMS_JAVA}/jms-2.0.jar:${TIBEMS_JAVA}/jndi.jar CLASSPATH=Gems.jar:looks-2.3.1.jar:jcommon-1.0.16.jar:jfreechart-1.0.13.jar:${TIBEMS_JAVA}/tibjms.jar:${TIBEMS_JAVA}/tibcrypt.jar:${TIBEMS_JAVA}/tibjmsadmin.jar:${CLASSPATH} CLASSPATH=${CLASSPATH}:${TIBEMS_JAVA}/slf4j-api-1.4.2.jar:${TIBEMS_JAVA}/slf4j-simple-1.4.2.jar # echo ${CLASSPATH} java -classpath ${CLASSPATH} -Xmx128m -DPlastic.defaultTheme=DesertBluer com.tibco.gems.Gems gems.props
Please note:
The script can now be executed directly, or via launcher:
Last, but certainly not least, we add a launcher to the TIBCO EMS admin tool.
We now have a great testing VM, with administrative tools included !
The next steps could be to play with multiple instances of EMS and/or with SSL settings, or to explore EMSCA…
…then I’ll install more TIBCO products : BusinessWorks 6, BusinessEvents or others, and write more articles !