public SystemPropertyTempSetter runPreTestActionsInEjbContext(TestRunnerAnnotationHandler handler) throws Exception {
SystemPropertyTempSetter tempSetter = handler.initContainerTestEnv();
try (TxHandler txHandler = new TxHandler(this.tx, true)) {
// Execute post test annotations (dataset exporting, data verifying)
handler.executePreTestAnnotations(new JuEmUtil(this.em));
txHandler.commit(); // Commit after data verifying / exporting
} catch (Exception ex) {
// Reset properties in case of an exception
tempSetter.close();
throw ex;