Win a copy of Pipeline as Code this week in the Cloud/Virtualization 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

HF Mock Exam Q No. :13(Session Bean Life cycle)

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

In what case(s) the container faile to call the ejbRemove method on a session Bean

a) If the container crashes
b) If the application Exception is thrown from the business method
c) If timeout occurs while the bean is in ready state
d) If the application exception is thrown from within a transaction

The correct answer is A but why not C.

If the bean timeout then the container will remove the bean without calling ejbRemove()

Regards
Shiv
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Only A is correct. If bean(stateful) is passivated and time out occures, then ONLY ejbRemove() wount be called.
 
ShivPrakash Srivastava
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

But what happens when the bean is in ready state and times out,will the container still call the ejbRemove() method?

Regards
Shiv
 
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

But what happens when the bean is in ready state and times out,will the container still call the ejbRemove() method



Yes in ready state the container will call ejbRemove if it times out.
 
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic