Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA JOTM Transaction issue

 
Praveen Pulluru
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I'm developing a application with JPA(Hibernate) as backend. I have a DAO and JPADAO for each entity and my process updates more than one entity as one unit of work, so I decided to use JTA as it allows me to control the transactions so here's how my code looks persistence.xml














Now when I try to begin a transaction and commit changes to the entities(more than one) then it throws and exception and calls the utx.rollback but it will not rollback it has commited the transaction only partially not all entities are saved

Exception
java.lang.IllegalStateException: Cannot get Transaction for rollback
at org.objectweb.jotm.Current.rollback(Current.java:486)
at pub.jpa.dto.support.PubDProcess.processRecords(PubDProcess.java:397)

org.omg.CORBA.BAD_INV_ORDER: The Servant has not been associated with an ORB instance vmcid: 0x0 minor code: 0 completed: No
at org.omg.PortableServer.Servant._get_delegate(Unknown Source)
at org.omg.PortableServer.Servant._poa(Unknown Source)
at org.objectweb.jotm._SubCoordinator_Tie.deactivate(Unknown Source)
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.cleanUpTie(Unknown Source)
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.unexportObject(Unknown Source)
at javax.rmi.CORBA.Util.unexportObject(Unknown Source)
at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.unexportObject(Unknown Source)
at javax.rmi.PortableRemoteObject.unexportObject(Unknown Source)

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic