Garbage collector for Sling 7

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Garbage collector for Sling 7

Andrei Zafiu
Hello all,
I am trying to implement a Garbage Collector as a Sling Bundle to cleanup the Jackrabbit repository. I am working with the Sling 7 war version, deployed in a jetty 8.1.15 instance. I have tried to develop the bundle using the information from this url: http://www.astracorp.com/blog/basic_apache_sling_development_patterns


The problem I have is that gc = repositoryManager.createDataStoreGarbageCollector(); always returns null. The issue seems to be related to this: https://issues.apache.org/jira/browse/SLING-2501 which was marked as solve with the JCR Jackrabbit Server 2.1.2 but the Sling 7 instance is shipped with 2.3.0 version of JCR Jackrabbit which has the same problem with the createDataStoreGarbaCollector() method. I have tried to replace the 2.3.0 bundle from Sling with the 2.1.2 and 2.2.0 versions but Sling seems to depend heavily on this bundle and the discovery and authorization services are no longer available which pretty much make the application unusable.
Can you please point me in the right direction for the development of this functionality? I am open to switching to Sling 8 if there is an easier implementation of this functionality.
Thank you for your time,Andrei Zafiu.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Garbage collector for Sling 7

Robert Munteanu-2
Hi Andrei,

On Tue, 2017-05-02 at 21:15 +0000, Andrei Zafiu wrote:

> Hello all,
> I am trying to implement a Garbage Collector as a Sling Bundle to
> cleanup the Jackrabbit repository. I am working with the Sling 7 war
> version, deployed in a jetty 8.1.15 instance. I have tried to develop
> the bundle using the information from this url: http://www.astracorp.
> com/blog/basic_apache_sling_development_patterns
>
>
> The problem I have is that gc =
> repositoryManager.createDataStoreGarbageCollector(); always returns
> null. The issue seems to be related to this: https://issues.apache.or
> g/jira/browse/SLING-2501 which was marked as solve with the JCR
> Jackrabbit Server 2.1.2 but the Sling 7 instance is shipped with
> 2.3.0 version of JCR Jackrabbit which has the same problem with the
> createDataStoreGarbaCollector() method. I have tried to replace the
> 2.3.0 bundle from Sling with the 2.1.2 and 2.2.0 versions but Sling
> seems to depend heavily on this bundle and the discovery and
> authorization services are no longer available which pretty much make
> the application unusable.
> Can you please point me in the right direction for the development of
> this functionality? I am open to switching to Sling 8 if there is an
> easier implementation of this functionality.

I would suggest moving to Sling 8 and implicitly to Oak. The needed
functionality is exposed via JMX under the 'org.apache.jackrabbit.oak'
category.

Robert
Loading...