New to Prevayler: "Baptism problem" basics?
Naveen Chawla <[email protected]>
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <CAGs7EcVbMU5NdRZYgBER13i_+K5K4Zizuo=tnDKiG=QrxNEhfQ@mail.gmail.com> |
I really couldn't understand the term "remove the code that references business objects directly inside Transactions". I thought the very first line of the Transaction itself was ((MyObjectType)prevalentSystem).doSomething()? Isn't this referencing the business object directly to call the method in the first place? If I did MyObjectType m = (MyObjectType)prevalentSystem; , I could still use "m" thereafter, right? Am I ok as long as I call methods from "m" and not references? Or is it a different rule? Can my ".doSomething()" method itself reference and play around with the objects in "m" without restrictions? I'm lost maybe because the code examples on codehaus are gone: http://docs.codehaus.org/display/PREVAYLER/The+Baptism+Problem . And also because I couldn't understand the phrase "transactions shouldn't carry direct references to the objects". Does this only mean as instance variables of the Transaction, or also within local variables inside "executeOn()"? Can I get the simplest possible example with the problem vs without, and the best practices for easily and flexibly modifying objects top-to-bottom without ever having to worry about the baptism problem? ------------------------------------------------------------------------------ Why Cloud-Based Security and Archiving Make Sense Osterman Research conducted this study that outlines how and why cloud computing security and archiving is rapidly being adopted across the IT space for its ease of implementation, lower cost, and increased reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/ _______________________________________________ To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion _______________________________________________ "Databases in Memoriam" -- http://www.prevayler.org