• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

difference between in pool and out of pool

 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic