[ 
http://jira.amdatu.org/jira/browse/AMDATU-435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11692#comment-11692
 ] 

Marcel Offermans commented on AMDATU-435:
-----------------------------------------

I mostly want to get rid of all kinds of interfaces that do absolutely nothing. 
If you want to inspect the state of a component, there are other, cleaner ways 
of doing that (for example, using the DM shell which can introspect the state 
in more detail). The biggest question is, what to do with the services that are 
only registered so they can be picked up by for example the REST listener. For 
these, I would indeed propose registering them as Object, because to OSGi 
that's all they are: "handles". I will come up with a piece of text, detailing 
this, and we can go from there. I agree it's no big deal.

About that comment, you now declare a member of the type Component[] and stick 
a single instance in there. Presumably because you don't want the DM to inject 
anything into Component. That behavior you can disable by invoking 
setAutoConfig(Component.class, Boolean.FALSE) on the component.
                
> Small-ish issues after reviewing web.wink
> -----------------------------------------
>
>                 Key: AMDATU-435
>                 URL: http://jira.amdatu.org/jira/browse/AMDATU-435
>             Project: Amdatu
>          Issue Type: Task
>          Components: Amdatu Web
>            Reporter: Marcel Offermans
>
> I reviewed the code in web.wink and have a list of small-ish issues:
> # Why do we register this one as a service? WinkRegistrationService is empty 
> and unused. There are other places where I've seen this, and I would propose 
> we remove all of them. [1]
> # In WinkRegistrationServiceImpl there is a comment that states "Array to 
> prevent dependencyManager from injecting the wrong component". There is a 
> more elegant way to disable injection for a specific type if that's all 
> you're trying to avoid here.
> # Both init() and destroy() clear the map of servlet components. One time is 
> enough.
> [1] In general, if a component needs to be registered in the service registry 
> for other reasons (because it has JAX-RS annotations for example) I would 
> propose we register it as Object instead, and if we really need to further 
> distinguish it, add a property. That saves us lots of marker interfaces, 
> dependencies, etc.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
http://jira.amdatu.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
Amdatu-developers mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-developers

Reply via email to