1.3 dm Server concepts

Several dm Server concepts are essential for developing an application.

PAR files

dm Server provides a way of grouping together a collection of OSGi bundles which comprise a single application. These bundles are placed in a JAR file with extension “.par”. This is called a PAR file.

All the bundles in a PAR file are resolved together and so mutual dependencies are permitted.

At runtime a PAR file provides a scope in the sense that bundles inside the PAR file may depend on packages and services outside the PAR file, but bundles outside the PAR file may not depend on packages and services provided by the PAR file.

Deployment

PAR files or individual bundles are deployed into dm Server by dropping them into a “pickup” directory or using the Administration Console web application provided with dm Server. During deployment, the bundle or bundles are installed into OSGi, resolved together, and then started together.

Personalities

dm Server supports multiple application programming models known as personalities. Each bundle of an application has a personality. For example, a bundle providing a servlet has either the web or the war personality. Bundles which provide packages and services using the OSGi and Spring DM programming models have the bundle personality.

When a bundle is deployed into dm Server, personality-specific transformations are applied to the bundle’s contents, including its manifest, and the bundle is made available for use in a personality-specific way. For example, a bundle with the web personality has some package imports added to its manifest and its servlet is automatically made available for dispatching from HTTP requests.

Module types

Web ARchive (.war) files are identified as having the war personality by the file extension. Bundles with a .jar extension could have any personality, so dm Server enables the personality to be specified using the Module-Type manifest header, for example:

Module-Type: web

The default Module-Type is bundle.