public class TransactionInterceptor extends AbstractInterceptor {
public <T> T execute(Command<T> command) {
Persister<StatefulSession> persister =
new MemoryPersister<StatefulSession>(new StatefulSessionSnapshotter(getSession()));
persister.save();
Transaction transaction = persister.getTransaction();
try {
transaction.start();
T result = super.executeNext(command);