• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJBObject and Bean Instance

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
I like you because you always keep good, crunchy cereal in your pantry. This tiny ad agrees:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic