In tests we find our `#inSession` and `#inTransaction` methods very
useful. Which got me thinking that maybe we should support these on
SessionFactory directly:
public interface SessionFactory ... {
...
void inSession(Consumer<Session> action);
void inTransaction(Consumer<Session> action);
void inTransaction(Session session, Consumer<Session> action);
}
and maybe even:
public interface Session ... {
void inTransaction(Consumer<Session> action);
}
Objections?