[ 
https://issues.apache.org/jira/browse/SLING-7045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16266470#comment-16266470
 ] 

Chetan Mehrotra edited comment on SLING-7045 at 11/27/17 7:48 AM:
------------------------------------------------------------------

bq. I dont understand why simply DS can be used for the other case? Sounds way 
simpler to me

So far I do not know how to use DS as factory for some other type. So instead 
of having the component itself register as a service (via implementing service 
interface) I need it to register a different type. For that I am using activate 
method to register the MetricsService instance

[~cziegeler] Can you provide a rough example of the type of change you are 
thinking about


was (Author: chetanm):
bq. I dont understand why simply DS can be used for the other case? Sounds way 
simpler to me

So far I do not know how to use DS as factory for some other type. So instead 
of having the component itself register as a service (via implementing service 
interface) I need it to register a different type. For that I am using activate 
method to register the MetricsService instance

> OSGi services should be managed by DS
> -------------------------------------
>
>                 Key: SLING-7045
>                 URL: https://issues.apache.org/jira/browse/SLING-7045
>             Project: Sling
>          Issue Type: Improvement
>          Components: Commons
>            Reporter: Carsten Ziegeler
>             Fix For: commons metrics 1.2.4
>
>
> MetricsServiceImpl is currently registering two services in its activate 
> method - there seems to be no real reason doing this manually and the 
> services should rather be registered by DS



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to