Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

transaction rollbacks, but a record is inserted?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
You don't like waffles? Well, do you like this tiny ad?
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic