![]() |
|
The Server manages all complexities of concurrency control in multiple VMs, transparent to the application. There are no additional programming constraints imposed on an application to achieve this control.
Session beans are not shared objects and there is no additional requirement to control concurrency in a cluster.
Entity beans use the Remote Lock Server (RLS) to maintain concurrency across nodes. This acts as a central repository for beans to acquire and release locks on Entity beans.
RLS ensures that only one node acquires a lock on an Entity Bean at one time. The Local Lock Service (LLS) communicates with the RLS on behalf of the node and coordinates acquiring and freeing of locks, when instructed by the RLS.
Once a lock on a bean is acquired from RLS, it is not released back to RLS after execution of the business method. The node through the LLS maintains it. This is because a client session is likely to work with a definite set of beans, which may be exclusive with other beans interfacing with other clients. In this case, it is more efficient to maintain the locks locally as the client session attached to this node may further use these beans.
For locks maintained locally, the node does not communicate with the RLS and processes the request faster.
| © Pramati Technologies 2007 | Runs on Pramati Server | Feedback | Legal |