• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJBObject instance doubt

 
Mohan Chandrasekaran
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I have doubt related to number of EJBObject instances created in the EJB Container.

Can anyone tell how the EJB Container decides, while creating the EJBObject for session,entity bean?

Is it like for every call from client a new EJBObject is created and its stub is returned to the client???
 
Vinay Raj
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe most of the container implementations would use lazy instantiation technique to create a EJBObject stub. Hence typically EJBObject stub who be created during creation or activation of the bean.
 
Mohan Chandrasekaran
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Vinay,
But will the container uses the same EJBObject object or will it create a new one for every client call (provided a EJBObject is around bean).
 
Vinay Raj
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As long as the bean has not been passivated, it should be providing the same EJBObject.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic