[
https://issues.apache.org/jira/browse/JCRVLT-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16277246#comment-16277246
]
Konrad Windszus commented on JCRVLT-248:
----------------------------------------
With JCRVLT-116 you can already use hooks that leverage OSGi services. For an
example look at
https://github.com/Netcentric/accesscontroltool/blob/develop/accesscontroltool-bundle/src/main/java/biz/netcentric/cq/tools/actool/installhook/AcToolInstallHook.java.
I agree though that registering a hook as an OSGi service itself might have
some advantages (e.g. allows to leverage Declarative Service).
Regarding the related PR I think it would be useful to refer to OSGi service
hooks not only via the bundle symbolic name but also via an optional OSGi
service filter. Also I think instead of iterating through all declared services
of a referenced bundle it would be beneficial to use
{{https://osgi.org/javadoc/r4v43/core/org/osgi/framework/BundleContext.html#getServiceReferences(java.lang.Class,
java.lang.String)}} to only list services implementing {{InstallHook}}.
> Support install hook bundles
> ----------------------------
>
> Key: JCRVLT-248
> URL: https://issues.apache.org/jira/browse/JCRVLT-248
> Project: Jackrabbit FileVault
> Issue Type: Improvement
> Components: Packaging
> Affects Versions: 3.1.42
> Reporter: Tobias Bocanegra
>
> it would be helpful if the package installer could handle install hook
> bundles OR if it could register install "hook" components in the felix admin
> for execution. this would simplify the implementation of hooks that require
> other osgi services for execution.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)