Hello,

I did some debugging here and found a weird thing in the
ServiceDependencyHandler.java, at the createServiceInstance method. Look:

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

The comment says that it need to remove the instance.name and the component
keys, but the code only removes the instance.name key. Also the or operator
and the other key.equals part are useless. I think there are some
parenthesis missing, like below:


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

Now, it removes both instance.name and component keys. In fact, this
modification solves the issue of this post. Now the subservice instantiate
is working! Can somebody please validate if my modification is right?

Thanks,
Fabio

--
View this message in context: 
http://apache-felix.18485.n6.nabble.com/Problem-with-subservice-action-instantiate-in-ipojo-composite-from-trunk-tp4998162p4998546.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to