Review Request 28751: SLING-4217 - Register OSGi services corresponding to available adapter factories

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Review Request 28751: SLING-4217 - Register OSGi services corresponding to available adapter factories

Robert Munteanu-2

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28751/
-----------------------------------------------------------

Review request for sling.


Repository: sling


Description
-------

SLING-4217 - Register OSGi services corresponding to available adapter factories


Diffs
-----

  bundles/extensions/adapter/pom.xml 1641498
  bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterFactoryDescriptor.java 1641498
  bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java 1641498
  bundles/extensions/adapter/src/test/java/org/apache/sling/adapter/internal/AdapterManagerTest.java 1641498

Diff: https://reviews.apache.org/r/28751/diff/


Testing
-------


Thanks,

Robert Munteanu

Reply | Threaded
Open this post in threaded view
|

Re: Review Request 28751: SLING-4217 - Register OSGi services corresponding to available adapter factories

Felix Meschberger-3
Hi Robert

Thanks for starting the review. Looks like the Adaption interface is missing from the review ?

Regards
Felix

> Am 05.12.2014 um 12:02 schrieb Robert Munteanu <[hidden email]>:
>
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28751/
> -----------------------------------------------------------
>
> Review request for sling.
>
>
> Repository: sling
>
>
> Description
> -------
>
> SLING-4217 - Register OSGi services corresponding to available adapter factories
>
>
> Diffs
> -----
>
>  bundles/extensions/adapter/pom.xml 1641498
>  bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterFactoryDescriptor.java 1641498
>  bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java 1641498
>  bundles/extensions/adapter/src/test/java/org/apache/sling/adapter/internal/AdapterManagerTest.java 1641498
>
> Diff: https://reviews.apache.org/r/28751/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Robert Munteanu
>

Reply | Threaded
Open this post in threaded view
|

Re: Review Request 28751: SLING-4217 - Register OSGi services corresponding to available adapter factories

Robert Munteanu-2
In reply to this post by Robert Munteanu-2

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28751/
-----------------------------------------------------------

(Updated Dec. 5, 2014, 1:11 p.m.)


Review request for sling.


Changes
-------

Added missing Adaption and AdaptionImpl classes


Repository: sling


Description
-------

SLING-4217 - Register OSGi services corresponding to available adapter factories


Diffs (updated)
-----

  bundles/extensions/adapter/pom.xml 1641498
  bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/Adaption.java PRE-CREATION
  bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterFactoryDescriptor.java 1641498
  bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java 1641498
  bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdaptionImpl.java PRE-CREATION
  bundles/extensions/adapter/src/test/java/org/apache/sling/adapter/internal/AdapterManagerTest.java 1641498

Diff: https://reviews.apache.org/r/28751/diff/


Testing
-------


Thanks,

Robert Munteanu

Reply | Threaded
Open this post in threaded view
|

Re: Review Request 28751: SLING-4217 - Register OSGi services corresponding to available adapter factories

Robert Munteanu-2

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28751/
-----------------------------------------------------------

(Updated Dec. 5, 2014, 9:34 p.m.)


Review request for sling.


Changes
-------

Final round of changes, I'm happy with both the cosmetic and functional status.

- reduced log levels to DEBUG for Adaption registration/unregistration
- instead of using a collection to account for the possible of multiple Adaption service instances per AdapaterFactory, just log an ERROR when that happens


Bugs: SLING-4217
    https://issues.apache.org/jira/browse/SLING-4217


Repository: sling


Description (updated)
-------

Extend the AdapterManagerImpl to register OSGi services for the adapter factories that it manages. These services are unregistered when the adapter factories themselves are unregistered.


Diffs (updated)
-----

  bundles/extensions/adapter/pom.xml 1641498
  bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/Adaption.java PRE-CREATION
  bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterFactoryDescriptor.java 1641498
  bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java 1641498
  bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdaptionImpl.java PRE-CREATION
  bundles/extensions/adapter/src/test/java/org/apache/sling/adapter/internal/AdapterManagerTest.java 1641498

Diff: https://reviews.apache.org/r/28751/diff/


Testing (updated)
-------

Minimally enhanced the unit tests, but that only prevents them from failing when the Adaption services are registered.

I've manually tested on a large Sling-based application that services are registered and unregistered as expected, throughout multiple restart of the org.apache.sling.adapter bundle.


Thanks,

Robert Munteanu