Chapter 13. Deploying OGSA-DAI - additional options

13.1. Deploying OGSA-DAI Axis - additional options
13.1.1. Build an OGSA-DAI Axis WAR file
13.1.2. Deploy an OGSA-DAI Axis WAR file
13.1.3. Deploy OGSA-DAI Axis services
13.1.4. Deploy an OGSA-DAI Axis WAR file and services
13.1.5. Build and deploy an OGSA-DAI Axis WAR file and services
13.1.6. Summary of OGSA-DAI Axis deployment approaches
13.1.7. Useful information

This documents the complete range of options available when deploying OGSA-DAI.

13.1. Deploying OGSA-DAI Axis - additional options

13.1.1. Build an OGSA-DAI Axis WAR file

To build a WAR file run:

$ ant buildWAR \
  [-Ddai.war=LOCATION-OF-BUILT-WAR] \ Default: build/dai.war
  [-Ddai.host=HOST]                 \ Default: localhost
  [-Ddai.port=PORT]                   Default: 8080
  • When building a WAR file the host name, port and webapp given as arguments must match the host name, port and webapp as used by the target Tomcat upon which the WAR file will be deployed.

13.1.2. Deploy an OGSA-DAI Axis WAR file

To deploy a WAR file onto Tomcat run:

$ ant deployWAR -Dtomcat.dir=/PATH/TO/TOMCAT \
  [-Ddai.war=LOCATION-OF-BUILT-WAR] Default: build/dai.war

The WAR file will be deployed into Tomcat. The WAR file prefix (e.g. dai determines the name of the webapp used by Tomcat). This should be borne in mind if renaming WAR files

[Caution]Caution
If you rename a WAR file then references to the webapp within files in the WAR file, e.g. schema files, will become out of synch, so best not to bother!

13.1.3. Deploy OGSA-DAI Axis services

To deploy OGSA-DAI Axis services, once an OGSA-DAI Axis WAR file has been deployed and Tomcat is running, run:


$ ant deployServices -Dtomcat.dir=/PATH/TO/TOMCAT \
  [-Ddai.host=HOST] \                 Default: localhost
  [-Ddai.port=PORT] \                 Default: 8080
  [-Ddai.webapp=WEBAPP] \             Default: dai
  [-Ddai.dres.service.name=DRES-SERVICE] \ Default: DataRequestExecutionService
  [-Ddai.dris.service.name=DRIS-SERVICE] \ Default: DataResourceInformationService
  [-Ddai.dsos.service.name=DSOS-SERVICE-NAME] \ Default: DataSourceService
  [-Ddai.dsis.service.name=DSIS-SERVICE-NAME] \ Default: DataSinkService
  [-Ddai.sms.service.name-SMS-SERVICE-NAME]   \ Default: SessionManagementService
  [-Ddai.rms.service.name=RMS-SERVICE-NAME]     Default: RequestManagementService
  • The host name, port and webapp given as arguments must match the host name, port and webapp as used by the target Tomcat upon which the services are to be deployed.
  • Choosing a service name SERVICE-NAME results, after deployment, in a service with URL:
    http://HOST:PORT/WEBAPP/services/SERVICE-NAME
    

13.1.4. Deploy an OGSA-DAI Axis WAR file and services

To deploy a WAR file and services onto Tomcat then, provided Tomcat is running, run:

$ ant deployWARAndServices

This command just invokes the deployWAR and deployServices commands so the command-line options are as for these two commands.

13.1.5. Build and deploy an OGSA-DAI Axis WAR file and services

To build and deploy a WAR file and services onto Tomcat, provided Tomcat is running, run:


$ ant buildDeployWARAndServices

This command just invokes the buildWAR and deployWARAndServices commands so the command-line options are as for these two commands.

13.1.6. Summary of OGSA-DAI Axis deployment approaches

To summarize, there are three possible deployment approaches:

  1. Startup Tomcat then deploy the OGSA-DAI WAR file and services.
  2. Deploy the OGSA-DAI WAR file, startup Tomcat then deploy the OGSA-DAI services.
  3. Startup Tomcat, deploy the OGSA-DAI WAR file, then deploy the OGSA-DAI services.

13.1.7. Useful information

When running, Tomcat auto-unpacks WAR files.

  • See: http://tomcat.apache.org/tomcat-5.0-doc/deployer-howto.html.
  • Assumes Tomcat deployOnStartup setting is true.
  • Assumes Tomcat unpackWAR setting is true (default if not specified).
  • If WAR is newer than unpacked WAR then new one is deployed.
  • If a webapp's web.xml file is updated or there is a newer WAR then the WAR is redeployed.

For Tomcat 4 - you need to use the Tomcat Manager to deploy/undeploy WARs when Tomcat is running.

The Tomcat Manager username and password can be set in /PATH/TO/TOMCAT/conf/tomcat-users.xml. For example:

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <user name="mike" password="zonk" roles="standard, manager" />
</tomcat-users>

The Tomcat Manager is accessed via a running Tomcat instance and then accessing the Tomcat front page using an internet browser or by using Tomcat ANT commands - the Tomcat user doc contsins information on this.

Placing a META-INF/Context.xml in a WAR file allows access to and changes to the /PATH/TO/TOMCAT/conf/server.xml file. This is required when making use of Tomcat JNDI for example.

Useful links: