This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes transaction rollbacks, but a record is inserted? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "transaction rollbacks, but a record is inserted?" Watch "transaction rollbacks, but a record is inserted?" New topic
Author

transaction rollbacks, but a record is inserted?

maya kannan
Greenhorn

Joined: Sep 22, 2010
Posts: 4
Hi all
I have done an application configuration using hybernate + JPA ,and atomikos for XA transcation management and spring 3.0 ,here every thing is working fine however insert operation, when exception is throwing the transcation should rollback,but it is not happening!!
here is a small flow for our application, in our manager level we are calling the businesss (here we are using Spring IOC)
my Manager.java

business.java we are using one method insertuser()

and our dao.java class we are using one method insertuser(Object entity)


and our
and my pojo class is


and my persistence.xml file is


my transcation log is
DEBUG - AbstractPlatformTransactionManager.handleExistingT ransaction(470) | Participating in existing transaction
Hibernate: insert into ta_user (created_USER_IDdate, userName) values (?, ?)
DEBUG - AbstractPlatformTransactionManager.processRollback (850) | Participating transaction failed - marking existing transaction as rollback-only
DEBUG - JtaTransactionManager.doSetRollbackOnly(1060) | Setting JTA transaction rollback-only
134578 [http-8080-Processor23] INFO atomikos - setRollbackOnly() called for transaction PaymentsTransactions0000100653
DEBUG - AbstractPlatformTransactionManager.processRollback (843) | Initiating transaction rollback
175094 [http-8080-Processor23] INFO atomikos - afterCompletion ( STATUS_ROLLEDBACK ) called on Synchronization: org.hibernate.ejb.AbstractEntityManagerImpl$1@c5c2 3d
175094 [http-8080-Processor23] INFO atomikos - afterCompletion ( STATUS_ROLLEDBACK ) called on Synchronization: org.hibernate.transaction.CacheSynchronization
175094 [http-8080-Processor23] INFO atomikos - rollback() done of transaction PaymentsTransactions0000100653


please anybady tel the solution

 
wood burning stoves
 
subject: transaction rollbacks, but a record is inserted?
 
Similar Threads
Integrating Spring & JDBC into JSF2 login page
Spring Security 3: Salting password issue
Preauthentication problem
HibernateTemplate does not commit to mysql database on saveOrUpdate
The chosen transaction strategy requires access to the JTA TransactionManager