• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic