code: public void createDeploymentContext(@Observes EventContext<DeploymentEvent> context) {
          DeploymentContext deploymentContext = this.deploymentContext.get();
          try {
              DeploymentEvent event = context.getEvent();
              deploymentContext.activate(event.getDeployment());
  
              context.proceed();
          } finally {
              deploymentContext.deactivate();
          }
      }
docs: /*
  Deployment Level
  
  Activate DeploymentContext on all Deployment Events