[ 
https://issues.apache.org/jira/browse/SLING-4235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler resolved SLING-4235.
-------------------------------------
    Resolution: Won't Fix

> Update adapters documentation with some best practices
> ------------------------------------------------------
>
>                 Key: SLING-4235
>                 URL: https://issues.apache.org/jira/browse/SLING-4235
>             Project: Sling
>          Issue Type: Task
>          Components: Documentation
>            Reporter: Robert Munteanu
>            Assignee: Robert Munteanu
>            Priority: Major
>
> Some content which should find its way to 
> http://sling.apache.org/documentation/the-sling-engine/adapters.html :
> # Adapters are meant primarily for request-time usage ; it's recommended , if 
> at all possible, to depend on OSGi services when working in other OSGi 
> services
> # If the bundle that registers an adapter factory has been wired to the 
> bundle consuming the adapter, it does not mean that the adapter factory is 
> registered(!), since the providing bundle can be in the RESOLVED state.
> # If you want to be certain that a certain adapter factory is registered, you 
> can subscribe to OSGi events fired by the AdapterManager or ( since 2.1.4) 
> declare a dependency on the virtual Adaption service.
> # It's not recommended to register unexported classes as adapters. They will 
> not be visible outside your bundle ; if you need to use such a pattern it's 
> much simpler to have a factory method or a constructor which handles the 
> 'adaption'



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

Reply via email to