This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB 3.0: Doubt in Transaction

 
P Chittaranjan
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rajan Murugan
Ranch Hand
Posts: 182
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
P Chittaranjan
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic