Hi everyone,
I am preparing a short article on advanced entity bean topics and I would
like to confirm some confusing definitions with you.
Pessimistic and Optimistic Concurrency
Algorithms used by a database to handle concurrent access to data. With
pessimistic concurrency, only one transaction can use a row in the db at a
time (depending on isolation level). With optimistic, there is no locking
going on, but transactional collisions/diamonds are detected and appropriate
transactions are rolled bac.
One entity bean per PK in memory vs. multiple
This is simply a design decision used by application servers on how to
handle entity beans. App. servers like weblogic have only one entity bean
per PK in memory, thus all access to the entity bean is serialized. Other
app. servers allow multiple instances per pk to be in memory, and rely on
the database to do isolation control.
The confusing part here is why people on this list insist on calling
Weblogic's one-entity-per-pk strategy "pessimistic concurrency", and other
app. server's multiple-entity's-per-pk strategy "Optimistic Concurrency". I
thought that the terminology pessimistic/optimistic apply only to database
issues. How exactly can these terms be used when describing app. servers?
thanks everyone,
Floyd
---------------------------------
Senior Architect / Director of Marketing
The Middleware Company
http://www.middleware-company.com
http://www.TheServerSide.com
[EMAIL PROTECTED]
416-889-6115
Check out TheServerSide.com, the internets first J2EE community!!!
===========================================================================
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".