File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes pool for EjbHome & EjbObject Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "pool for EjbHome & EjbObject" Watch "pool for EjbHome & EjbObject" New topic

pool for EjbHome & EjbObject

manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312
Hi All

Newbie question. SO do forgive me if this sounds frivilous to you

When we say the client call is intercepted by the EJBObject.
That implies we should be having an EJBHome object & EJBObject object for each Bean(Session & Entity)running in an environment.

I just wanted to know as we have a pool of beans do we also have a pool of EJBHome & EJBObjects for each bean running in hte environment or is it that there is only one EJBHome & EJBObject per bean.

Eg) say if i have a stateless session bean (SB) & its corresponding home(SB_HOME) & component interfaces (SB_OBJECT).
Now i can have a pool of beans(SB).
My question is do we also have a pool of (SB_HOME) & (SB_OBJECT) or there would be only 1 SB_HOME & 1 SB_OBJECT

Kindly ellaborate a bit on this

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Manish,

In short - these are Vendor specific!!!

In detail, for EJB Home - Most containers will have a 1:N relationship between home objects and bean instances.

EJB Object - Some containers can have a 1:N relationship, where each EJB Object is multithreaded. Other containers might have M:N relation ship, where M represents the number of EJB objects instantiated. In this case, each EBJ Object is single threaded.

So most containers will have one Home Object and one EJB Object.

If you can go through 'Mastering EJB II' @ chapter 2, you will get a clear Idea.

I agree. Here's the link:
subject: pool for EjbHome & EjbObject
jQuery in Action, 3rd edition