Good catch, yes the javadocs is not precise. I'll update it

Thanks
Carsten

Roy Teeuwen wrote
> Hey Carsten,
> 
> Then the javadocs seem a bit wrong to me, no?:
> 
> https://sling.apache.org/apidocs/sling8/org/apache/sling/api/resource/ResourceResolver.html#isLive--
>  
> <https://sling.apache.org/apidocs/sling8/org/apache/sling/api/resource/ResourceResolver.html#isLive-->
> 
> boolean isLive()
> 
> Returns true if this resource resolver has not been closed yet.
> Unlike the other methods defined in this interface, this method will never 
> throw an exception even after the resource resolver has been closed.
> 
> Greetings,
> Roy
> 
>> On 15 Jun 2016, at 13:55, Carsten Ziegeler <cziege...@apache.org> wrote:
>>
>> Roy Teeuwen wrote
>>> Hey,
>>>
>>> Thanks all for the responses. 
>>>
>>> @Paul I would indeed ideally use the HTTP request, but there is no http 
>>> request for the service that I am creating, but indeed that would be the 
>>> best option.
>>>
>>> @Jason Yeah, I am still using the getAdminResourceResolver because it is 
>>> for AEM 5.6.1. When the upgrade is done, these will be removed ;)
>>>
>>> @Carsten Wow, didn’t know about that last thing, then what is the use case 
>>> of the isLive function? Where would you use it then?
>>>
>>
>> The isLive is there to check whether you can still use the resource
>> resolver, for example you got a resource resolver and while you're using
>> it, the JCR provider is removed (or updated). In that case your resolver
>> is not live anymore as one provider is not live anymore.
>>
>> Regards
>> Carsten
>> -- 
>> Carsten Ziegeler
>> Adobe Research Switzerland
>> cziege...@apache.org
> 
> 


 
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org

Reply via email to