<P>Multiple clients concurrently accessing same data row
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rajiv_Bhatnagar
Posted On:   Sunday, February 24, 2002 08:36 PM

I have a question about entity beans. I will take an example to describe it.Assume I have an 'ACCOUNT" table. It has primary on field "ACC_ID". I have a bean class, home and remote interface and Primary Key "AccountPK". Whenever the bean instance is created , an instance of AccountPK is also created. If 2 or more client concurrently try to access the same row of the database i.e. for same ACC_ID, will there be : 1/ Many instances of bean class and many instances of primary key class. 2/ Many instances of bean class and one instance of primary key class. Or is there a 3rd scenario ?    More>>

I have a question about entity beans. I will take an example to describe it.Assume I have an 'ACCOUNT" table. It has primary on field "ACC_ID".


I have a bean class, home and remote interface and Primary Key "AccountPK".
Whenever the bean instance is created , an instance of AccountPK is also created.

If 2 or more client concurrently try to access the same row of the database i.e. for same ACC_ID, will there be :

1/ Many instances of bean class and many instances of primary key class.

2/ Many instances of bean class and one instance of primary key class.

Or is there a 3rd scenario ?

   <<Less

Re: Multiple clients concurrently accessing same data row

Posted By:   Bozidar_Dangubic  
Posted On:   Monday, February 25, 2002 11:01 AM

remember that entity beans are shared. so one instance of everything. of course a client needs a PK to call findByPrimaryKey(PK) so there will be two PK classes, one in each client, but in the actual container, one instance of Entity Bean shared by all concurrent clients.
About | Sitemap | Contact