Chapter 15. Bean Deployment - deploying beans

Table of Contents

Design Overview
Current StructureDeployers JBoss5StructureDeployerClasses
Current Deployers
Deployer Helper/Base Classes JBoss5BaseDeployerClasses
AbstractDeployer
<authorblurb>

Scott Stark

</authorblurb>

The bean deployer provides routines for deploying beans. TODO: translate/expand the wiki into this doc. JBoss5DeploymentFramework

Design Overview

The JBoss5 virtual deployemnt framework takes the aspect oriented design of many of the earlier JBoss containers and applies it to the deployment layer. It is also based on the POJO microntainer rather than JMX as in previous releases. For an overview of the classes as a UML diagram see JBoss5DeploymentFrameworkClasses. The key classes in that diagram are:

MainDeployer

this interface defines the contract for the MainDeployer. The MainDeployer handles parsing of deployment archives into Deployment instances and deployment of those instances into the microcontainer. This in is an update of the JMX based MainDeployer from earlier versions to a one based on the Microcontainer, JBoss5VirtualFileSystem, and Virtual Deployment Framework(VDF). Deployers are registered with the MainDeployer as an ordered list of deployers. MainDeployer contains two sets of deployers:

  • StructureDeployers : used to analyze the structure of a DeploymentContext when addDeploymentContext(DeploymentContext) is invoked. For each StructureDeployer the determineStructure(DeploymentContext) method is invoked to analyze the deployment. A StructureDeployer? returns true to indicate that the deployment was recognized and no further StructureDeployer should analyze the DeploymentContext.

  • Deployers used to translate a DeploymentUnit into a runtime kernel beans when the MainDeployer.process is run. The Deployer methods are:

    • boolean isRelevant() :does the deployer want to process the unit

    • prepareDeploy() : take the new deployment to the ready stage

    • prepareUndeploy() : get ready to undeploy

    • handoff(new, old) : handover control from new to old

    • commitDeploy() : new deployment is now in control

    • commitUndeploy() : old deployment is out of here

    • getRelativeOrder() : specify the relative order of the deployer in a chain

DeploymentUnit

a representation of a runtime unit of work a Deployer operates on.

DeploymentContext

a representation of structural aspects of deployable content.

ManagedObject

a representation of the manageable properties for a deployment.

VFS

the api for representing the read-only file system of the deployment.

VirtualFile

the api for a file in the deployment.

DomainClassLoader

A generalization of the legacy JMX based unified class loading model. This is still in progress. The org.jboss.vfs.classloding.