Re: Lifecycle Design

2009-04-12 Thread Andrus Adamchik
The query refreshes the root entity, but not the relationships. So MisysDict will be refreshed, while related Xrefs will not. To ensure a refresh of specific relationships, you can use prefetching: http://cayenne.apache.org/doc/prefetching.html In the documentation it is presented as a perfo

Re: Lifecycle Design

2009-04-12 Thread Lawrence Gerstley
I'm feeling thick, but I'm really stuck with what is becoming an increasingly simple attempt to convince myself that I can get the simplest of caching examples working. My attempt now is to get two machines on two separate JVMs to have a force-reload. To do this, I'm re-running the query that popul

Re: Lifecycle Design

2009-04-11 Thread Andrus Adamchik
The caching docs are embarrassingly out of date. It's been requested a number of times to fix them. Maybe finally I'll do it... As for the cache strategy, you'd usually pick one of LOCAL_CACHE or SHARED_CACHE (or NO_CACHE for no caching, but that's the default already). Javadocs for QueryCa

Re: Lifecycle Design

2009-04-10 Thread Joe Baldwin
Lawrence, I am still struggling to understand Andrus' setCacheStrategy() approach in his previous email (he claims it is simple and I am all for that :) ). I am attempting some black box testing to figure out exactly where my data object is getting cached (and not updated properly). In

Re: Lifecycle Design

2009-04-10 Thread Lawrence Gerstley
So, in my knowledge-gaining journey with this topic, I ran across this page: http://cayenne.apache.org/doc/refreshquery.html, which looks like a list of items yet to be done or at least yet to be documented (and boy, when I have things really understood, I want to volunteer some documentati

Re: Lifecycle Design

2009-04-10 Thread Lawrence Gerstley
Dynamite. Thanks as always, Andrus. I'm going to get started with your recommendation right away. Lawrence On Apr 10, 2009, at 6:09 AM, Andrus Adamchik wrote: As mentioned in the quoted docs, there are ways to receive immediate notifications on the individual objects updates (if they are u

Re: Lifecycle Design

2009-04-10 Thread Andrus Adamchik
As mentioned in the quoted docs, there are ways to receive immediate notifications on the individual objects updates (if they are updated via Cayenne). This approach, while the most powerful on the surface, is least practical, especially across the VM. It suffers from a number of shortcomin

Re: Lifecycle Design

2009-04-10 Thread Andrey Razumovsky
The proposed way is to use JGroups or JMS for synchronization: http://cayenne.apache.org/doc/configuring-caching-behavior.html 2009/4/10 Lawrence Gerstley > So, I have the same question here--multiple thick clients (desktop RCP > applications), each with a DataContext tied to the same backend, a

Re: Lifecycle Design

2009-04-10 Thread Lawrence Gerstley
So, I have the same question here--multiple thick clients (desktop RCP applications), each with a DataContext tied to the same backend, and potential database access (direct or otherwise) from other toolsets out of my control. Is there a recommended strategy for refreshing each applications

Re: Lifecycle Design

2009-04-08 Thread Malcolm Edgar
Hi Joe, Your singleton cache is going to need to be update periodically if there are changes to the under lying database from other sources. regards Malcolm Edgar On Thu, Apr 9, 2009 at 7:45 AM, Joe Baldwin wrote: > I *think* this is a life-cycle question, but there may be more to it. > > Propo