Hi,

do not close it. This basic rule of thumb applies here as well: "If you
open a ResourceResolver, you close it". And the contrary as well: "If you
get passed an already open ResourceResolver, do not close it".


2017-08-24 22:51 GMT+02:00 Sabyasachi Mukherjee <sabya...@gmail.com>:

> Hi All,
>
> I was playing around with SlingPostProcessor and found an use case where I
> am getting the ResourceResolver from the request in process() method of my
> custom implementation of SlingPostProcessor and using it for some API
> calls.
>
> I am curious to know if we should close the RR if its alive?
>
> As the documentation[0] says, "After the operation has performed its
> changes but before the changes are persistet, all post processors are
> called." , will there be any problem while persisting changes if I close
> the RR in my custom PostProcessor and what is the best practice?
>
>
> [0]
> https://sling.apache.org/apidocs/sling7/org/apache/sling/servlets/post/
> SlingPostProcessor.html
>
> Thanks,
> Sabya
>



-- 
Cheers,
Jörg Hoh,

http://cqdump.wordpress.com
Twitter: @joerghoh

Reply via email to