Re: I'm new to Prevayler: Query vs direct access
"Justin T. Sampson" <[email protected]>
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <CAAshuuGfgm35AO3aZQt6WuAsfor9Oy6_Jt3HWmzL2+ykZGkVVg@mail.gmail.com> |
On Sat, Sep 10, 2011 at 11:17 AM, Naveen Chawla <[email protected]> wrote: > Do you recommend using "Query" as a replacement for any and all > direct access to a prevayling object? I do. > Does doing so de-necessitate any and all concurrency control? Yes, and that's why I recommend it. As long as all writes use Transaction and all reads use Query then Prevayler takes care of concurrency for you. > If I have no concurrency control of my own, are there any cases > where it'd be ok to use direct access to a prevayling object > instead of Query? If so, what are they? That's a Java question, not a Prevayler question. If you really know what you're doing, you might get away with it. But concurrency is tricky, so keep it simple and use existing concurrency abstractions (such as Prevayler) as much as possible. That's my personal rule, anyway. Cheers, Justin ------------------------------------------------------------------------------ Malware Security Report: Protecting Your Business, Customers, and the Bottom Line. Protect your business and customers by understanding the threat from malware and how it can impact your online business. http://www.accelacomm.com/jaw/sfnl/114/51427462/ _______________________________________________ To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion _______________________________________________ "Databases in Memoriam" -- http://www.prevayler.org