Commiting a read only transaction

In OGM, if I open a read only transaction:

Transaction tx = session.beginTransaction(Transaction.Type.READ_ONLY);

Should I commit it before closing?

1 Like

You don't need to, but it can't hurt either. It makes it more explicit to clean up resources.