File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes SystemException from Stateless Session Bean 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 "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
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3019
    
  35

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


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- 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
Pooling vs Instance Caches
Stateful Session Bean - Implementation of a pool by the EJB Container ?
java.lang.RuntimeException: while creating a new bean instance
Confused with Stateless Session Bean
Why have more than one stateless session bean?