4 Replies Latest reply on Feb 9, 2007 5:23 AM by Manik Surtani

    How to add without overwriting

    Vincent Marquez Newbie

      I'm interested in learning the correct way to add data to a node only if the node is empty. My concern is that between checking if an FQN exists, and adding a new object under that specific FQN, data could have been added to the cache.

      I understand there is explicit locking on Node objects, but if the FQN does not exist in the cache, it will return null. Is there a basic pattern or strategy I should be taking to avoid this potential problem? Thanks in advance for any suggestions.