This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Mock question: Tx Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Mock question: Tx" Watch "Mock question: Tx" New topic
Author

Mock question: Tx

Dhondiba Joshi
Ranch Hand

Joined: Jan 23, 2004
Posts: 39
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 ?


SCJP,SCWCD
Dhondiba Joshi
Ranch Hand

Joined: Jan 23, 2004
Posts: 39
Never mind. I got the answer it is b.
chao cai
Ranch Hand

Joined: May 26, 2005
Posts: 154
the anwser is b
for local invoke,the exception throwed must be java.ejb.TranscationRequiredException


SCEA<br />SCJP 1.2<br />SCBCD<br />MCSD<br />IBM Certified Specialist RUP v2003<br />IBM Certified Solution Designer OOAD vUML2<br /> <br />Phone Number:86-010-82776427
 
 
subject: Mock question: Tx