• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB 3.0: Doubt in Transaction

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic