Re: Failed transactions

Klaus Wuestefeld <[email protected]>
Newsgroups gmane.comp.java.prevayler
Message-ID <[email protected]>
> The other types, "deterministic" are like when a parameter that must
> be validated at transaction time fails.  Existence of a dependent
> object for example.  I have to test within the execution of
> transaction to guarantee state.   When that fails, I wonder what the
> expected state of the journal is.

The transaction is written to the journal before being applied to the
system (to ensure durability of reads) and never removed.

The food taster turned on (Justin please confirm) will prevent such
faulty transactions from being written to the log.

The food taster is rebuilt in RAM as a copy of the actual system.
Piped serialization in RAM is used to make the copy. All transactions
are blocked while that happens.

This is how I measure used RAM:

	static private final Runtime RUNTIME = Runtime.getRuntime();

	private int measureUsedMemory() {
		long total, total2, free;
		do {
			total = RUNTIME.totalMemory();
			free = RUNTIME.freeMemory();
			total2 = RUNTIME.totalMemory();
		} while (total != total2);
			
		return total - free;
	}

And calling RUNTIME.maxMemory() you get the max given to the VM. I
wouldn't resort to JMX unless I wanted to monitor remotely, and maybe
not even then.

See you, Klaus.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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.