Hi
Vlada Matena wrote:
>>If two client requests arrive to the same entity
>>object (i.e. same primary key),
>>the EJB container can do one of the following:
>> - use a different bean class instance for each
>>transaction context, or
>>
>> - use a single instance but serialize the use of
>>the instance by the transactions
>>
>>If the first method is used, the underlying resource
>>managers will properly
>>isolate the work of the multiple clients.
>I am a bit puzzled by this answer. In the situation
>posited above, if two copies of an entity class are
>used (one per transaction), and each transaction
>modifies its copy, which copy is valid, which is
>stored?
Vlada has already answered your question above. The resource manager (i.e. a
DBMS) will isolate the transactions. You may have two copies
of the bean but the transactions are still serialised. The first transaction
that hits the resource will have exclusive access to it (depending on the
isolation level) and the resource manager ensures
that the second transaction does not begin until the first one completes.
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".