Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CMTransaction Question

 
Vishnu Munnangi
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.
 
Binoj Viswanathan
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic