• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
https://coderanch.com/t/161275/java-EJB-SCBCD/certification/reg-ejbRemove
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
This tiny ad is guaranteed to be gluten free.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic