• Post Reply Bookmark Topic Watch Topic
  • New Topic

Weblogic Doubt

 
puja k
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently stydying EJB.I had read that at any point in time I can have multiple instances of an Entity Bean pointing to the same Database record in the underlying datastore (i.e same primary Key).This is done by the container when there are many clients requesting for the same data simultaneously.
In the Weblogic Documents , I came across the following:-
"The EJB 1.1 container in WebLogic Server Version 5.1 uses a pessimistic locking mechanism for entity EJB instances. As clients enlist an EJB or EJB method in a transaction, WebLogic Server places an exclusive lock on the EJB instance or method for the duration of the transaction. Other clients requesting the same EJB or method block until the current transaction completes.
This method of locking provides reliable access to EJB data, and avoids unnecessary calls to ejbLoad() to refresh the EJB instance's persistent fields. However, in certain circumstances pessimistic locking may not provide the best model for concurrent access to the EJB's data. Once a client has locked an EJB instance, other clients are blocked from the EJB's data even if they intend only to read the persistent fields. ".
If that is the case, as mentioned above , then does that mean that the Weblogic container would have at any point in time only one instance of an Entity Bean pointing to a specific database record??
Thanks,
Pooja

 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"puja k",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!