This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests and have Scott Selikoff and Jeanne Boyarsky on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

big doubt HFE page 483 'Suspend a transaction'

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
On HFE Page 483, it says "If a transcation is in progress when a method on a BMT bean is called, the transcation is suspended."
I think the words "when a method on a BMT" is really a big doubt, even a method on a CMT bean is called, the transcation is still could be suspended, the suspending transaction depeneds on the method's transcation attribute.
Anyone could clear my doubt? Thanks a lot in advance.

Hai
 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai,

You are correct in saying that the transaction can be also suspended when a method on CMT bean is called (eg, method trans-attribute is NotSupported).

The actual question asks explicitly about BMT beans:


If a transcation is in progress when a method on a BMT bean is called, the transcation is suspended."



and therefore the answer is always 'Yes' - no transaction can propogate into the BMT bean.

Hope it helps
 
Hai Lin
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alex,
Thanks a lot. Your answer relly clear my doubt.
Maybe we can do a summary for transaction suspend here, only three situations one transaction will be suspended:

suppose one transaction is in progress:
1) a method on a BMT bean is called.
2) a method on a CMT bean is called, and this method's transaction attribute is 'NotSupported'
3) a method on a CMT bean is called, and this method's transaction attribute is 'RequireNew'

I only can think of this three situations, do you have more situations for transaction which could be suspened?

Thanks.

Hai
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Those are the only ones Hai. Look at pages 494 and 495 of HFEJB.
Cheers
[ July 08, 2004: Message edited by: Lionel Orellana ]
 
There's a hole in the bucket, dear Liza, dear Liza, a hole in the bucket, dear liza, a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic