This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes SystemException from Stateless Session Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "SystemException from Stateless Session Bean" Watch "SystemException from Stateless Session Bean" New topic
Author

SystemException from Stateless Session Bean

Jisha Anand
Ranch Hand

Joined: Apr 02, 2009
Posts: 62

Hi!

I just read throwing SystemException causes the container to discard the bean instance. For a stateful session bean the discarded bean can never be used again. But what about stateless session beans? The container discards stateless session beans also right? In that case is the bean removed from the pool too or does it return to the pool so that another client might invoke the same bean?

Pardon if my doubt is stupid; I am bit confused going through Exception part

Thanks in advance!


SCJP, SCWCD, SCBCD
Devaka Cooray
Saloon Keeper

Joined: Jul 29, 2008
Posts: 2727
    
    3

For SLSB, it is not guaranteed that the same bean instance will be reused or not.


Author of ExamLab (Download) - the free mock exam kit for SCJP / OCPJP
Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
Jisha Anand
Ranch Hand

Joined: Apr 02, 2009
Posts: 62

Devaka Cooray wrote:For SLSB, it is not guaranteed that the same bean instance will be reused or not.


Devaka,

You mean its not guaranteed that the discarded SLSB will be returned to the pool or the bean will be removed from the pool?

Thanks a lot!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SystemException from Stateless Session Bean
 
Similar Threads
Why have more than one stateless session bean?
java.lang.RuntimeException: while creating a new bean instance
Stateful Session Bean - Implementation of a pool by the EJB Container ?
Pooling vs Instance Caches
Confused with Stateless Session Bean