aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes EJB 3.0: Doubt in Transaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "EJB 3.0: Doubt in Transaction" Watch "EJB 3.0: Doubt in Transaction" New topic
Author

EJB 3.0: Doubt in Transaction

P Chittaranjan
Ranch Hand

Joined: Feb 09, 2006
Posts: 47
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
Rajan Murugan
Ranch Hand

Joined: Jun 24, 2006
Posts: 182
hi,
you are referring a old document
"...The following is the example given on page 289 of the spec ejb-3_0-pr-spec-ejbcore.pdf..."

you seem to be referring public release.Need to download final release which has 562 pages.

the above example is in page no. 337 transaction chapter.
[ December 16, 2006: Message edited by: Rajan Murugan ]

With Regards,<br /> Rajan<br />"Java Rocks"
P Chittaranjan
Ranch Hand

Joined: Feb 09, 2006
Posts: 47
Hi Rajan,

Thanks a lot !!!
Yes, I was using the old doc. It is corrected in the final release.

Thanks,
Chittaranjan
[ December 16, 2006: Message edited by: P Chittaranjan ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB 3.0: Doubt in Transaction