Hi Vinod,
The following is the explanation from EJB specifications :
The enterprise Bean developer does not have to worry about concurrent access
from
multiple transactions when writing the business methods. The enterprise Bean
develop-er
writes the methods assuming that the container will ensure appropriate
synchroniza-tion
for entity Beans that are accessed concurrently from multiple transactions.
The entity container typically uses one of two implementation strategies to
achieve
proper synchronization (these strategies are illustrative not prescriptive):
� The container activates multiple instances of the enterprise Bean, one for
each
transaction in which the entity is being accessed. The transaction
synchronization is performed automatically by the underlying database during
the database access calls performed by the ejbLoad, ejbCreate, ejbStore, and
ejbRemove methods. The database system provides all the necessary
transaction
synchronization, the container does not have to perform any synchronization
logic. The commit-time options B and C in Subsection 9.11.4 is applicable to
this type of container.
The container acquires an exclusive lock on the instance�s state in the
database.
The container activates a single instance and serializes the access from
multiple
transactions to this instance. The commit-time option A in Subsection 9.11.4
is
applicable to this type of container.
Hope this helps....
Rajan
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of vinod
Sent: Monday, August 07, 2000 11:45 PM
To: [EMAIL PROTECTED]
Subject: Doubt on synchronization in EJB
Importance: High
Sensitivity: Confidential
Hi All,
I have a doubt on synchronization in EJB. In my entity bean (BMP)
I have a business method which generates a unique id. If multiple users
access the entity bean how the container (Weblogic5.10) manages? How it
assures unique id generation?
Thanx and regards,
Vinod.
===========================================================================
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".
===========================================================================
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".