commandContext
.getDeploymentManager()
.deleteDeployment(deploymentId, cascade, skipCustomListeners);
DeleteDeploymentFailListener listener = new DeleteDeploymentFailListener(deploymentId);
try {
new UnregisterDeploymentCmd(Collections.singleton(deploymentId)).execute(commandContext);
} finally {
try {
commandContext.getTransactionContext().addTransactionListener(TransactionState.ROLLED_BACK, listener);
} catch (Exception e) {
log.log(Level.FINE, "Could not register transaction synchronization. Probably the TX has already been rolled back by application code.", e);
listener.execute(commandContext);
}
}
return null;