JBoss Community

Re: Deployer chain cleanup

created by Alexey Loubyansky in JBoss AS7 Development - View the full discussion

Adding a cleanup method to DUP is probably the most natural thing to do. The reason I didn't do it was I didn't want to go modify each DUP implementation.

Also I had an idea of doing something like this


// this is the interface I'm currently using
public interface DeploymentRollbackAction {   void rollback(DeploymentUnitContext ctx);}

public abstract class DeploymentUnitProcessorWithRollback implements DeploymentUnitProcessor, DeploymentRollbackAction {    public final void processDeployment(DeploymentUnitContext context) throws DeploymentUnitProcessingException {        context.pushRollback(this);        doProcess(context);    }    protected abstract void doProcess(DeploymentUnitContext context) throws DeploymentUnitProcessingException;}



So then DUP that may need cleaning up can extend this processor.

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community