Re: Inline scripted transactions
"Justin T. Sampson" <[email protected]>
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jul 16, 2010 at 1:00 AM, Karl Wettin <[email protected]> wrote: > I find this very neat and think it's safe since transactions are > "useless" after taking a snapshot. I'm not sure what you mean by "useless". > The problem would be if somone is > interested in the journal and the code has been refactored in a way > that the script in the transactions no longer is valid. Is that right? > Sure, but I wouldn't expect journals to be reused after any code changes anyway. It's just too easy to accidentally change some subtle aspect of the code's behavior, even if a change seems like a simple refactoring. In fact, storing a script may have an advantage in this regard because you get to see more precisely what the transaction did, not just a (possibly obsolete) class name. Something else I might be missing that makes this a bad idea? > Well, I suppose journals will be larger because they contain code snippets rather than just class names. I wouldn't worry about that unless it actually becomes a problem. You also, of course, lose compile-time checking of the syntax and typesafety of the code. Presumably you have unit tests that will exercise the scripts, though. Cheers, Justin ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion _______________________________________________ "Databases in Memoriam" -- http://www.prevayler.org