Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between in pool and out of pool

 
reubin haz
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As in EJBHF, when a client use an EB, 3 types of scenario occus, the client can create or find an existing entity, or get an EB sub component from Home business method. In these 3 types, only when a client create an entity would require a bean to be brought out of the pool to server the client. But what is the difference that the bean do some work in the pool or outside of pool? Since they all exist on live heap.

Besides these, only SFSB passivation will place the bean really out of heap (hope I'm right), for the rest of cases, what are the really difference the beans, either SB, EB, or MDB, are in the pool or outside of the pool?

Thanks.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stateful session beans are different to other beans in at least two ways.

1. They are not pooled.

2. They are created in direct response to a client request.
 
Ron V.
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When an entity bean is in the pool, it is not connected to a specific EJBObject, and as such cannot perform actions specific to the bean.
It can only perform home business methods, which do not require a specific bean, but involve all beans, such as calculating the average salary for all employees.

Only when an entitybean is brought out of the pool it is connected to an EJBObject, and can then perform actions on that specific bean. This means calling methods that are defined in the component interface, for example update the salary of a (specific) employee.

So the difference is really: in the pool -> bean in not connected to an EJBObject, out of the pool -> bean is connected to an EJBObject
 
reubin haz
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the answers. But they are only talking about entity bean.
How about session bean and MDB? Is there difference between these beans in the pool and outside of pool? Or are they the samething?
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An understanding of the life cycle for every bean type is essential for the exam. Read what the EJB spec says about this subject and, if you have further questions, post them here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic