10.4. Client, User, and Server Usage and Implementation Details
These features hide the implementation details, making the usage less error-prone, while at the same time streamlining the development process.
The goal is for clients to only see a Deployment API, while developers see a DeploymentUnit, and server implementation details are contained in a DeploymentContext. Only the necessary information is exposed to a particular level of deployment's life cycle.
Components have already been mentioned as part of deployers' hierarchy handling. While top level deployment and sub-deployments are a natural representation of the deployment's structure hierarchy, components are a new VDF concept. The idea of components is that they have a 1:1 mapping with the
ControllerContexts
inside the Microcontainer. See Why Components Map 1:1 with the ControllerContexts
for the reasons behind this assertion.
Why Components Map 1:1 with the ControllerContexts
- Naming
- The component unit's name is the same as the
ControllerContext
's name. - get*Scope() and get*MetaData()
- return the same MDR context that will be used by the Microcontainer for that instance.
- IncompleteDeploymentException (IDE)
- In order for the IDE to print out what dependencies are missing for a deployment, it needs to know the ControllerContext names. It discovers the name by collecting the Component DeploymentUnit's names in Component Deployers that specify them, such as
BeanMetaDataDeployer
or thesetUseUnitName()
method inAbstractRealDeployer
.