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

Bean Instance

 
vidya sagar
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Stateful Session Bean,after client finishes the job whether bean is destroyed and instance is moved to pool or instance of bean itself is destroyed.

 
Rajesh Chande
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Vidya,

In case of stateful session beans there is no such thing as "pool", atleast this is whats clear from the lifecycle diagram of a stateful session bean. But yes in case of a stateless session bean, there is a "pool" of instances maintained.

And so, we can conclude that once a remove() is invoked on a steteful session bean, the bean instance goes to "does not exist" state.

Regards,
Tiro.
 
vidya sagar
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tiro for your reply.

One more Doubt,for the same case how Entity Bean will react?
 
srija srija
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vidya,

In stateful session beans, there is no interaction with the pool. In case of stateless session beans,entity beans, we have.

In both entity,state less session beans the instance couldnt be removed, will be used for some other jobs. The bean instance will go back to the pool.

But in case of Entity beans the only data from the database will be deleted not the instance.

Thanks
Srija
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic