Ales Justin wrote:
But you can simply "fix" this generic behavior by impling this logic into your custom visitor.
That would effectively mean, that *every* implementation of the org.jboss.deployers.spi.deployer.helpers.DeploymentVisitor interface, has to have the following code in their deploy:
deploy(DeploymentUnit unit, T deployment) throws DeploymentException;
{
try
{
...
}
catch (Throwable t)
{
this.undeploy(unit, deployment);
...
}
}
undeploy(DeploymentUnit unit, T deployment)
{
...
}