Re: [Beankeeper-discussion] Are persistent user transactions possible with BeanKeeper?
Brought to you by:
demonsystem
From: Brautigam R. <de...@ne...> - 2009-09-09 15:25:56
|
Daniel Fischer írta: > Hi, Hi Dan, > having reviewed quite a number of Java persistence solutions I think BeanKeeper > is by far the easiest and cleanest (but yet very powerful) solution. I was > especially taken with the full versioning concept which would be really helpful > in my application. Glad you like it. > But after reading the tutorial and the docs I'm still not sure: Are > persistent user transactions possible with BeanKeeper? I would like to make even > non-completed transactions to survive an application restart, s.t. users can > resume working with this transactions (after e.g. a server restart). First off, this is not possible. Transactions either complete entirely, or rollback everything, it has to be considered atomic to work. Although versioning might make it possible to retain some undefined state of a transaction (depending on where it ended), BeanKeeper still uses a database transaction, which is atomic in the above sense. This means if a transaction terminates before commit, all the updates will be lost. You may be looking for a persistent session store. Some web applications have these build it to guarantee that all the objects will be available after restart, or after transferring the load to a backup server or something. These work usually by just serializing the session object to some file periodically, so the work state is preserved. > Yours, > Daniel HTH, Robert. |