Comments on: AEM 6.1 : Get ResourceResolver From ResourceResolverFactory http://www.aemcq5tutorials.com/tutorials/resourceresolver-from-resourceresolverfactory/ Tue, 01 Sep 2020 11:20:15 +0000 hourly 1 https://wordpress.org/?v=6.4.4 By: Ankur Ahlawat http://www.aemcq5tutorials.com/tutorials/resourceresolver-from-resourceresolverfactory/#comment-49473 Thu, 06 Sep 2018 03:26:58 +0000 http://www.aemcq5tutorials.com/?p=1887#comment-49473 In reply to Sunil.

Could you please check that your components and services in bundle are in active state.

]]>
By: Sunil http://www.aemcq5tutorials.com/tutorials/resourceresolver-from-resourceresolverfactory/#comment-49451 Thu, 06 Sep 2018 01:43:27 +0000 http://www.aemcq5tutorials.com/?p=1887#comment-49451 In reply to shivani garg.

I am getting the ResourceResolverFactory object itself as NuLL pointer exception
Even after mapping all the service with bundle symbolic name,service name and creating system user I am still getting NULL pointer exception

]]>
By: Guru http://www.aemcq5tutorials.com/tutorials/resourceresolver-from-resourceresolverfactory/#comment-3051 Fri, 30 Dec 2016 10:04:34 +0000 http://www.aemcq5tutorials.com/?p=1887#comment-3051 Hi, I am not sure if this works for multi threading approach.
Ex: Button Click -> Servlet -> Starts a thread (using ExecutorService) -> Thread calls a Service method -> Service method gets the resource resolver (using the subservice specific to the thread) and adapts to a session class. Finally saves it.

Now in this example, if two threads are started simultaneously, this initiates a concurrent session and if one thread completes before the other the session will be logged out as the Resource resolver is garbage collected. Hence the other thread stops with exception.

The problem i feel is the way we are creating the resource resolver object. Since service objects are singleton, you are basically creating the resource resolver with the same resource resolver factory object.

If there any approach to tackle this scenario

]]>
By: shivani garg http://www.aemcq5tutorials.com/tutorials/resourceresolver-from-resourceresolverfactory/#comment-3047 Tue, 27 Dec 2016 13:02:18 +0000 http://www.aemcq5tutorials.com/?p=1887#comment-3047 In reply to pavan.

Hi Pavan,
We can’t use this method, because it is a deprecated method.

]]>
By: pavan http://www.aemcq5tutorials.com/tutorials/resourceresolver-from-resourceresolverfactory/#comment-3046 Mon, 26 Dec 2016 12:17:26 +0000 http://www.aemcq5tutorials.com/?p=1887#comment-3046 Why we have to get resource Resolver in this way why not resolverFactory.getAdministrativeResourceResolver(null); this way?

Is there any specific reason for this?

]]>
By: Mayank http://www.aemcq5tutorials.com/tutorials/resourceresolver-from-resourceresolverfactory/#comment-2549 Thu, 01 Dec 2016 05:12:24 +0000 http://www.aemcq5tutorials.com/?p=1887#comment-2549 Hi,
Can anyone please share something easy step by step tutorial for campaigning.

]]>
By: Apil Tamang http://www.aemcq5tutorials.com/tutorials/resourceresolver-from-resourceresolverfactory/#comment-2129 Wed, 31 Aug 2016 18:37:50 +0000 http://www.aemcq5tutorials.com/?p=1887#comment-2129 The method: getResourceResolver(param) did not work for me. However, what worked was to use the ‘getServiceResourceResolver(param)’ method.

]]>
By: Richa http://www.aemcq5tutorials.com/tutorials/resourceresolver-from-resourceresolverfactory/#comment-1733 Fri, 03 Jun 2016 09:49:51 +0000 http://www.aemcq5tutorials.com/?p=1887#comment-1733 Nice Blog..Keep on posting your experience.

]]>
By: Manisha http://www.aemcq5tutorials.com/tutorials/resourceresolver-from-resourceresolverfactory/#comment-1531 Fri, 01 Apr 2016 08:45:35 +0000 http://www.aemcq5tutorials.com/?p=1887#comment-1531 Nice blog…:)

]]>