You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Henry Kuijpers (Jira)" <ji...@apache.org> on 2023/04/25 11:21:00 UTC

[jira] [Created] (SLING-11849) Create osgiContext#unregisterService() for easy unregistering of services

Henry Kuijpers created SLING-11849:
--------------------------------------

             Summary: Create osgiContext#unregisterService() for easy unregistering of services
                 Key: SLING-11849
                 URL: https://issues.apache.org/jira/browse/SLING-11849
             Project: Sling
          Issue Type: Improvement
          Components: Testing
    Affects Versions: Testing OSGi Mock 3.3.6
            Reporter: Henry Kuijpers


Since we can do:

{code:java}
this.underTest = context.registerInjectActivateService(Test.class);
{code}
it would be very useful if we can also do:
{code:java}
context.unregisterService(this.underTest);
{code}
for example.

It would be very convenient to do this, since the OSGi Mock API is easy and simple to write and to be able to unregister services, it would be needed to have a ServiceRegistration<Test> and also a ServiceReference<Test> to be able to call .unregister() on it

If we add this method, then all this logic can be put in this method.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)