The Virgo Tomcat Server supports two OSGi-oriented ways of packaging applications: the PAR format and application bundles (including web bundles). The VTS also supports three distinct WAR deployment and packaging formats: standard Java EE WAR, Shared Libraries WAR, Shared Services WAR.
The VTS also supports plans as a way to describe an application. This method is similar to a PAR in that it encapsulates all the artifacts of an application as a single unit, but differs in that a plan simply lists the bundles in an XML file rather than packaging all the bundles in a single JAR file. The use of plans offers additional benefits to using PARs; for this reason, we recommend their use. For details, see Creating Plans.
An OSGi application is packaged as a JAR file, with extension
.par. A PAR artifact offers several benefits:
A PAR includes one or more application bundles and its manifest specifies the following manifest headers:
Table 4.1. PAR file headers
|Identifier for the application which, in combination with Application-Version, uniquely identifies an application|
|Human readable name of the application|
|Version of the application|
|Short description of the application|
The following code shows an example MANIFEST.MF in a PAR file:
Application-SymbolicName: com.example.shop Application-Version: 1.0 Application-Name: Online Shop Application-Description: Example.com’s Online Shopping Application
Virgo Tomcat Server supports Web Application Bundles that are compliant with the OSGi Web Applications specification.
The defining property of a Bundle that makes it a Web Application Bundle is a manifest header,
This defines the context path the web application will be registered under.