| Author |
Mock Question about Transactions
|
Benoît de Chateauvieux
Ranch Hand
Joined: Aug 10, 2007
Posts: 183
|
|
Hi All, A Mock question in relation with my recent post http://www.coderanch.com/t/163269/java-EJB-SCBCD/certification/Message-Driven-Bean-TransactionAttribute Which statements about transaction attributes and propagation is correct? A- A message-driven bean's listener methods can only have a REQUIRED, REQUIRES_NEW, or NOT_SUPPORTED transaction attribute. B- An enterprise bean's timeout callback method can only have a REQUIRED, REQUIRES_NEW, or NOT_SUPPORTED transaction attribute. C- An enterprise bean implementing the javax.ejb.SessionSynchronization interface can only have a REQUIRES or REQUIRES_NEW transaction attribute. D- A session bean's business method cannot have a MANDATORY transaction attribute. I know that A is false (spec 13.3.7) but I don't understand why MDB can't have attribute REQUIRES_NEW. Any help ? Thanks, Beno�t
|
SCJP5 | SCBCD5 | SCEA5 Part 1
|
 |
Mateusz Maksymiuk
Greenhorn
Joined: Oct 30, 2007
Posts: 9
|
|
A: NO (MDB can have only REQUIRED or NOT_SUPPORTED) B: YES C: NO (SFSB with SessSynch. can have REQUIRED, REQUIRES_NEW or MANDATORY) D: NO (totally wrong) Because REQUIRES_NEW would be the same as REQUIRED. MDB don't recive a client TX context.
|
SCJP 5.0, SCJD, SCWCD 1.4, SCBCD 5.0
|
 |
Celinio Fernandes
Ranch Hand
Joined: Jun 28, 2003
Posts: 546
|
|
By the way, it is RequiresNew, not REQUIRES_NEW. Edit: my mistake, i guess my remark only applies to EJB 2.0 I am not aware of the EJB 3.0 specifications yet. [ November 17, 2007: Message edited by: Celinio Fernandes ]
|
SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
|
 |
 |
|
|
subject: Mock Question about Transactions
|
|
|