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

Fabio Lattario Fonseca commented on FELIX-3599:
-----------------------------------------------

Analyzing the ipojo-composite code, I found the lines below in the 
ServiceDependencyHandler.java, on the createServiceInstance method:

     while(keys.hasMoreElements()) { 
        String key = (String) keys.nextElement(); 
        if (! key.equals("instance.name") 
           || key.equals("component")) { // Remove instance.name and component 
              toAppend.put(key, conf.get(key)); 
        } 
     }

Clearly there is a problem with the code or with the comment. I guessed the 
problem was with the code, that I changed to:


     while(keys.hasMoreElements()) { 
        String key = (String) keys.nextElement(); 
        if (! (key.equals("instance.name") 
           || key.equals("component"))) { // Remove instance.name and component 
              toAppend.put(key, conf.get(key)); 
        } 
     }

This change made the composite-tutorial work, so I guess there was a mistake at 
that part of the code where a pair of parenthesis was missing.

Regards,
Fabio

                
> Problem with 'subservice action="instantiate"' in ipojo composite
> -----------------------------------------------------------------
>
>                 Key: FELIX-3599
>                 URL: https://issues.apache.org/jira/browse/FELIX-3599
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: ipojo-composite-1.8.2
>            Reporter: Fabio Lattario Fonseca
>             Fix For: ipojo-composite-1.8.4
>
>
> Since version 1.8.0, there is a problem with the ipojo-composite bundle that 
> prevents the "subservice action=instantiate" action to work properly. This 
> was tested with the composite-tutorial example, downloaded from the iPOJO 
> site. It seemed that the instance could no be created because the handler 
> "requires" was not valid, meaning that the instantiate action was not able to 
> find the right component to bind.

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

        

Reply via email to