Hi Bertrand

I would argue that the extender pattern is still very useful for such
scenarios where bundles provide some sort of meta-information that
should be centrally interpreted.

Two examples in Sling that come to my mind are Sling Models (for model
classes via a manifest header) and Sling JUnit Core (for a test-class
regexp via bundle header and for JUnit Jupiter TestEngines that are
available via java's ServiceLoader). I guess this list is not
exhaustive.

Regards
Julian

On Fri, Jun 25, 2021 at 11:33 AM Bertrand Delacretaz
<[email protected]> wrote:
>
> Hi,
>
> I'm planning to use that pattern for [1], similar to what we do for
> initial content loading, using a BundleTracker [2] to track bundles.
>
> The use case is multiple bundles providing partial GraphQL schemas as
> text file resources to a service that aggregates them.
>
> It's been a long time since I created a module that uses this
> technique, is that still the recommended way of doing such things?
>
> -Bertrand
>
> [1] 
> https://github.com/apache/sling-whiteboard/tree/master/sling-org-apache-sling-graphql-schema
> [2] 
> https://docs.osgi.org/javadoc/r4v42/org/osgi/util/tracker/BundleTracker.html

Reply via email to