Skip to content

Commit

Permalink
missed one when removing JPA things.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Conway committed Sep 18, 2012
1 parent 4b90a4a commit b081f2e
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions app/updaters/DeploymentPlanGeneratorHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,8 @@ public class DeploymentPlanGeneratorHook implements UpdaterHook {

@Override
public void update(Set<MetroArea> areas) {
JPA.em().getTransaction().begin();
try {
for (MetroArea area : areas) {
area.rebuild();
}
} catch (Exception e) {
Logger.error("Exception making graph rebuild request");
e.printStackTrace();
if (JPA.em().getTransaction().isActive())
JPA.em().getTransaction().rollback();
} finally {
if (JPA.em().getTransaction().isActive()) {
if (JPA.em().getTransaction().getRollbackOnly())
JPA.em().getTransaction().rollback();
else
JPA.em().getTransaction().commit();
}
}
for (MetroArea area : areas) {
area.rebuild();
}
}
}

0 comments on commit b081f2e

Please sign in to comment.