Get your CodeRanch badge!*
The moose likes Object Relational Mapping and the fly likes JTA UserTransaction rollback does not work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "JTA UserTransaction rollback does not work" Watch "JTA UserTransaction rollback does not work" New topic
Author

JTA UserTransaction rollback does not work

Olga Wsdf
Greenhorn

Joined: Jun 21, 2012
Posts: 2
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTA UserTransaction rollback does not work
 
Similar Threads
Persistent problem
JPA transaction rollback fails with call to stateless bean
Connection to data source on the basis of userlogin using JPA
JAX-WS based WS using EntityManager to persist data to DB