JBoss.org Community Documentation

22.2. Accessing a deployment

The deployment framework uses DeploymentContext objects to access the internal details of a deployment during processing. However, if you wish to access a deployment yourself then you should use a wrapper called DeploymentUnit .

This prevents you from getting or setting the deployment state, changing the deployment classloader if it already exists, changing any parent/child relationships between nested deployments and accessing any exceptions that have occurred during deployment. You are also prevented from calling the visit() method that allows you to visit all of the contexts in the hierarchy or the cleanup() method that removes deployment metadata from the metadata repository.