User Guide for Tomcat Installation for WS-Messenger (WSMG)
The tomcat version of the WS-Messenger comprises of two seperate applications
WS-Messenger uses an MySQL database to keep all the information of the subscriptions. If the server crashes, the subscription information can be loaded automatically from the database when the WS-Messenger server restarts. (You can skip the step of setting up datebase if you don't want to save the subscriptions. However, you will get exceptions about database connection when you run the server. You can ignore these exceptions. )
You can download MySQL database from here (I am using version 4.1).
1, You need to create a database in MySQL database, e.g. wsmg. (See MySQL document for how to create a database in MySQL) .
2, Then run the commands in mysqlCreationScript.txt to create the required tables. (The file is available at db/mysqlCreationScript.txt in the package)
3, Create an account for the WS-Messeneger server to access your database.
4, modify config/db.config.template file according to your database setup. You just need to setup the jdbcUrl string for accessing the database. Following is an example: jdbcUrl=jdbc:mysql://linbox3.extreme.indiana.edu:3306/wsmg?user=wsmg&password=password
5,Rename this file to db.config.
Unzip the source zip file to a desired installation location. This will be refered to MESSENGER_HOME herefourth.
Open a shell or a command line and cd to MESSENGER_HOME and run
(This assumes ant is installed properly in the system)
This will compile the project and create a war file deployable in Tomcat.
Download and install Tomcat version 5.5. This Tomcat installation location will be refered to as CATALINA_HOME.
Move or archive CATALINA_HOME/webapps/ROOT directory.
The ant wat task above creates a messenger.war file in MESSENGER_HOME/distrebution directory. Copy the messenger.war file to CATALINA_HOME/webapps/ROOT.war. It is important you rename it to ROOT.war as you copy.
You might desire to run the WS-Messenger in a port other than 8080(Tomcat default port). Open the CATALINA_HOME/conf/server.xml file. Locate the non-SSL HTTP Connector which is a Connector element which looks like following. Change the port to a desired port. This document assume port is changed to 12346
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" ..........
Start Tomcat. Open your browser in http://127.0.0.1:12346. It should say WS-Messenger running.
Shut down tomcat because database is not configured properly yet.
There should be a CATALINA_HOME/webapps/ROOT directory created by now. Copy the db.config file created in 3.5 above to CATALINA_HOME/webapps/ROOT/WEB-INF/classes directory.
:-) Server Installation is Completed!!!!!!!!!!
Open a terminal and cd to MESSENGER_HOME. Download the following shell script add it to the MESSENGER_HOME and run it. (Argh!! we missed it during the release. Its setting the classpaths. adding the jars to the classpath and adding config/db.config file to the classpath) If you want to enable logs and detach the process you could
It will write to a messenger.log file.
Once the script is successfully run open http://127.0.0.1:12347. It should pop a page that has a button that allows you to shutdown the Messenger.
You are good to go!!. Read the userguide and start publishing and subscribing.