> On Fri, Oct 15, 2010 at 11:46, Vidar Ramdal <[email protected]> wrote: >> Is this safe, or is the ObservationManager retrieved by >> session.getWorkspace().getObservationManager() tied to the session >> from which it was acquired?
On Fri, Oct 15, 2010 at 12:17 PM, Ian Boston <[email protected]> wrote: > In general its not safe since the session the observation manager was created > with > (which must stay logged in for the ObservationManager to remain active) is > stored internally and used > internally. There is one point where a check is made to ensure the same > session is connected to dispatches, On Fri, Oct 15, 2010 at 12:18 PM, Alexander Klimetschek <[email protected]> wrote: > Yes, it is session-specific (getWorkspace() is also a session-specific > instance). So there is no guarantee that it works in multiple threads. Guys, thanks for your explanations! It is probably no surprise that I'm implementing a cache to hold some data fetched from JCR, and that the cache should invalidate items if they are modified (by listenting to events). I now see that this will be messy, with a worker thread doing the JCR stuff, and who knows what else. If anyone has pointers to best practices/examples/experiences on anything like this, I will greatly appreciate it. -- Vidar S. Ramdal <[email protected]> - http://www.idium.no Sommerrogata 13-15, N-0255 Oslo, Norway + 47 22 00 84 00 / +47 22 00 84 76 Quando omni flunkus moritatus!
