Note, that not all databases support select ... for update, if the database (dialect) does not support it,
a exception will be thrown (see Dialect.supportsForUpdate() .

Also note, that when using select for update locking, when the database is created, the commit and write
locks will be created and the select for update will be performed on them. If one wishes to switch to
PhantomReadLock, they must be manually deleted.

The lock is released when the transaction is committed, and not when the release method is called.