• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

doubt about EJBContext.setRollbackOnly in Statefull session beans?

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in question below:
Which of the following statements are correct regarding EJBContext.setRollbackOnly() method?
---

i have marked an alternative with argument below, that is false:
It can be used by stateful session beans with bean managed transactions.
---

response correct this question:
It cannot be used by JPA Entities.
---

ok. i accept correct question, but i don't understand my incorrect alternative. help-me?
 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think you can call EJBContext.setRollbackOnly() in BMT.
You can only call it in CMT with the following Transaction Attributes:
Required, Require_new, Manadatory.
In BMT, You can use UserTransaction.setRollbackOnly().
Please correct me if I am wrong.
 
Rafael Rocha
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by krishna bulusu:
I don't think you can call EJBContext.setRollbackOnly() in BMT.Please correct me if I am wrong.

yes. i`m forget that detail. CMT can call EJBContext.setRollbackOnly() and don't BMT.

exist one higher conversation for this topic that discuss same doubt. but i clarify this situation with information this topics below:

When to use UserTransaction's setRollbackOnly() and UserTransaction's rollback()
questions about setRollbackOnly() for BMT

thanks a lot! :^)
[ July 20, 2008: Message edited by: Rafael Rocha ]
 
I am displeased. You are no longer allowed to read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic