Hi Gabriela,
Inside the loop I would save a list of paths to remove. Then, after locating 
everything to delete, loop through the paths to remove, calling remove for 
each. Then it's up to you if you want to save after each or after all of them 
have been removed -  it depends on how many you are removing and how long the 
save takes. 

Beth

> On Jan 21, 2016, at 5:35 AM, Gabriela Matias Navarro <[email protected]> 
> wrote:
> 
> Hello,
> 
> I'm working on a method that deletes some documents using the "removeItem" 
> method from Sessions(link). First the method searchs the documents that needs 
> to be deleted and then it iterates over the list and deletes each one of them 
> and saves the session inside the loop. Since we are using a cluster of 
> jackrabbit instances we are getting some conflicts. I wanted to know if there 
> is a recommendation on where the save session should be(inside the loop or 
> after the loop)? 
> 
> Thanks,
> 
> Gabriela 

Reply via email to