Am 14.02.15 um 04:21 schrieb Alexander Klimetschek:
> Because of the readFully() feature, that at some time always gets called, the 
> JcrModifiableValueMap will cache all the node's properties once read. Thus if 
> you later do a session.refresh(false) in JCR, which discards transient 
> changes, the value map will not know about it and keep returning cached 
> transient changes.
> 
> We have a use case where we want this behavior and have a complete custom 
> copy of the JcrModifiableValueMap code with the few changes. Obviously the 
> code duplication is bad.
> 
> Can we improve on that? Make this optional?
> 
A value map can be seen as a copy of the data at the point it was
created. And especially as you know that you're doing a refresh,
why can't you refetch the value map once you did the refresh?

Transparently handling a session refresh is not that easy, it might work
for your case and the value map. But I guess there are a lot of cases
where this doesn't work - or even is unexpected. Therefore simply
getting resources and representations again after a refresh is the
simplest and cleanest solution

Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
[email protected]

Reply via email to