Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transaction attributes

 
Suma GS
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a method say X()in session bean and the transaction attribute set to it is "requires new". X() calls create method of an entity method which inserts a record into a master table. After inserting a record, method X() calls findByXXX() method of child table. When this statement is excecuted, I get an Exception saying "TransactionRolledback..... SQL Exception... parent key not found.."
Any help on this?
Thanks
Suma
 
David Harrigan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, possible error in creating the "parent" record.
This may be of help:
http://www.coderanch.com/t/308423/EJB-JEE/java/Transaction-Attributes-EJB
-=david=-
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic