}
public void releaseRollback( String releaseId, int projectId )
throws ContinuumReleaseException
{
ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();
releaseManager.rollback( releaseId, buildAgentConfigurationService.getWorkingDirectory( projectId ).getPath(),
listener );
//recurse until rollback is finished
while ( listener.getState() != ContinuumReleaseManagerListener.FINISHED )
{
try
{
Thread.sleep( 1000 );
}
catch ( InterruptedException e )
{
//do nothing
}
}
releaseManager.getPreparedReleases().remove( releaseId );
if ( StringUtils.isNotBlank( listener.getError() ) )
{
throw new ContinuumReleaseException( "Failed to rollback release: " + listener.getError() );
}
}