You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Fabio Lattario Fonseca (JIRA)" <ji...@apache.org> on 2012/07/17 23:12:35 UTC

[jira] [Created] (FELIX-3599) Problem with 'subservice action="instantiate"' in ipojo composite

Fabio Lattario Fonseca created FELIX-3599:
---------------------------------------------

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

        

[jira] [Commented] (FELIX-3599) Problem with 'subservice action="instantiate"' in ipojo composite

Posted by "Fabio Lattario Fonseca (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Resolved] (FELIX-3599) Problem with 'subservice action="instantiate"' in ipojo composite

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clement Escoffier resolved FELIX-3599.
--------------------------------------

    Resolution: Fixed
      Assignee: Clement Escoffier

Patch applied on trunk.

Thanks.
                
> 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
>            Assignee: Clement Escoffier
>             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