-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Nested transaction or dirty write
PostPosted: Tue Oct 20, 2009 5:25 am 
Newbie

Joined: Tue Oct 20, 2009 5:18 am
Posts: 1
Hi all,

I have a question about transaction demarcation. To ensure that a long operation is correctly committed or rollbacked completely,
I gave my starting method Propagation.REQUIRES_NEW and the methods called from it Propagation.MANDATORY.

One of these methods is a counter that is incremented (used to generate unique filenames).
This part of the transaction should never be rollbacked, because then files are being overwritten. I tried to give this method
Propagation.REQUIRES_NEW. That indeed starts a new transaction and suspends the current one. But I noticed if the "outer"
transaction is rollbacked, the "inner" transaction will also be rollbacked.

Although I changed this code already to
use a timestamp in the filename (which also makes it unique), I'd like to know if this would've been possible (and how of course).

Thanks,
Jonne.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.