Java Reference
In-Depth Information
META-INF/
SUBSYSTEM.
MF
application.xml
Core bundle 2
All libraries
All libraries
EAR
ESA
All libraries
All libraries
All libraries
All core modules
Core Bundle 1
All libraries
Core Bundle 1
Core bundle 1
Core bundle 3
Referenced but not
included in the ESA
archive
Figure 4.2 An EAR and an ESA representing the same application. The EAR must include all its com-
ponent JARs and all the libraries it depends on. The ESA, on the other hand, need only include its
component bundles, and even those may be loaded by reference from a bundle repository.
4.2.2
Subsystem metadata
The metadata in an ESA is similar to that of an EAR , but specified differently. The first
key difference is that ESA metadata isn't stored as XML , as in an EAR , but using the Java
manifest syntax in a file called META-INF / SUBSYSTEM.MF . This file defines the name and
version of the application, which default to the name of the archive file and 0.0.0 , and
a human-readable description. Importantly, the subsystem manifest also defines the
bundles that make up the core content of the subsystem, and any services that should be
exposed or consumed by the application. For example:
Subsystem-ManifestVersion: 1
Subsystem-Name: The Fancy Foods online superstore
Subsystem-SymbolicName: fancyfoods.application
Subsystem-Version: 1.0
Subsystem-Content:
fancyfoods.api; version="[1.0.0,2.0.0)",
fancyfoods.business; version="[1.0.0,2.0.0)",
fancyfoods.web; version="[1.0.0,2.0.0)",
fancyfoods.department.chocolate; version="[1.0.0,2.0.0)",
fancyfoods.department.cheese; version="[1.0.0,2.0.0)",
fancyfoods.persistence; version="[1.0.0,2.0.0)",
SUBSYSTEM CONTENT
The core content of an application isn't an idea that exists in Java EE or standard
OSG i, and so it's something many people find slightly unnerving. The concept is sim-
ple: the core content represents the bundles that provide the application's function,
rather than common libraries, logging utilities, and so on. For most people, the core
content of the application is exactly what they'd describe if asked what was inside their
Search WWH ::




Custom Search