Loading...

h2-database@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

FILE_LOCK=SERIALIZED versus AUTO_SERVER=TRUE LRichard Wed Jan 11 11:00:22 2012

Since we're 
experiencing<https://groups.google.com/d/topic/h2-database/unohFtz83cg/discussion>several
 
problems<https://groups.google.com/d/topic/h2-database/rsusQJ1IpGk/discussion>with
 the SERIALIZED lock mode, we look at alternatives and the AUTO_SERVER 
mode strikes back.
The* *nice 
explanation<https://groups.google.com/d/topic/h2-database/SVY-DnaMNBQ/discussion>from
 Christian shows that the AUTO_SERVER mode should meet our needs.
However, we are concerned by the following assertion from the Features 
page<http://www.h2database.com/html/features.html?highlight=AUTO_SERVER&search=auto_server#auto_mixed_mode>(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

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/WdqQ3gXab3AJ.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.