for (Object event : Notifications.getLifecycleEvents(notification)) {
if (event == Notifications.LifecycleEvent.BEGIN_TRANSACTION) {
try {
loader.beginTransaction();
} catch (SolrServerException e) {
throw new MorphlineRuntimeException(e);
} catch (IOException e) {
throw new MorphlineRuntimeException(e);
}
} else if (event == Notifications.LifecycleEvent.COMMIT_TRANSACTION) {
try {
loader.commitTransaction();
} catch (SolrServerException e) {
throw new MorphlineRuntimeException(e);
} catch (IOException e) {
throw new MorphlineRuntimeException(e);
}
}
else if (event == Notifications.LifecycleEvent.ROLLBACK_TRANSACTION) {
try {
loader.rollbackTransaction();
} catch (SolrServerException e) {
throw new MorphlineRuntimeException(e);
} catch (IOException e) {
throw new MorphlineRuntimeException(e);
}
}
else if (event == Notifications.LifecycleEvent.SHUTDOWN) {
try {
loader.shutdown();
} catch (SolrServerException e) {
throw new MorphlineRuntimeException(e);
} catch (IOException e) {
throw new MorphlineRuntimeException(e);
}
}
}
super.doNotify(notification);
}