Sorry, but that is not an answer to my question.
When accessing the database without an active transaction (so read-only access), somewhere somebody creates a Transaction in the background even if the jdbc connection is not in auto-commit mode. In my case there seems a long-running transaction which is never commited responsible for loading entities that are accessed when no explicit transaction was going on.
My question was about who is responsible for this, and wether the behaviour could be changed.
Code:
Session session = factory.openSession();
//Under which transaction is this query executed?
session.get(SomeEntity.class, 2);
Thanks, Clemens