A part content datatype is an XML document that defines an information block, an object deployment strategy, and a classloader chain. The information block declares a title and a description. The deployment strategy is defined as any element extending the StrategyType schema definition (the most typical being the Metro component strategy). The third element in a part definition is a deployment classpath which is composed of a public, protected, and private classloader definitions that are used to establish a classloader chain relative to the current context classloader.
dpml:part
A part defines a general deployment unit.
The part specification contains a general <info> block, a deployment <strategy> specification and a <classpath> definition.
info | The info definition is used to associate a title and human readable description. |
strategy | Any XML element derived from the StrategyType. The schema element defines the deployment strategy. A part strategy handler is resolved by the part content handler. If the qualfied element name is recognized an internal handler is assigned, otherwise value of the handler attribute is used to resolve a uri identifying a strategy plugin. The Metro system provides two bundled strategy element handlers - <component> and <resource>. The <resource> handler provides support for Antlib loading, and the <component> strategy details the standard Metro component deployment model. |
classpath | Definition of the classpath for the part. The classpath contains the declaration of public, protected and private jar files referenced via uris that collectively enable the construction of a cloassloader chain. |
Example part definition:
<?xml version="1.0"?> <part xmlns="dpml:part"> <info/> <component xmlns="dpml:metro" class="org.acme.Widget"/> <classpath> <private> <uri>artifact:jar:acme/widget/acme-widget#1.2.3</uri> </private> </classpath> </part>