This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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.
reply
    Bookmark Topic Watch Topic
  • New Topic