Since we're
experiencing several
problems with the SERIALIZED lock mode, we look at alternatives and the AUTO_SERVER mode strikes back.
The
nice
explanation from Christian shows that the AUTO_SERVER mode should meet our needs.
However, we are concerned by the following assertion from the
Features page (that's why we initially excluded the AUTO_SERVER mode) :
If the first connection is closed (the connection that started the server), open transactions of other connections will be rolled back (this may not be a problem if you don't disable autocommit).
Our application uses transactions. These transactions are however not opened for a long time (hibernate generally caches statements of one transaction to send them all at a time). How is the rollback handled when the server stops ? Is there a way to tell the server not to stop until all opened transactions are closed ? In this closing phase (that should be brief), the server would not accept any new transaction.
If there is no way to prevent a rollback to happen in the middle of a transaction without the client being aware of it, I'm afraid we won't be able to use the AUTO_SERVER mode.
If the client whose transaction has been rolled back is told it (with a JDBC exception on the next statement in the transaction or on the commit), it should be OK. Is it the case ?
We will test this use case as soon as we can but any clue will be welcome.
Laurent