Two Laptop Bag*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 3011
    
  34

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


Founder of ExamLab and Systemup
See how I can help you to become an awesome programmer
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
java.lang.RuntimeException: while creating a new bean instance
Confused with Stateless Session Bean
Pooling vs Instance Caches
Why have more than one stateless session bean?
Stateful Session Bean - Implementation of a pool by the EJB Container ?