Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SystemException from Stateless Session Bean

 
Jisha Anand
Ranch Hand
Posts: 62
Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4588
302
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For SLSB, it is not guaranteed that the same bean instance will be reused or not.
 
Jisha Anand
Ranch Hand
Posts: 62
Flex Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic