// Assume that we verified the request in the resource layer:
poolManager.getRefresher(lazy).setUnitOfWork(unitOfWork).add(owner).run();
context.setResult("Pools refreshed for owner " + owner.getDisplayName());
}
catch (PersistenceException e) {
throw new RetryJobException("RefreshPoolsJob encountered a problem.", e);
}
catch (RuntimeException e) {
Throwable cause = e.getCause();
while (cause != null) {
if (SQLException.class.isAssignableFrom(cause.getClass())) {
log.warn("Caught a runtime exception wrapping an SQLException.");
throw new RetryJobException("RefreshPoolsJob encountered a problem.",
e);
}
cause = cause.getCause();
}