Subject | Re: [Firebird-Java] Re: Transaction concurrency |
---|---|
Author | Jim Starkey |
Post date | 2005-01-11T15:20:20Z |
Roman Rokytskyy wrote:
transaction doesn't start until all write locks have been acquired. If
a deadlock occurs trying to get the locks, the locks seized are released
and the transaction manager starts over.
There is also a mode that seizes and holds table locks as the
transaction progresses. I haven't a clue what it might be called in
newspeak. It would probably suffice the stated need. It is prone to
table deadlocks, however.
--
Jim Starkey
Netfrastructure, Inc.
978 526-1376
>>I haven't the foggiest how to do that from Java, but the FirebirdNo. The feature is intended to support deadlock-free transactions. The
>>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?
>>
>>
>
>We have currently no method to table reservation in JayBird, only "standard"
>params for TPB (like isc_tpb_wait, etc). Feature request for next version (I
>think I can create JayBird 1.5.6 pretty easy).
>
>But, Jim, if I understand documentation correctly, if table is not reserved
>on transaction start, the the first who modifies the table wins the lock,
>rest should wait/get exceptions. Is this correct?
>
>
>
transaction doesn't start until all write locks have been acquired. If
a deadlock occurs trying to get the locks, the locks seized are released
and the transaction manager starts over.
There is also a mode that seizes and holds table locks as the
transaction progresses. I haven't a clue what it might be called in
newspeak. It would probably suffice the stated need. It is prone to
table deadlocks, however.
--
Jim Starkey
Netfrastructure, Inc.
978 526-1376