This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HFE Page 497 - Transaction Question  RSS feed

 
mini mehta
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q.
Of the six transaction attributes, which one (or ones) must NOT be used by
a bean that calls getRollbackOnly() or setRollbackOnly()?


I was think of Supported, NotSupported and Never, but the answer in HFE site says "Never"
 
Suman Sarker
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mini,
Yes, I think you are right. Because Supports, NotSupported or Never should not be used by beans that call getRollbackOnly() and setRollbackOnly(). If the beans try to use any of those attributes, the container will definitely throw IllegalStateException.

Hope this helps.

Suman
 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mini:
I did not see the answer HFE site but I choosed the same answers like you did, Supports, NotSupported and Never. I think those three are the answers unless one gives me reasons to think otherwise.
 
mini mehta
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your replies. This is the link to the answers from HFE site http://www.wickedlysmart.com/HeadFirst/HeadFirstEJB/sharpens/EJBSharpenC.pdf
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!