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 SLSB Pool & Entity Bean Pool 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 "SLSB Pool & Entity Bean Pool" Watch "SLSB Pool & Entity Bean Pool" New topic

SLSB Pool & Entity Bean Pool

manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312
Hi All

I would like to know the exact difference between the Stateless Session Bean Pool & the Entity Bean Pool. The SLSB pool comprises of a bunch of Beans of similiar type say 10 CardVerifier beans. Each has the same functionality.
But what is with the Entity Bean pool. Say If i have an Entity Beans pool of 10 customers. Does it mean Entity Bean with PK1, PK2,PK3 & so on i.e 10 differnt entity beans representing 10 different customers or is it that all Entity Beans in the Pool are EntityBean with PK1 i.e 10 instances of EntityBeanPK1 (10 entity beans of the same single customer)

Lionel Orellana
Ranch Hand

Joined: Mar 19, 2004
Posts: 87
Hi Manish

When Entity BEans are in the pool they have no identity. That is, a bean in the pool doesn't represent any real entity. Any CustomerBean in the pool can be chosen by the container to play Customer #5.

Giju George
Ranch Hand

Joined: Jun 08, 2004
Posts: 333
To add to what Lionel said, the stateless session beans are still active while inside a pool. That's why we don't need an ejbActivate()/ejbPassivate() for SLSB. But for entity beans, the beans are inactive in the pool.

SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCEA
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
All beans in the pool are active in that they are objects on the heap, ready to service a client request. This applies to all bean types, be they stateless session, entity or message-driven.

SCJP 1.4, SCWCD 1.3, SCBCD 1.3
I agree. Here's the link:
subject: SLSB Pool & Entity Bean Pool
It's not a secret anymore!