Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

EJBObject and Bean Instance

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJBObject is shared; but the bean instance is not.

Does the above sentence apply to all kinds of beans (bmp, cmp, stateless session bean, and stateful session bean)?
[ January 13, 2005: Message edited by: JiaPei Jen ]
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my understanding,

With Stateful session beans the EJBObject is not shared. Every EJBObject belongs to a particular bean during a given user session.

EJBObjects can be shared by stateless session beans but not at the same time. Only one bean can use an EJBObject at any one time. The same applies to Entity Beans.
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JiaPei Jen,

http://examples.oreilly.com/hfjejb/EJBSharpenA.pdf has a nice matrix on page 5.

The row 'Multiple clients can have a reference to the same bean' is about the shared bean instance. It says that stateless and stateful session bean instances can't be shared, an entity bean instance can be shared. In the case of message-driven beans the question is irrelevant since they don't have clients.

Back to the question:


EJBObject is shared; but the bean instance is not.
Does the above sentence apply to all kinds of beans (bmp, cmp, stateless session bean, and stateful session bean)?



So, Obviously it's not correct.

Regards,
Dan
 
if you think brussel sprouts are yummy, you should try any other food. And this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic