• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJBObject and Bean Instance

 
JiaPei Jen
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 ]
 
Eddie Long
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.
 
Dan Drillich
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic