• 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

CMTransaction Question

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

This is one of the questions from a mock exam. The answers given are A,B.
But I feel that A,B,D are also correct. But you need to select only two answers. Can any one please explain why D cannot be exactly right.

Thanks.

Q. The following sequence of method calls occurred on a CMP entity bean instance when a session bean invoked the CMP's businessMethod1() and businessMethod2() methods from the same session bean method entityBean.ejbActivate() entityBean.ejbLoad() entityBean.businessMethod1() entityBean.businessMethod2() entityBean.ejbStore() entityBean.ejbPassivate() Assuming that the session bean is configured with 'Required', what MUST be TRUE about the scenario that generated these method calls?

A. The business methods are NOT configured with 'RequiresNew'
B. Any persistent state changes that occur as a result of businessMethod1() are in the same transaction scope as changes made by businessMethod2().
C. Any persistent state changes that occur as a result of businessMethod1() are in a different transaction scope than changes made by businessMethod2().
D. ejbStore() will write the resultant state of the entity bean to the persistent store.
Select Two options.
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I think the option D is wrong, its right if its BMP where U maight b writing persistance logic in ur ejbStore().

In the case of CMP, contaner will write the resultant state of the entity bean to the persistent store, after invoking ejbStore().Container invokes ejbStore() (proir to persisting the state) to allow the bean instance to prepare itself for the synchronization of DB with instance state


binoj
 
Vishnu Munnangi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the Reply Binoj.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic