Win a copy of Java Challengers this week in the Java in General forum!
  • 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:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Mock question: Tx

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Never mind. I got the answer it is b.
 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the anwser is b
for local invoke,the exception throwed must be java.ejb.TranscationRequiredException
reply
    Bookmark Topic Watch Topic
  • New Topic