[sip-comm-dev] FailSafeTransaction moved


#1

Hi all,

Just a little message to say that the FailSafeTransaction class has moved to the fileaccess bundle.
Sorry for the disturbance if you were working on something using this class.

Cheers,
Ben.

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi,

I was looking these days at the MclStorageManager and I noticed in method storeContactList0()
that the failsafe - transaction is never rollback in case of an Exception is this ok ?

Thanks,
damencho

Benoit Pradelle wrote:

···

Hi all,

Just a little message to say that the FailSafeTransaction class has moved to the fileaccess bundle.
Sorry for the disturbance if you were working on something using this class.

Cheers,
Ben.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi Damian,

I think that you're talking about the IllegalStateException and I've many answers for your question. I understand your reaction and I agree that the behavior of this class is quite uncommon (throwing exceptions that shouldn't imply rollback) but I don't see any better way to handle errors in this case...

So, first, beginTransaction is able to restart a transaction whatever was the last state of the file and while a commit hasn't been executed, beginTransaction will simply rollback to the previous version. Second I don't think that an explicit rollback should be done here as an IllegalStateException is thrown when java refuses to create or can't access to the backup file so rollbacking here will certainly fail too. And third if a rollback has to be done in the exception handler, what should we do if a rollback fails ? rollbacking again ? To me it looks like an infinite recursion so never handling it is probably the better solution IMHO.

If you have any suggestion or any idea in how to improve it and have a more intuitive behavior, I'm totally open :slight_smile:

Hope that helps,
Ben

Damian Minkov a �crit :

···

Hi,

I was looking these days at the MclStorageManager and I noticed in method storeContactList0()
that the failsafe - transaction is never rollback in case of an Exception is this ok ?

Thanks,
damencho
Benoit Pradelle wrote:

Hi all,

Just a little message to say that the FailSafeTransaction class has moved to the fileaccess bundle.
Sorry for the disturbance if you were working on something using this class.

Cheers,
Ben.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net