Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Entity Bean Concurrency Question  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If two different clients both execute findByPrimaryKey(new Integer(1)), then will they get remote references to the same EJBObject or two different EJBObjects?
 
Tim Blommerde
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For as far as I know, both will get a different object, representing the same data.
Have fun,
Tim
 
sony gam
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As far as my knowledge goes, they will be by default getting two different objects in Weblogic server 6.0/6.1. This is the case in most of the other J2EE app servers as well.
Earlier versions of weblogic used the exclusive locking mechanism in the sense, if a client obtains a reference of an entity bean another client trying to access the same reference will be blocked.
Latest versions of web logic have the data base locking as the default ( so two clients could access the same entity bean at the same time). You can also set the exclusive locking in the deployment descriptor.
Hope this helps
Sony gam
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,
That was very helpful.
Regards,
-Miftah
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!