[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Long-running transactions in Ozone?




> > > I am using ozone in a Servlet environment as the backend to a dynamic website.
> > > It would be quite useful to be able to start an explicit transaction at the
> > > begining of a "wizard' (multi-page form with Back, Next, Finish, and Cancel
> > > buttons) and keep it alive in the user's session between requests.  Can anyone
> > > give me some pointers on using explicit transactions in ozone?  The example
> > > shown in /samples look pretty straightforward.  What are some pitfalls to look
> > > out for?
> >
> > I don't know about pitfalls in ozone itself. The question is if it
> > is a good idea to keep a transaction open over several pages since
> > AFAIK ozone has pessimistic locking, i.e. an update method locks
> > all used objects until the transaction is finished. So, a user can
> > lock the whole system until he finished the forms and all other
> > users have to wait.
> >
> 
> Ugh, that I didn't know.  Well, I'll just have to do it myself (sort of).  Do you
> know if the lock still allows reads?

I'm not quite sure if a write-lock prevents reading but I think
so. So, you may have multiple readers (otherwise ozone wouldn't
be a multi-user database ;-)) but you may have only one writer
at the same time.

Best Regards,
Gerd

--
________________________________________________________________
Gerd Mueller                                    gerd@smb-tec.com     
SMB GmbH                                  http://www.smb-tec.com