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

Bram de Kruijff commented on AMDATU-472:
----------------------------------------

{quote}
MetaTypeFileInstall:

You probably copied the code that subclasses ServiceTracker, but if you 
override the addingService() method you're not supposed to invoke it's super. 
The point of addingService is that it allows you to examine a newly discovered 
service and decide if you want to add it to the list of tracked services, or 
not. You do that by either returning it, or null. As a side effect, invoking 
super will also do an extra getService(ServiceReference). In short, remove the 
call to super.
{quote}
Yes, this pattern is the same as standard Felix FileInstall. ServiceTracker 
implements ServiceTrackerCustomizer intself. Note that it is not an extra 
getService(ServiceReference) but rather the getService(ServiceReference). 
Anyway. there is no real diff so I replaced it.

{quote}
The members you use in the adding- and removedService are not necessarily 
accessed in a thread safe way. As the ServiceTracker JavaDoc states, these 
methods should be made thread safe.
{quote}
Added synchronization to the metatype tracker callbacks. Also minimized 
synchronization in adapter callbacks due to discussion on mailinglist about 
invoking OSGI api's while holding locks. 

{quote}
The TODO in modifiedService() is correct, you need to handle ranking changes 
there.
{quote}
Fixed with updateToHighestTrackedService call

{quote}
Some if() statements don't have angular brackets around their (conditionally 
executed) statement.
{quote}
Fixed

{quote}
m_configAdminAdaptor might be open when stop() is invoked, in which case it 
won't be closed there.
{quote}
It will as stop() closes the metaTypeServiceTracker which will call 
removedService() resulting in
a close() on configAdminAdaptor

{quote}
Why does the log() method check if m_logServiceTracker equals null (as far as I 
can see it can't be)
{quote}
Removed

{quote}
AttributeDefinitionImpl:

Comment states "Copy if" but it's actually "Copy of". 
MetatypeArtifactInstaller:
{quote}
Fixed

{quote}
class name should be MetaTypeArtifactInstaller (with a capital T), check 
consistency of naming in whole code
line 142: "configuration" will be null there, always causing a NPE (push the 
line below up to solve)
{quote}
Fixed
                
> Add metatype support to fileinstall
> -----------------------------------
>
>                 Key: AMDATU-472
>                 URL: http://jira.amdatu.org/jira/browse/AMDATU-472
>             Project: Amdatu
>          Issue Type: Improvement
>          Components: Amdatu Core
>    Affects Versions: 0.3.0
>            Reporter: Bram de Kruijff
>            Assignee: Bram de Kruijff
>             Fix For: 0.3.0
>
>         Attachments: Activator.java, MetaTypeConfigurationInstaller.java
>
>
> It would smooth-en transition from cfg to metatype if we could also use 
> fileinstall with metatype files during development. Let's investigate if this 
> can easily be added. 

--
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