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

What happens when the client calls remove while the bean is Passivated??

 
Muthaiah Ramanathan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have doubt. What will happen when the client calls remove on stateful session bean, when it is actually passivated? All the life cycle diagrams, that I see doesn't mention a ejbRemove call from passivated state to doesn't exist state? It only states timeout from passivated state to doesn't exist.

Regards,

Muthaiah.
 
Rollyn
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Excerpt from SCBCD Study Exam Kit:

If the client invokes a method on the passivated bean instance, the container activates the bean...

Does it will activate the bean and execute the method you called.
 
MI Mohammed
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In fact, the same question came to my mind, too late my exams is for 12pm today. But I think it will just treat it like time out. Imagine, why would the
the container have to activate an instance that it's going to remove. Logically, It's just waste of resources..
Hope you get the right answer before your exam. Bye for now
 
Ramakrishnan Viswanathan
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.coderanch.com/t/161275/java-EJB-SCBCD/certification/reg-ejbRemove
 
Sam Sun
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somehow this answered this question in another way.

On Head First EJB Page 213

Q: I don't see why you can't call ejbRemove() on a bean when you're going to kill it.
A: First of all, you honestly expect me to bring a bean out of passivation just to kill it? Talk about a waste of overhead! Sheesh, you should know better, if you care about performance.

This somehow said that, to call a ejbRemove() method, you have to activate the bean and this is a hit to the performance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic