Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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
 
Creativity is allowing yourself to make mistakes; art is knowing which ones to keep. Keep this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic