"Lahooti, Hamid" wrote:
> >This thread has really gotten off the EJB track. Part of the "problem" is
> >that people need to talk about some real products and implementations since
> >most of us are concerned more with what can be done using EJBs today than
> >what could be done in a theoretically environment.
I'm trying to write portable code, so tying the implementation to a "real"
product is of little use. Unless of course I #ifdef (ouch... bitten by java
again ;) the code everywhere.
>
>
> Here's my understanding of how Oracle 8.xxx works with the so called DB OCC:
>
> Scenario:
> TX1 updates A, then updates B
> TX2 updates B, then updates A
>
> ISOLATION LEVEL=READ COMMITTED (Oracle default)
> Outcome:
> Deadlock. TX1 or TX2 is aborted.
>
> ISOLATION LEVEL=SERIALIZABLE
> Outcome:
> If TX1 updates B before TX2 updates it, TX1 commits, TX2 is allowed to
> continue
> If TX2 starts before TX1, updates B before TX1 updates it, TX2 wins, TX1
> aborts.
> If TX2 updates A before TX2 updates it, TX2 commits, TX1 is allowed to
> continue.
> If TX1 starts before TX2 and updates A before TX2 updates it, TX1 wins, TX2
> aborts
>
> The aborted transaction receives ORA-08177 error.
>
Oracle may couple isolation level and method of concurrency control, but they
are orthagonal. Any isolation level (as defined by JDBC) can be supported with
either optimistic or pessimistic concurrency control. The isolation level only
indicates what should be considered a conflict.
This is the kind of limited implementation of concurrency I wish we didn't have
to live with. My solution is to hold a fire to the vendors feet and get them to
implement real optimistic concurrency and effective deadlock detection for
pessimistic concurrency. Of course if I'm the only one asking, it won't happen.
I'm talking about vendors of both app servers and DBMSs.
As of today, careful design of the ejb components is the only solution open to
us. As Rickard points out, this is far from ideal.
>
> Regards,
> Hamid
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".