• 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
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

JTA UserTransaction rollback does not work

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I try to describe my environment shortly. Technologies: EJB 3.1, JSF, JBoss 7.1.1

There are Servise-classes (@SessionScoped @Stateful). Servise-classes call Dao classes (@Stateless)

I want :
- use EntityManager only into @StateLess beans (Dao)
- have short transaction in most cases (like persist, merge)
- have one long transaction for some multistep-methods (methods are in Dao also)
- have actual (up to date, without first-level cache) data[

I have: Pesistense.xml


Dao

Problem: If it is throw an Exception into Dao method, part data will save in DB instead of total rollback.

I think, is need Join Transaction to EM. Or disconnect persists each item to the DB right away (using cache). I've try different ways, but didn't have success.

Thanks for in advance!
 
Politics n. Poly "many" + ticks "blood sucking insects". 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