Subject Re: [Firebird-Java] Re: Transaction concurrency
Author Jim Starkey
nagypapi wrote:

>
> > What you need in Firebird, is serial execution of the transactions, i.e.
> > that only one transaction is executed at a time. In this case your logic
> > will work.
> >
> > Try setting the transaction isolation to TRANSACTION_SERIALIZABLE
> and run
> > your tests again. But please note that this transaction isolation is
> very
> > restrictive (reads conflict with writes with table-level locks).
> Please, use
> > with care.
>
> I just read a bit of the basics of transactions, and I see I have to
> plan my database access a little wiser
>
> What I need is an explicit write access lock (some kind of
> table-mutex) on that specific table, that doesn't conflict with
> read-only operations. And this lock must live through the whole
> transaction. This lock must also disappear if client or server crashes
> unexpectedly
>
I haven't the foggiest how to do that from Java, but the Firebird
transaction parameter block allows specification of "reserving" tables
-- w/ exclusive locks -- before starting the transaction. Sounds like
exactly what you need. Now, how to get at it? Roman?