Metro Web Service Stack
Installing Metro to Web Containers
| Metro | Users Guide | Tools | JAX-WS Extensions | Samples | Metro Community |
Installing Metro
The metro directory contains two ant files, metro-on-glassfish.xml and metro-on-tomcat.xml. These two files are used to install the Metro binaries into the respective web containers. That procedure is explained next.
GlassFish
To install Metro into GlassFish, you must pass the name of the GlassFish top-level directory into ant. For this example that information is passed as an ant property value on the command line. To shutdown the instance of GlassFish into which you are installing Metro, change directories, invoke the install target, and then restart the GlassFish instance, please run the following sequence of commands:
asadmin stop-domain domain1 ant -Das.home=<GF_INSTALL_DIR> -f <METRO_INSTALL_DIR>/metro-on-glassfish.xml install asadmin start-domain domain1
This process copies the two Metro jar files into your GlassFish installation's lib directory and make the necessary classpath alterations in the domain configuration file: domain.xml. It will also update the classpath for the utility script files: wsimport and wsgen.
Tomcat
The installation process for Tomcat is very similar to that of GlassFish. Again, the top-level directory of the Tomcat installation is passed as an argument to the ant command. To shutdown Tomcat, change directories, invoke ant, and restart Tomcat by executing these commands:
catalina.sh stop ant -Dtomcat.home=<TOMCAT_INSTALL_DIR> -f <METRO_INSTALL_DIR>/metro-on-tomcat.xml install catalina.sh start
For Tomcat, the installation process copies the two Metro jar files into Tomcat's shared/lib directory. No Tomcat configuration files are modified.
Updating Metro
Once Metro has been installed to a web container, it can be updated with new versions of the Metro binaries. To update the jars, follow the same steps used for the initial install, shown above. For GlassFish, the second and subsequent installs will only update the Metro binaries; no configuration files will be modified.
Uninstalling Metro
To remove the Metro binaries and configuration changes from your web container, the steps are almost identical to the install process. The following steps will restore your web container to the state it was in before Metro installation.
GlassFish
asadmin stop-domain domain1 ant -Das.home=<GF_INSTALL_DIR> -f <METRO_INSTALL_DIR>/metro-on-glassfish.xml uninstall asadmin start-domain domain1
Tomcat
catalina.sh stop ant -Dtomcat.home=<TOMCAT_INSTALL_DIR> -f <METRO_INSTALL_DIR>/metro-on-tomcat.xml uninstall catalina.sh start
