posted 17 years ago
Hi,
The following is the example given on page 289 of the spec ejb-3_0-pr-spec-ejbcore.pdf.
--------------------------------------------------------
Example:
@TransactionAttribute(SUPPORTS)
public class someClass {
public void aMethod () {...}
public void bMethod () {...}
...
}
@Stateless public class aBean implements A {
public void aMethod () {...}
@TransactionAttribute(REQUIRES_NEW)
public void cMethod () {...}
...
}
Assuming aMethod, bMethod, cMethod are methods of interface A, their transaction attributes are
REQUIRED, SUPPORTS, and REQUIRES_NEW respectively.
--------------------------------------------------------------------
According to the above example 'aBean' implements interface A.
Since interface A is not mentioned here in the example ,I assume that interface A has default TransactionAttribute(REQUIRED).
Based on the default TransactionAttribute of A, methods aMethod, bMethod, cMethod should have the transaction attribute REQUIRED, REQUIRED, and REQUIRES_NEW respectively.
Is there something wrong in the example?
or Am I missing something here?
Can any body please help me to understand this?
Thanks,
Chittaranjan
Thanks,<br />Chittaranjan<br />SCJP 5.0,SCWCD1.4,SCBCD 5