This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CMT and Versioning Timestamp  RSS feed

 
Maria Semerdjieva
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, a'm using container managing transactions,and version column Timestamp.When transaction fails on
em.merge(object);
version columns has changed,Transaction rolledback and entity is detached from EntityManager.and bean is bestroyed.
Where i can find old version on my object.I don't want to load from database? Why when transaction rolledback changes made on entity in this transaction are saved.
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you saying that the version field is updated, even though the transaction it was a part of has rolled back?

Mark
 
Maria Semerdjieva
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the version field is updated,even though the transaction it was a part of has rolled back.I use nested stateful beans. maybe this is the problem.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!