• 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
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic