• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

EJB Question?

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is ejbPassivate() invoked by the container when ejbRemove() is invoked?
� a. true
� b. false

Any of you please get me the right answer?
 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I do not believe that ejbPassivate is called prior to ejbRemove, or after it is called. I have not found anything in the spec that says ejbPassivate is called either, for any type of bean (Stateful, Statless, Entity, CMT, BMT, BMP, or CMP). I dont think it would make sense for the container to invoke ejbPassivate before or after ejbRemove either - certainly not after!! So I think the answer should be False (B).

Please feel free to correct me if I am wrong, as I am not an expert on EJB.

Mat
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Write a BMP, like the following one, and test the remove method.

I actualy use this BMP in a BMP Tutorial to demonstrate how the various lifecylce methods work, but I don't think I called the ejbRemove method in the demo. Do it yourself, and prove the answer to yourself. Don't rely on someone else's opinion.

Cheers,

-Cameron McKenzie

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Method ejbPassivate() is *NOT* invoked by the container when ejbRemove() is invoked (At least this is how BEA Weblogic behaves).

Hence, answer b is correct.
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Check this out, it might be helpful.

JavaRanch
 
Oh sure, it's a tiny ad, but under the right circumstances, it gets bigger.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic