Installing Airavata WS-Messenger 0.0.1-SNAPSHOT ------------------------------------------------ Build WS-Messenger from Source ------------------------------ Prerequisites ------------- Java 1.5 Maven (tested on v 3.0.2) 1. Check out the code from SVN. 2. Go to project folder and type mvn clean install -Dmaven.test.skip=true 3. The binary distribution is located at /distribution/target Configure WS-Messenger messageBroker service. ---------------------------------------------- Given below are the configurations for message broker service. configuration file should be named as "msgBroker.properties". This should be included in the class path (e.g. /standalone-server/conf) when broker starts. Configuration Description ============================= ==================================== broker.jdbc.driver Database driver. broker.jdbc.url Url string used to connect the database broker.start.delivery.thread If set to true message delivery thread will be started. (true/false) Applicable when only running broker. User must set this to 'false' if he wishes run message deliver component separately ( e.g. messenger servlet). broker.socket.timeout Connection timeout in milliseconds.Set this to '0' if user wishes connections never to be timed out. (not recommended)4000 broker.storage.type Specifies message, subscriptions should be stored in a database or not. memory or persistent (memory/persistent) broker.delivery.method Specifies what mechanism to be used deliver messages. (serial,parallel,pcrew) serial – single threaded delivery parallel – dynamic thread pool based delivery pcrew – fixed thread pool based delivery serial , parallel or pcrew broker.msg.delivery.retries Number of message delivery failures before a url become black listed (default is 2) 2 consumer.expiration.time.gap Time period (in seconds) a url will be kept blacklisted (default is 5 seconds) 5 sending.batch.size Maximum number of messages to be send to a one consumer/url at time. applicable if 'broker.delivery.method' is 'pcrew'(default is 10)10 sending.thread.pool.size Size of the thread pool. only applicable if 'broker.delivery.method' is 'pcrew'. (default is 4) 4 Configure WS-Messenger messagebox service ----------------------------------------- Configuration Description msgBox.jdbc.driver Database driver. msgBox.jdbc.url Url string used to connect the data base msgBox.usedatabase If set to 'true' use MySql database. If set to 'false' use inmemory implementation. (true,false) In this scenario database settings i.e-broker.jdbc.url is not required. Run Ws-messenger ----------------- 1. User has the option to run broker in several modes. Steps for each mode is given below. Run standalone version supplied with binary distribution --------------------------------------------------------- 1. Unzip binary distribution. 2. Change default configurations if needed. - configuration files is located at: /standalone-server/conf/msgBroker.properties /standalone-server/conf/msgBox.properties Run axis2 server by running the command: Linux - /standalone-server/bin/axis2server.sh Windows - /standalone-server/bin/axis2server.bat Run Ws-messenger using axis2 servlet ------------------------------------- (Tested on tomcat v 6.0.20 & axis2 v1.5.1) 1. Copy broker aar file to axis2 distribution accordingly. 2. Create database tables (Scripts can be found /bin/database_scripts) 3. Set configurations appropriately and copy configuration file ( named msgBroker.properties) to /webapps/axis2/WEB-INF/classes Note: a sample configuration file is located at: /standalone-server/conf/msgBroker.properties /standalone-server/conf/msgBox.properties 4. Start tomcat server. 5. For more information follow how to deploy Apache Axis2 as a Web Application. Run Ws-messenger using a external axis2 distribution ---------------------------------------------------- 1. Copy broker aar file to following location: /repository/services 2. Copy msgBroker.properties and msgBroker.properties file to /conf Configure msgBroker.properties with broker.start.delivery=false 3. Start axis2 server. 4. Run message delivery component separately. 5. Deploy messenger servlet on tomcat. Note: messenger servlet can be found at /messenger directory. 6. Set configurations appropriately. /webapps/messenger/WEB-INF/classes/msgBroker.properties /webapps/messenger/WEB-INF/classes/msgBox.properties Note: Point to the correct database you want to pick the messages and do the message delivery, and check the property axis2.repository to the correct location. 7. Start tomcat. Run Samples ----------- Sample programs are located at: /client-api/samples. Prerequisites: -------------- Apache Ant (tested on 1.7.1) Steps: 1. Run WS-messenger in any mode previously described. 2. Configure samples following the instructions given in README.txt (located in every sample directory) 3. Run following command: ant run Run WS-Notification Viewer -------------------------- 1. Extract binary distribution. 2. Go to following location: /gui/ 3. Execute script startGUI.sh System Requirements ------------------- 1. JDK - 1.6.x (1.6.0_24 onwards recommended for production) 2. Minimum memory - 1 GB 3. Processor - Pentium 800MHz or equivalent at minimum