• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

HFEJB page 366 question no 18

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

I have a Doubt in question no 18 on page 366 of HFEJB.

As far as My understanding goes, transaction context of a method of a bean (irrespective of its BMT OR CMT ) which invokes another method of a CMT Bean is propagated to the invoked method.

So the answer to this question should include all the method which Run as a CMT bean Methods.Now , since an Entity Bean can only use CMT , all the methods given as options should be a part of the answer.

I do not get why only A,B and C is the answer to this question.

Any help is appreciated.

Thanks,
[ February 24, 2006: Message edited by: mohd. gulrez khan ]
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are asking why ejbActivate, ejbPassivate and setEntityContext do not run in the caller's transaction context. For setEntityContext: ask yourself if a client will exist when this method is called.
 
mohd. gulrez khan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
perfectly true and acceptable.

But why not ejbActivate() and ejbPassivate()

Thanks in Advance
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds logical that ejbActivate() and ejbPassivate() methods would get called in response to a client request. However, there are situations where these methods might get invoked by the container. An entity bean can receive a series of passivation and subsequent activation calls while it is in a transaction. This is comlpetely at the discretion of the container. What is guaranteed however, is that the bean always gets an ejbStore() call prior to passivation.

These callbacks do get called as a result of client invocation - but not "always"...
 
straws are for suckers. tiny ads are for attractive people.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic