The DeploymentUnit deprecates access to the DeploymentContext
/** * Get the deployment contxt * * @return the deployment context */ @Deprecated // If you are using this, then think about it. DeploymentContext getDeploymentContext();
You have to do this through the deprecated DeploymentContext currently. There should just a getParent accessor on the DeploymentUnit.