Re: using the clock in nanning-prevayler

Martin Lilja <[email protected]> Wed, 8 Oct 2003 01:42:52 -0700 (PDT)
Newsgroups gmane.comp.java.nanning.devel
Message-ID <[email protected]>
Well, as you can see from our previous commit, we
"fixed" this. From the org.prevayler.Prevayler source
you can read this comment:

"Returns the Clock used to determine the execution
time of all Transaction and Queries executed using
this Prevayler. This Clock is useful only to
Communication Objects and must NOT be used by
Transactions, Queries or Business Objects, since that
would make them become non-deterministic. Instead,
Transactions, Queries and Business Objects must use
the executionTime parameter which is passed on their
execution."

Instead
org.codehaus.nanning.prevayler.InvokeTransaction has a
executeAndQuery method which now has been changed to
set the clock in CurrentPrevayler. So it is now
possible to use CurrentPrevayler.getClock() if you
need to use the time in a transaction. The test case
has been changed accordingly.

-- Behe & Jimmy @ Lecando

--- Martin Lilja <[email protected]> wrote:
> Hi!
> We've been having some trouble with using the clock
> in
> prevayler. The problem is that during transaction
> playback, calls to
> CurrentPrevayler.getPrevayler().clock().time() fails
> because CurrentPrevayler hasn't been setup yet.


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com