Context Service
 
Community Grids Lab (CGL), Pervasive Technology Labs (PTL),
Indiana University, Bloomington (IUB).
Context Service Links
Home
Publications
Downloads
Resources
JavaDoc API
Demos
Change Log
FTHPIS   Links
ExtendedUDDI
OpenGrids
Community Grids Lab
Publications
Presentations
CGL Activities
CGL Home  |  PTL Home
Download & Installation Instructions for CONTEXT AND CONTEXT RESPOND HANDLER SERVICES

1 - Installing Stand Alone Context Service (supported with Notification Feature)

Requirements

To install 'Context Manager' make sure you have:
            Apache Tomcat , NaradaBrokering and Maven 1.0.2 installed
         CATALINA_HOME and JAVA_HOME environment variables properly set

Installing Context Manager

  • Download ws_context.zip
  • Extract the archive.  (e.g. /home/<user name>/unzip ws_context.zip) This will create a directory called "ws_context"
  • Update "tomcat.home" variable to point your tomcat installation (e.g. tomcat.home=${user.home}/tomcat/jakarta-tomcat-5.0.28) in the "project.properties" located under "ws_context" directory.
  • Update Narada Brokering (NB) parameters to point to your NB broker in the "wsctx_bootstrap.properties" file located under "ws_context/conf/" directory.
  • Run "maven set-properties" in the "ws_context" directory.
  • Run "maven war:war -Dmaven.test.skip=true" in the "ws_context" directory.
  • Run "maven deploy-context-service". (This will also create a context space ".context" which will then be used by Context Service)
  • Restart your Jakarta Tomcat installation.
  • This will deploy the ContextManagerPortType service into your Jakarta Tomcat installation as a web application (<jakarta-tomcat-home>/webapps/ws_context)
  • To see a list of deployed web services go to
    http://<your-server-name>:<portnum>/ws_context/servlet/AxisServlet
  • In order to test whether Context Service is running OK, please run "maven test" under "ws_context" directory

2 - Installing Stand Alone Context Response Handler Service

Requirements

To install 'Context Respond Handler' make sure you have:
            Apache Tomcat, NaradaBrokering and Maven 1.0.2 installed
         CATALINA_HOME and JAVA_HOME environment variables properly set

Installing Context Response Handler Service

  • Download ws_context_respondent.zip
  • Extract the archive.  (e.g. /home/<user name>/unzip ws_context_respondent.zip) This will create a directory called "ws_context_respondent"
  • Update "tomcat.home" variable to point your tomcat installation (e.g. tomcat.home=${user.home}/tomcat/jakarta-tomcat-5.0.28) in the "project.properties" located under "ws_context_respondent" directory.
  • Update <host_name> and <port_number> in both "wsctxWSDL" and "wsctxRespondWSDL" variables, and NB parameters in the "wsctx_bootstrap.properties" file located at "ws_context_respondent/conf/". (Please use I.P. address of your machine instead of localhost.)
  • Run "maven set-properties" in the "ws_context_respondent" directory.
  • Run "maven war:war -Dmaven.test.skip=true" in the "ws_context_respondent" directory.
  • Run "maven deploy-context-respondent-service" in the "ws_context_respondent" directory.
  • Restart your Jakarta Tomcat installation.
  • This will deploy the ContextResponseHandlerPortType service into your Jakarta Tomcat installation as a web application (<jakarta-tomcat-home>/webapps/ws_context_respondent)
  • To see a list of deployed web services go to
    http://<your-server-name>:<portnum>/ws_context_respondent/servlet/AxisServlet
  • In order to test whether Context Response Handler Service is running OK, please run "maven test" under "ws_context_respondent" directory

NOTE: Please note that, your application will need to deploy and run this service, Context Response Handler, in order to interact with Context Service. Also, you should know that, implementation of Context Response Handler may also be up to developers. I introduce my implementation, so that users can simply use the Context Service as if it is synchronous Service.

3 - JUnit Test Clients for both Context and Context Response Handler Services

  • Please find the JUnit Test Clients under "../src/tests/" directory for both installation packages
  • In order to test whether Context Service is running OK, please run "maven test" under "ws_context" directory
  • In order to test whether Context Response Handler Service is running OK, please run "maven test" under "ws_context_respondent" directory

4 - Example Clients for Context Service

  • Please find the example Clients to Context Service under "ws_context_respondent/src/java" directory structure
  • There are two example Clients a) TestSetContext.java b) TestGetContext.java
  • In order to test both Context and Context Response Handler Services are running OK, please run "maven TestSetContext" under "ws_context_respondent" directory (By doing this, you will be setting a context (metadata) into Context Service)
  • Then you can run "maven TestGetContext" under "ws_context_respondent" directory. (By doing this, you will be retrieving the context that you set earlier from Context Service. See the output.)
  • In order to test Notification feature, you MUST run a NaradaBroker node and set the properties as indicated above. If you have already done so, please run "maven EventListener" "ws_context_respondent" directory in a console/terminal. (By doing this, you will be starting a NB Subscriber thread which will wait on updates on the context that you are interested in.)
  • Then you can run "maven TestSetContext" under "ws_context_respondent" directory in a separate console for the same context. You can see the notification output from EventListener console.
  • You can find these clients at "project.zip". In this archive, you will also find required library that you might want to include your project.
  • If you are a JBuilder IDE user, you could simply open this project as JBuilder project.
  • If you are a Eclipse IDE user, you could open clients at "cclient.zip" as Eclipse project.
  • Please note: Context Response Handler Service MUST run on the same machine where your application (that interacts with Context Service) resides.

Note: Maven Repository Problems

  • If you experience problems downloading jars with maven, you can download the required maven repositories below, in  .zip format. Unpack either one in your home directory to create a .maven subdirectory. dot_maven.zip

© Mehmet S. Aktas / Community Grids Lab, Indiana University