Re: What happens if a transaction fails to serialize?

"Justin T. Sampson" <[email protected]>
Newsgroups gmane.comp.java.prevayler
Message-ID <[email protected]>
Or, to go meta, we might challenge the notion of a transaction "failing".
There's really no such thing in Prevayler. Returning a value and throwing an
exception are just two different ways for a piece of code to exit. No need
to call one "success" and the other "failure". If the code is deterministic,
it will always return the same value or throw the same exception, and either
way it will have the same effects on the system every time, so it's safe to
leave in the journal. If it's not deterministic, it's unsafe regardless of
whether it threw an exception or returned a value.

(The problematic cases are errors -- such as StackOverflowError and
OutOfMemoryError -- which are not going to be deterministic, despite the
programmer's best intentions. Prevayler handles them specially.)

-Justin


On Fri, Apr 23, 2010 at 3:13 PM, Klaus Wuestefeld <[email protected]
> wrote:

> Nothing. It remains there.
>
>
> On Fri, Apr 23, 2010 at 6:56 PM, Ross Rick <[email protected]> wrote:
> >"If the transaction fails, what happens to it's journal entry?"
>

------------------------------------------------------------------------------

_______________________________________________
To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
_______________________________________________
"Databases in Memoriam" -- http://www.prevayler.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.