Hi. In my application I have a util.List instance that keeps all data show on screen. Now I am using Observation to keep my data in memory in sync with modifications on the repository. So I register a listener and wait for Event.NODE_REMOVED event. All works.
When I receive the event, the event instance contains the path of removed node. Now, If I want to update my List in memory removing the application object that wrap that Node. I can only lookup the object in memory via event.getPath(). Now, what it seems to be needed here is a sort of mapping that has node path as the key and, as value, the index of application object in my List. Or, I can duplicate the path information of the node in my application object, so I can search for it in my List in memory. I cannot relay on the wrapped Node.getPath cause when I receive the NODE_REMOVED event, that node is gone and if I call getPath on it, I receive an exception like: javax.jcr.InvalidItemStateException: 9a8d806f-a3e9-48aa-84ab-a05a8c5436ca: the item does not exist anymore So, What I am trying to create is a binding between JCR and the data that I have actually in memory, the same way I use GlazedLists to bind data lists in memory and the swing models for the GUI. I would like some advice, if I am missing something or if this is a wrong way... Thanks. -- Daniele Dellafiore http://ildella.wordpress.com/
