• 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
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

HF: page 371, a Entity Bean question.

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx Kin. I understood the question wrongly.

--Prashant
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic