public static void atomic(final Runnable runnable) { getTransactionManager().withTransaction(new CallableWithoutException<Void>() { @Override public Void call() { runnable.run(); return null; } }); }
@Override public final <V> V perform(final Callable<V> method) throws Exception { if (logger.isDebugEnabled()) { logger.debug("Handling @Atomic call from " + Thread.currentThread().getStackTrace()[2]); } TransactionManager tm = FenixFramework.getTransactionManager(); return tm.withTransaction(method, this.atomic); } }
public static <T> T atomic(Callable<T> callable) throws Exception { return getTransactionManager().withTransaction(callable); }
private static void initializeInstallationData() { getTransactionManager().withTransaction(new CallableWithoutException<Void>() { @Override public Void call() { InstallationData data = getDomainRoot().getInstallationData(); if (data == null) { data = new InstallationData(getDomainRoot()); } // In the future, automatic upgrade hooks may be invoked here data.updateModuleData(getProject()); return null; } }); }