Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

HF: page 371, a Entity Bean question.

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Which method(s) run in the transaction context of the method that causes their invocation?

a) ejbLoad()
b) ejbRemove()
c) ejbSelect()
d) ejbActivate()
e) ejbPassivate()
f) setEntityContext()

Correct answers are a, b,c.

I thought answers are a,d,e. Can somebody please explain it?

Thanks,
Prashant
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer can't be ejbActivate and ejbPassivate.

Because by the time ejbActivate() or ejbPassivate() is called,
the container no longer has you in a meaningful transaction context,
Thus, you can't be in a transaction at that point.

Business methods, home business methods and remove() of entity beans
should be running in transactions. I guess that's why
the answer is a,b,c
 
Prashant Neginahal
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Kin. I understood the question wrongly.

--Prashant
 
    Bookmark Topic Watch Topic
  • New Topic