Search in sources :

Example 1 with DeploymentUnitPhaseBuilder

use of org.jboss.as.server.deployment.DeploymentUnitPhaseBuilder in project wildfly by wildfly.

the class SingletonDeploymentProcessor method deploy.

@Override
public void deploy(DeploymentPhaseContext context) throws DeploymentUnitProcessingException {
    SingletonPolicy policy = context.getAttachment(POLICY_KEY);
    if (policy != null) {
        DeploymentUnit parent = context.getDeploymentUnit().getParent();
        DeploymentUnitPhaseBuilder builder = (parent == null) ? new SingletonDeploymentUnitPhaseBuilder(policy) : new SingletonSubDeploymentUnitPhaseBuilder(parent, context.getPhase().next());
        context.putAttachment(Attachments.DEPLOYMENT_UNIT_PHASE_BUILDER, builder);
    }
}
Also used : SingletonPolicy(org.wildfly.clustering.singleton.SingletonPolicy) DeploymentUnitPhaseBuilder(org.jboss.as.server.deployment.DeploymentUnitPhaseBuilder) DeploymentUnit(org.jboss.as.server.deployment.DeploymentUnit)

Aggregations

DeploymentUnit (org.jboss.as.server.deployment.DeploymentUnit)1 DeploymentUnitPhaseBuilder (org.jboss.as.server.deployment.DeploymentUnitPhaseBuilder)1 SingletonPolicy (org.wildfly.clustering.singleton.SingletonPolicy)1