Network Deployment (Distributed operating systems), v8.0 > Set up the application serving environment > Administer application servers > Manage shared libraries


Installed optional packages

The installed optional package uses tags to declare shared library .jar files in the manifest file applications, enabling appservers to identify classes in jar files not explicitly set in a class path.

When the application is installed, the classes represented by the shared libraries are loaded in the class loader of the application, making the classes available to the application.

When a Java EE application is installed on a server or cluster, dependency information is specified in its manifest file. The product reads the dependency information of the application (.ear file) to automatically associate the application with an installed optional package .jar file. The product adds the .jar files in associated optional packages to the application class path. Classes in the installed optional packages are then available to application classes.

Installed optional packages used by WAS are described in section 8.2 of the J2EE v1.4 spec

WAS v8 supports using the manifest file (manifest.mf) in shared library .jar files and application .ear files. The product does not support the J2SE Installed Optional Package semantics used in the J2SE specification, which primarily serve the applet environment. WAS v8 ignores applet-specific tags within manifest files.


Sample manifest.mf file

A sample manifest file follows for an application app1.ear that refers to a single shared library file util.jar:

app1.ear:
    META-INF/application.xml
    ejb1.jar:
         META-INF/MANIFEST.MF:
             Extension-List: util
             util-Extension-Name: com/example/util
             util-Specification-Version: 1.4
         META-INF/ejb-jar.xml

util.jar:
    META-INF/MANIFEST.MF:
        Extension-Name: com/example/util
        Specification-Title: example.com's util package
        Specification-Version: 1.4
        Specification-Vendor: example.com
        Implementation-Version: build96

The syntax of a manifest entry depends on whether the entry applies to a member with a defining role (the shared library) or a member with a referencing role (a Java EE application or a module within a Java EE application).


Manifest entry tagging

Extension-List Required. Variable syntax. Within the context of the referencing role (application's manifest), Space delimited list that identifies and constructs unique Extension-Name, Extension-Specification tags for each element in the list. Within the context of the defining role (shared library), this tag is not valid.
Extension-Name Required. Provides a name and links the defining and referencing members. The syntax of the element within the referencing role is to prefix the element with the <ListElement> string. For each element in the Extension-List, there is a corresponding <ListElement>-Extension-Name tag. The defining string literal value for this tag (in the above sample com/example/util1) is used to match (in an equality test) the corresponding tags between the defining and referencing roles.
Specification-Version Required. Identifies the specification version and links the defining and referencing members.
Implementation-Version Optional. Identifies the implementation version and links the defining and referencing members.

Further information on these tags is in the .jar file specification


Related

Class loaders
Use installed optional packages
Manage shared libraries

+

Search Tips   |   Advanced Search