wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes EJBObject instance doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJBObject instance doubt" Watch "EJBObject instance doubt" New topic
Author

EJBObject instance doubt

Mohan Chandrasekaran
Greenhorn

Joined: Nov 05, 2005
Posts: 18
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???


Thanks,<br />Mohan<br />SCJP 1.4(93%)
Vinay Raj
Ranch Hand

Joined: Jun 19, 2006
Posts: 81
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

Joined: Nov 05, 2005
Posts: 18
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

Joined: Jun 19, 2006
Posts: 81
As long as the bean has not been passivated, it should be providing the same EJBObject.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJBObject instance doubt