Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock question 7 page 522 HFEJB

 
jeff mutonho
Ranch Hand
Posts: 271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone explain to me why A isn't correct.Also , I'm confused by the meaning of the "\' character.
 
Ramakrishnan Viswanathan
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Method 2 has a tx attr of "Required".

From 17.6.2.2 of EJB 2.0 Spec

Required
---------
The Container must invoke an enterprise Bean method whose transaction attribute is set to Required with a valid transaction context.
If a client invokes the enterprise Bean�s method while the client is associated with a transaction context,the container invokes the enterprise Bean�s method in the client�s transaction context.
If the client invokes the enterprise Bean�s method while the client is not associated with a transaction context, the container automatically starts a new transaction before delegating a method call to the enterprise Bean business method.

Option A which indicates that method 2 does not run in a txn context violates this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic