You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Alexander Broekhuis (JIRA)" <ji...@apache.org> on 2009/12/09 16:09:18 UTC

[jira] Created: (CXF-2578) Discovery problem when two dependent bundles export interfaces

Discovery problem when two dependent bundles export interfaces
--------------------------------------------------------------

                 Key: CXF-2578
                 URL: https://issues.apache.org/jira/browse/CXF-2578
             Project: CXF
          Issue Type: Bug
          Components: Distributed-OSGi
    Affects Versions: dOSGi-1.1
         Environment: felix-2.0.1
            Reporter: Alexander Broekhuis


I have the following setup:
- first bundle with a common interface (common)
- second bundle with a common interface (commonb)
- client bundle with a service implementing the first common interface (client)
- server bundle with a service implementing the second common interface (server)

Both the client and the server export the implemented interface.
The client service has a tracker to the interface published by the server.
So the interface of the client isn't used.

Further, I use the 1.1 singlebundle distribution.

If I run this situation, the client most of the time does not track any server interface. Stopping the client and the distributed osgi bundle, and then first starting the dosgi bundle, and after that the client, makes the tracker work.

If I remove the remote properties from the client the tracker works. I can start stop any way I want, it keeps finding the server interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2578) Discovery problem when two dependent bundles export interfaces

Posted by "David Bosschaert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789320#action_12789320 ] 

David Bosschaert commented on CXF-2578:
---------------------------------------

Hi Alexander, 
I've finally been able to reproduce this. It definitely has something to do with bundle ordering. It doesn't always show up if the bundle ordering at startup happens to be beneficial. In fact I had never seen it on Windows as the default seems to work there. However when I looked at it with Equinox on Linux the default ordering exposed the problem there.
I will look into fixing this.

In the mean time you can work around this by giving your client bundle a higher start level than the rest. That consistently gives the correct result for me.

> Discovery problem when two dependent bundles export interfaces
> --------------------------------------------------------------
>
>                 Key: CXF-2578
>                 URL: https://issues.apache.org/jira/browse/CXF-2578
>             Project: CXF
>          Issue Type: Bug
>          Components: Distributed-OSGi
>    Affects Versions: dOSGi-1.1
>         Environment: felix-2.0.1
>            Reporter: Alexander Broekhuis
>            Assignee: David Bosschaert
>         Attachments: testcase.tar.gz
>
>
> I have the following setup:
> - first bundle with a common interface (common)
> - second bundle with a common interface (commonb)
> - client bundle with a service implementing the first common interface (client)
> - server bundle with a service implementing the second common interface (server)
> Both the client and the server export the implemented interface.
> The client service has a tracker to the interface published by the server.
> So the interface of the client isn't used.
> Further, I use the 1.1 singlebundle distribution.
> If I run this situation, the client most of the time does not track any server interface. Stopping the client and the distributed osgi bundle, and then first starting the dosgi bundle, and after that the client, makes the tracker work.
> If I remove the remote properties from the client the tracker works. I can start stop any way I want, it keeps finding the server interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-2578) Discovery problem when two dependent bundles export interfaces

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

David Bosschaert updated CXF-2578:
----------------------------------

    Attachment: cxf-dosgi-ri-singlebundle-distribution-1.2-SNAPSHOT.jar

Hi Alexander,
Could you try if you can reproduce the problem with the attached single-bundle distro jar?
Thanks,
David

> Discovery problem when two dependent bundles export interfaces
> --------------------------------------------------------------
>
>                 Key: CXF-2578
>                 URL: https://issues.apache.org/jira/browse/CXF-2578
>             Project: CXF
>          Issue Type: Bug
>          Components: Distributed-OSGi
>    Affects Versions: dOSGi-1.1
>         Environment: felix-2.0.1
>            Reporter: Alexander Broekhuis
>            Assignee: David Bosschaert
>         Attachments: cxf-dosgi-ri-singlebundle-distribution-1.2-SNAPSHOT.jar, testcase.tar.gz
>
>
> I have the following setup:
> - first bundle with a common interface (common)
> - second bundle with a common interface (commonb)
> - client bundle with a service implementing the first common interface (client)
> - server bundle with a service implementing the second common interface (server)
> Both the client and the server export the implemented interface.
> The client service has a tracker to the interface published by the server.
> So the interface of the client isn't used.
> Further, I use the 1.1 singlebundle distribution.
> If I run this situation, the client most of the time does not track any server interface. Stopping the client and the distributed osgi bundle, and then first starting the dosgi bundle, and after that the client, makes the tracker work.
> If I remove the remote properties from the client the tracker works. I can start stop any way I want, it keeps finding the server interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-2578) Discovery problem when two dependent bundles export interfaces

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

David Bosschaert resolved CXF-2578.
-----------------------------------

    Resolution: Fixed

> Discovery problem when two dependent bundles export interfaces
> --------------------------------------------------------------
>
>                 Key: CXF-2578
>                 URL: https://issues.apache.org/jira/browse/CXF-2578
>             Project: CXF
>          Issue Type: Bug
>          Components: Distributed-OSGi
>    Affects Versions: dOSGi-1.1
>         Environment: felix-2.0.1
>            Reporter: Alexander Broekhuis
>            Assignee: David Bosschaert
>         Attachments: cxf-dosgi-ri-multibundle-distribution-1.2-SNAPSHOT.tar.gz, cxf-dosgi-ri-singlebundle-distribution-1.2-SNAPSHOT.jar, testcase.tar.gz
>
>
> I have the following setup:
> - first bundle with a common interface (common)
> - second bundle with a common interface (commonb)
> - client bundle with a service implementing the first common interface (client)
> - server bundle with a service implementing the second common interface (server)
> Both the client and the server export the implemented interface.
> The client service has a tracker to the interface published by the server.
> So the interface of the client isn't used.
> Further, I use the 1.1 singlebundle distribution.
> If I run this situation, the client most of the time does not track any server interface. Stopping the client and the distributed osgi bundle, and then first starting the dosgi bundle, and after that the client, makes the tracker work.
> If I remove the remote properties from the client the tracker works. I can start stop any way I want, it keeps finding the server interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CXF-2578) Discovery problem when two dependent bundles export interfaces

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

David Bosschaert reassigned CXF-2578:
-------------------------------------

    Assignee: David Bosschaert

> Discovery problem when two dependent bundles export interfaces
> --------------------------------------------------------------
>
>                 Key: CXF-2578
>                 URL: https://issues.apache.org/jira/browse/CXF-2578
>             Project: CXF
>          Issue Type: Bug
>          Components: Distributed-OSGi
>    Affects Versions: dOSGi-1.1
>         Environment: felix-2.0.1
>            Reporter: Alexander Broekhuis
>            Assignee: David Bosschaert
>         Attachments: testcase.tar.gz
>
>
> I have the following setup:
> - first bundle with a common interface (common)
> - second bundle with a common interface (commonb)
> - client bundle with a service implementing the first common interface (client)
> - server bundle with a service implementing the second common interface (server)
> Both the client and the server export the implemented interface.
> The client service has a tracker to the interface published by the server.
> So the interface of the client isn't used.
> Further, I use the 1.1 singlebundle distribution.
> If I run this situation, the client most of the time does not track any server interface. Stopping the client and the distributed osgi bundle, and then first starting the dosgi bundle, and after that the client, makes the tracker work.
> If I remove the remote properties from the client the tracker works. I can start stop any way I want, it keeps finding the server interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2578) Discovery problem when two dependent bundles export interfaces

Posted by "David Bosschaert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12788788#action_12788788 ] 

David Bosschaert commented on CXF-2578:
---------------------------------------

So if I understand correctly, you always expect the client to print out the following line:
{code}...
====================== Adding service: org.apache.cxf.dosgi.dsw.handlers.ServiceInvocationHandler@d1e07c
...{code}
but the line doesn't always appear?

Is this the actual problem? 

> Discovery problem when two dependent bundles export interfaces
> --------------------------------------------------------------
>
>                 Key: CXF-2578
>                 URL: https://issues.apache.org/jira/browse/CXF-2578
>             Project: CXF
>          Issue Type: Bug
>          Components: Distributed-OSGi
>    Affects Versions: dOSGi-1.1
>         Environment: felix-2.0.1
>            Reporter: Alexander Broekhuis
>            Assignee: David Bosschaert
>         Attachments: testcase.tar.gz
>
>
> I have the following setup:
> - first bundle with a common interface (common)
> - second bundle with a common interface (commonb)
> - client bundle with a service implementing the first common interface (client)
> - server bundle with a service implementing the second common interface (server)
> Both the client and the server export the implemented interface.
> The client service has a tracker to the interface published by the server.
> So the interface of the client isn't used.
> Further, I use the 1.1 singlebundle distribution.
> If I run this situation, the client most of the time does not track any server interface. Stopping the client and the distributed osgi bundle, and then first starting the dosgi bundle, and after that the client, makes the tracker work.
> If I remove the remote properties from the client the tracker works. I can start stop any way I want, it keeps finding the server interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2578) Discovery problem when two dependent bundles export interfaces

Posted by "Alexander Broekhuis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790623#action_12790623 ] 

Alexander Broekhuis commented on CXF-2578:
------------------------------------------

Hi David,

This seems to work.

Is there also a multibundle file for this?

Thx!

> Discovery problem when two dependent bundles export interfaces
> --------------------------------------------------------------
>
>                 Key: CXF-2578
>                 URL: https://issues.apache.org/jira/browse/CXF-2578
>             Project: CXF
>          Issue Type: Bug
>          Components: Distributed-OSGi
>    Affects Versions: dOSGi-1.1
>         Environment: felix-2.0.1
>            Reporter: Alexander Broekhuis
>            Assignee: David Bosschaert
>         Attachments: cxf-dosgi-ri-singlebundle-distribution-1.2-SNAPSHOT.jar, testcase.tar.gz
>
>
> I have the following setup:
> - first bundle with a common interface (common)
> - second bundle with a common interface (commonb)
> - client bundle with a service implementing the first common interface (client)
> - server bundle with a service implementing the second common interface (server)
> Both the client and the server export the implemented interface.
> The client service has a tracker to the interface published by the server.
> So the interface of the client isn't used.
> Further, I use the 1.1 singlebundle distribution.
> If I run this situation, the client most of the time does not track any server interface. Stopping the client and the distributed osgi bundle, and then first starting the dosgi bundle, and after that the client, makes the tracker work.
> If I remove the remote properties from the client the tracker works. I can start stop any way I want, it keeps finding the server interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-2578) Discovery problem when two dependent bundles export interfaces

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

David Bosschaert updated CXF-2578:
----------------------------------

    Attachment: cxf-dosgi-ri-multibundle-distribution-1.2-SNAPSHOT.tar.gz

Great, thanks for testing this out.
I was able to reproduce your issue with the 1.1 release, but the fix to the discovery activator that I put in at http://svn.apache.org/repos/asf/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/Activator.java revision 888782 consistently fixed this issue for me too.
So the single bundle distro that I attached was actually just trunk that I built (with that fix). I've attached the multi bundle distro from the same build as requested. 

Hopefully this will keep you going for the time being. As mentioned before we're working on refactoring the implementation to be compliant with the Remote Service Admin spec at the moment. Although that work should keep things backward compatible from a user's point of view, the actual implementation details will change


> Discovery problem when two dependent bundles export interfaces
> --------------------------------------------------------------
>
>                 Key: CXF-2578
>                 URL: https://issues.apache.org/jira/browse/CXF-2578
>             Project: CXF
>          Issue Type: Bug
>          Components: Distributed-OSGi
>    Affects Versions: dOSGi-1.1
>         Environment: felix-2.0.1
>            Reporter: Alexander Broekhuis
>            Assignee: David Bosschaert
>         Attachments: cxf-dosgi-ri-multibundle-distribution-1.2-SNAPSHOT.tar.gz, cxf-dosgi-ri-singlebundle-distribution-1.2-SNAPSHOT.jar, testcase.tar.gz
>
>
> I have the following setup:
> - first bundle with a common interface (common)
> - second bundle with a common interface (commonb)
> - client bundle with a service implementing the first common interface (client)
> - server bundle with a service implementing the second common interface (server)
> Both the client and the server export the implemented interface.
> The client service has a tracker to the interface published by the server.
> So the interface of the client isn't used.
> Further, I use the 1.1 singlebundle distribution.
> If I run this situation, the client most of the time does not track any server interface. Stopping the client and the distributed osgi bundle, and then first starting the dosgi bundle, and after that the client, makes the tracker work.
> If I remove the remote properties from the client the tracker works. I can start stop any way I want, it keeps finding the server interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DOSGI-27) Discovery problem when two dependent bundles export interfaces

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

David Bosschaert updated DOSGI-27:
----------------------------------

    Fix Version/s: 1.2

> Discovery problem when two dependent bundles export interfaces
> --------------------------------------------------------------
>
>                 Key: DOSGI-27
>                 URL: https://issues.apache.org/jira/browse/DOSGI-27
>             Project: CXF Distributed OSGi
>          Issue Type: Bug
>         Environment: felix-2.0.1
>            Reporter: Alexander Broekhuis
>            Assignee: David Bosschaert
>             Fix For: 1.2
>
>         Attachments: cxf-dosgi-ri-multibundle-distribution-1.2-SNAPSHOT.tar.gz, cxf-dosgi-ri-singlebundle-distribution-1.2-SNAPSHOT.jar, testcase.tar.gz
>
>
> I have the following setup:
> - first bundle with a common interface (common)
> - second bundle with a common interface (commonb)
> - client bundle with a service implementing the first common interface (client)
> - server bundle with a service implementing the second common interface (server)
> Both the client and the server export the implemented interface.
> The client service has a tracker to the interface published by the server.
> So the interface of the client isn't used.
> Further, I use the 1.1 singlebundle distribution.
> If I run this situation, the client most of the time does not track any server interface. Stopping the client and the distributed osgi bundle, and then first starting the dosgi bundle, and after that the client, makes the tracker work.
> If I remove the remote properties from the client the tracker works. I can start stop any way I want, it keeps finding the server interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-2578) Discovery problem when two dependent bundles export interfaces

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

Alexander Broekhuis updated CXF-2578:
-------------------------------------

    Attachment: testcase.tar.gz

Class files used to test this problem.

The archive contains 4 directories with classes:
- common
- commonb
- server
- client

For each directory a bundle is created.

To run it, 2 targets are needed. The first with common, commonb and the server. The second with common, commonb and the client.

The service tracker prints a "Adding service" or "Remove service" string. There is no other output generated, as the service itself isn't used at all. Only the tracker is used for testing.

> Discovery problem when two dependent bundles export interfaces
> --------------------------------------------------------------
>
>                 Key: CXF-2578
>                 URL: https://issues.apache.org/jira/browse/CXF-2578
>             Project: CXF
>          Issue Type: Bug
>          Components: Distributed-OSGi
>    Affects Versions: dOSGi-1.1
>         Environment: felix-2.0.1
>            Reporter: Alexander Broekhuis
>         Attachments: testcase.tar.gz
>
>
> I have the following setup:
> - first bundle with a common interface (common)
> - second bundle with a common interface (commonb)
> - client bundle with a service implementing the first common interface (client)
> - server bundle with a service implementing the second common interface (server)
> Both the client and the server export the implemented interface.
> The client service has a tracker to the interface published by the server.
> So the interface of the client isn't used.
> Further, I use the 1.1 singlebundle distribution.
> If I run this situation, the client most of the time does not track any server interface. Stopping the client and the distributed osgi bundle, and then first starting the dosgi bundle, and after that the client, makes the tracker work.
> If I remove the remote properties from the client the tracker works. I can start stop any way I want, it keeps finding the server interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2578) Discovery problem when two dependent bundles export interfaces

Posted by "Alexander Broekhuis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12788877#action_12788877 ] 

Alexander Broekhuis commented on CXF-2578:
------------------------------------------

Yes,

With the 1.1 snapshot version the tracker always sees the service being added. With the 1.1 release it doesn't.

> Discovery problem when two dependent bundles export interfaces
> --------------------------------------------------------------
>
>                 Key: CXF-2578
>                 URL: https://issues.apache.org/jira/browse/CXF-2578
>             Project: CXF
>          Issue Type: Bug
>          Components: Distributed-OSGi
>    Affects Versions: dOSGi-1.1
>         Environment: felix-2.0.1
>            Reporter: Alexander Broekhuis
>            Assignee: David Bosschaert
>         Attachments: testcase.tar.gz
>
>
> I have the following setup:
> - first bundle with a common interface (common)
> - second bundle with a common interface (commonb)
> - client bundle with a service implementing the first common interface (client)
> - server bundle with a service implementing the second common interface (server)
> Both the client and the server export the implemented interface.
> The client service has a tracker to the interface published by the server.
> So the interface of the client isn't used.
> Further, I use the 1.1 singlebundle distribution.
> If I run this situation, the client most of the time does not track any server interface. Stopping the client and the distributed osgi bundle, and then first starting the dosgi bundle, and after that the client, makes the tracker work.
> If I remove the remote properties from the client the tracker works. I can start stop any way I want, it keeps finding the server interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2578) Discovery problem when two dependent bundles export interfaces

Posted by "Alexander Broekhuis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791254#action_12791254 ] 

Alexander Broekhuis commented on CXF-2578:
------------------------------------------

Yes for now I have either a workaround, or the bugs are fixed.

Thanks for the multibundle file.

> Discovery problem when two dependent bundles export interfaces
> --------------------------------------------------------------
>
>                 Key: CXF-2578
>                 URL: https://issues.apache.org/jira/browse/CXF-2578
>             Project: CXF
>          Issue Type: Bug
>          Components: Distributed-OSGi
>    Affects Versions: dOSGi-1.1
>         Environment: felix-2.0.1
>            Reporter: Alexander Broekhuis
>            Assignee: David Bosschaert
>         Attachments: cxf-dosgi-ri-multibundle-distribution-1.2-SNAPSHOT.tar.gz, cxf-dosgi-ri-singlebundle-distribution-1.2-SNAPSHOT.jar, testcase.tar.gz
>
>
> I have the following setup:
> - first bundle with a common interface (common)
> - second bundle with a common interface (commonb)
> - client bundle with a service implementing the first common interface (client)
> - server bundle with a service implementing the second common interface (server)
> Both the client and the server export the implemented interface.
> The client service has a tracker to the interface published by the server.
> So the interface of the client isn't used.
> Further, I use the 1.1 singlebundle distribution.
> If I run this situation, the client most of the time does not track any server interface. Stopping the client and the distributed osgi bundle, and then first starting the dosgi bundle, and after that the client, makes the tracker work.
> If I remove the remote properties from the client the tracker works. I can start stop any way I want, it keeps finding the server interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.