}
private void removeLimitingDependencyIfNeeded(Dependency d) {
if (!d.isDependencyBetweenLimitedAllocatedTasks()
&& (d.hasLimitedQueueDependencyAssociated())) {
LimitingResourceQueueDependency queueDependency = d
.getQueueDependency();
queueDependency.getHasAsOrigin().remove(queueDependency);
queueDependency.getHasAsDestiny().remove(queueDependency);
d.setQueueDependency(null);
try {
limitingResourceQueueDependencyDAO.remove(queueDependency
.getId());
} catch (InstanceNotFoundException e) {
e.printStackTrace();
throw new RuntimeException("Trying to delete instance "
+ " does not exist");