• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

CMTransaction Question

 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the Reply Binoj.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic