This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
A client sets a field on an entity bean; when is it ejbStore()d ? - when pooled, or before activating for another primary key. Adding to the Qtn, two clients are viewing the same data, through two different entity beans; if the ejbStore() is not immediately after setting of the field then it may be so that finally the data after their individual sets may not be the one that was last set. [ April 27, 2003: Message edited by: Vishal Saxena ]
Hi, As soon as the business methods processing gets over,ejbStore() gets called.And also entity bean instance is multi threaded.So 2 clients going to access the same row in a table can share the same entity instance pointing to the row. The point of inconsistancy won't be there as the container takes care of it.When one client access it,other client will be made to wait as the bean instance is synchronised by the container. Geeta
As soon as the business methods processing gets over,ejbStore() gets called.And also entity bean instance is multi threaded.. Geeta
How can the entity bean instance be multithreaded?When the specification prevents you from doing so.I thought bean instances are pooled and load and store are called based on the need by the container to refresh the states of the bean instances that represent the same data.I fell queing up requests as Geeta suggested will cause a performance bottleneck.