This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock question: Tx

 
Dhondiba Joshi
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem

Given:
Bean A with transaction attributes of "NotSupported" for all its methods.
Bean B with transaction attributes of "Mandatory" for all its methods.
A method mA in bean A calls a method mB on Bean B.

Assuming that the method invokation is local, which of the following statements is correct?



Options

Select 1 correct option.

a)mA() will get a javax.transaction.TransactionRequiredException.

b)The bean A instance will be discarded.

c)mA() will get a javax.transaction.TransactionRolledbackException.

d)The container will create a new transaction context for executing mB().

None of the above.

What is the corrct answer ?
 
Dhondiba Joshi
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind. I got the answer it is b.
 
chao cai
Ranch Hand
Posts: 154
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the anwser is b
for local invoke,the exception throwed must be java.ejb.TranscationRequiredException
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic