• 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

HFB p.369 q.10

 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HFB p.369 q.10
What is true for a CMP bean in the ready state ?

A. Its ejbLoad() can be called directly after ejbStore.
B. Its ejbStore() can be called directly after a business method.
C. One of its business methods can be called directly after ejbStore.
D. None of the above.

Ans: A, B, C.

I understand why A, B, C are correct. I get the ans in HFB p.352 and p. 356. However, the explanation of the book is:


The point is: load, store and biz methods can be called by the Container in any order



Why in any order ?
Is it mean that following situation will happen ?
---------------------------------
Client called biz methods
ejbLoad()
ejbStore() //store called /*before*/ bizMethods
bizMethods()
//may called ejbPassivate() ...
---------------------------------

The above seq is different on book p. 352
 
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vince,

Check out the EJB 2.0 specifications, page 169, 3rd bullet point. It is stated that business methods can be invoked 0 or more times while ejbLoad & ejbStore can be arbitrarily mixed with the invocations of business methods.

Hope this helps.
 
Well don't expect me to do the dishes! This ad has been cleaned for your convenience:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic