You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "David Bosschaert (JIRA)" <ji...@apache.org> on 2008/11/04 19:04:46 UTC

[jira] Created: (FELIX-804) Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project

Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project
------------------------------------------------------------------------------------------

                 Key: FELIX-804
                 URL: https://issues.apache.org/jira/browse/FELIX-804
             Project: Felix
          Issue Type: New Feature
          Components: Framework
            Reporter: David Bosschaert


This bug relates to https://issues.apache.org/jira/browse/CXF-1897
The CXF DOSGi project contains an implementation of the ListenerHook of RFC 126. This could should move into Felix.

See also: http://www.mail-archive.com/dev@felix.apache.org/msg06475.html

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


[jira] Commented: (FELIX-804) Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647712#action_12647712 ] 

Richard S. Hall commented on FELIX-804:
---------------------------------------

Agreed that package protected is different than public, but it still is exposing stuff to other members in the package that you intend to be implementation details. Further, it seems odd to me that you'd want your test cases to depend on implementation details, because if you changed those details you also need to change your test cases. Regardless, I understand the conflict created and am just not quite sure I want to deal with it yet. :-)

> Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-804
>                 URL: https://issues.apache.org/jira/browse/FELIX-804
>             Project: Felix
>          Issue Type: New Feature
>          Components: Framework
>    Affects Versions: felix-1.4.0
>            Reporter: David Bosschaert
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.1
>
>         Attachments: ListenerHook.patch
>
>
> This bug relates to https://issues.apache.org/jira/browse/CXF-1897
> The CXF DOSGi project contains an implementation of the ListenerHook of RFC 126. This could should move into Felix.
> See also: http://www.mail-archive.com/dev@felix.apache.org/msg06475.html

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


[jira] Resolved: (FELIX-804) Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project

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

Richard S. Hall resolved FELIX-804.
-----------------------------------

    Resolution: Fixed

I have committed a modified version of the patch. I fixed some issues around concurrency and also some stylistic issues around naming. I debated committing the unit tests, but for the time being decided against it. I did not like the fact that the unit tests forced me to expose methods that should be private. I am not sure if this is a limitation of unit tests in general or if the unit tests should be modified.

David, I deployed snapshots too. Could you please check to see if everything works for you? If so, please close this issue and thanks a lot!

> Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-804
>                 URL: https://issues.apache.org/jira/browse/FELIX-804
>             Project: Felix
>          Issue Type: New Feature
>          Components: Framework
>    Affects Versions: felix-1.4.0
>            Reporter: David Bosschaert
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.1
>
>         Attachments: ListenerHook.patch
>
>
> This bug relates to https://issues.apache.org/jira/browse/CXF-1897
> The CXF DOSGi project contains an implementation of the ListenerHook of RFC 126. This could should move into Felix.
> See also: http://www.mail-archive.com/dev@felix.apache.org/msg06475.html

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


[jira] Commented: (FELIX-804) Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project

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

David Bosschaert commented on FELIX-804:
----------------------------------------

Many thanks Richard. I'll check asap whether it works with the D-OSGi stuff in CXF. 

BTW, yeah in many cases junit tests cause methods (and sometimes members) to become package protected (unless you use reflection). I have personally never found this to be an issue, since package protected is very different from being public.

> Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-804
>                 URL: https://issues.apache.org/jira/browse/FELIX-804
>             Project: Felix
>          Issue Type: New Feature
>          Components: Framework
>    Affects Versions: felix-1.4.0
>            Reporter: David Bosschaert
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.1
>
>         Attachments: ListenerHook.patch
>
>
> This bug relates to https://issues.apache.org/jira/browse/CXF-1897
> The CXF DOSGi project contains an implementation of the ListenerHook of RFC 126. This could should move into Felix.
> See also: http://www.mail-archive.com/dev@felix.apache.org/msg06475.html

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


[jira] Updated: (FELIX-804) Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project

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

Richard S. Hall updated FELIX-804:
----------------------------------

    Affects Version/s: felix-1.4.0
        Fix Version/s: felix-1.4.1

> Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-804
>                 URL: https://issues.apache.org/jira/browse/FELIX-804
>             Project: Felix
>          Issue Type: New Feature
>          Components: Framework
>    Affects Versions: felix-1.4.0
>            Reporter: David Bosschaert
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.1
>
>         Attachments: ListenerHook.patch
>
>
> This bug relates to https://issues.apache.org/jira/browse/CXF-1897
> The CXF DOSGi project contains an implementation of the ListenerHook of RFC 126. This could should move into Felix.
> See also: http://www.mail-archive.com/dev@felix.apache.org/msg06475.html

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


[jira] Issue Comment Edited: (FELIX-804) Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project

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

bosschaert edited comment on FELIX-804 at 11/14/08 2:10 PM:
------------------------------------------------------------------

I guess thats the difference between unit tests and functional tests/system tests. In unit tests you *are* actually testing your implementation details. They are just a way to automatically check that what you've implemented behaves exactly like you've designed it, while in functional tests you're exercising the end user's view. So in my view unit tests are supposed to break when you change implementation details, while functional tests are supposed to remain green. 
I guess I personally always like unit tests because they give me great sleep at night. They tell me that stuff that I wrote works the way I intended it. With functional tests it is sometimes harder to get that level of confidence, as certain conditions are hard to control on that level - think of a caching implementation. That would be hard to test on a functional level.
Anyway, it's probably all down to whatever you like best :)

      was (Author: bosschaert):
    I guess thats the difference between unit tests and functional tests/system tests. In unit tests you *are* actually testing your implementation details. They are just a way to automatically check that what you've implemented behaves exactly like you've designed it, while in functional tests you're exercising the end user's view. So in my view unit tests are supposed to break when you change implementation details, while functional tests are supposed to remain green. 
I guess I personally always like unit tests because they give me great sleep at night. They tell me that stuff that I wrote works the way I intended it. With functional tests it is sometimes harder to get that level of confidence, as certain conditions are hard to control on that level - think of a caching implementation. That would be hard to test on a functional level.
Anyway, it's probably all a matter of taste :)
  
> Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-804
>                 URL: https://issues.apache.org/jira/browse/FELIX-804
>             Project: Felix
>          Issue Type: New Feature
>          Components: Framework
>    Affects Versions: felix-1.4.0
>            Reporter: David Bosschaert
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.1
>
>         Attachments: ListenerHook.patch
>
>
> This bug relates to https://issues.apache.org/jira/browse/CXF-1897
> The CXF DOSGi project contains an implementation of the ListenerHook of RFC 126. This could should move into Felix.
> See also: http://www.mail-archive.com/dev@felix.apache.org/msg06475.html

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


[jira] Commented: (FELIX-804) Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project

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

David Bosschaert commented on FELIX-804:
----------------------------------------

I guess thats the difference between unit tests and functional tests/system tests. In unit tests you *are* actually testing your implementation details. They are just a way to automatically check that what you've implemented behaves exactly like you've designed it, while in functional tests you're exercising the end user's view. So in my view unit tests are supposed to break when you change implementation details, while functional tests are supposed to remain green. 
I guess I personally always like unit tests because they give me great sleep at night. They tell me that stuff that I wrote works the way I intended it. With functional tests it is sometimes harder to get that level of confidence, as certain conditions are hard to control on that level - think of a caching implementation. That would be hard to test on a functional level.
Anyway, it's probably all a matter of taste :)

> Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-804
>                 URL: https://issues.apache.org/jira/browse/FELIX-804
>             Project: Felix
>          Issue Type: New Feature
>          Components: Framework
>    Affects Versions: felix-1.4.0
>            Reporter: David Bosschaert
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.1
>
>         Attachments: ListenerHook.patch
>
>
> This bug relates to https://issues.apache.org/jira/browse/CXF-1897
> The CXF DOSGi project contains an implementation of the ListenerHook of RFC 126. This could should move into Felix.
> See also: http://www.mail-archive.com/dev@felix.apache.org/msg06475.html

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


[jira] Assigned: (FELIX-804) Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project

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

Richard S. Hall reassigned FELIX-804:
-------------------------------------

    Assignee: Richard S. Hall

> Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-804
>                 URL: https://issues.apache.org/jira/browse/FELIX-804
>             Project: Felix
>          Issue Type: New Feature
>          Components: Framework
>            Reporter: David Bosschaert
>            Assignee: Richard S. Hall
>         Attachments: ListenerHook.patch
>
>
> This bug relates to https://issues.apache.org/jira/browse/CXF-1897
> The CXF DOSGi project contains an implementation of the ListenerHook of RFC 126. This could should move into Felix.
> See also: http://www.mail-archive.com/dev@felix.apache.org/msg06475.html

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


[jira] Updated: (FELIX-804) Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project

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

David Bosschaert updated FELIX-804:
-----------------------------------

    Attachment: ListenerHook.patch

The ListenerHook.patch file contains an implementation of the OSGi RFC 126 ListenerHook mechanism (see http://www.osgi.org/download/osgi-4.2-early-draft.pdf).
The patch is created with a Felix Trunk checkout from Nov 12, 2008. 

The patch contains code from the originally part of the DOSGi code in CXF (http://svn.apache.org/repos/asf/cxf/sandbox/dosgi) written by Sergey Beryozkin, reapplied to the Felix trunk.

Couple of notes regarding the patch:
* It contains a new interface org.osgi.framework.hooks.service.ListenerHook. This and its embedded ListenerInfo are new interfaces that are part of the OSGi 4.2 Core specification (part of RFC 126)
* There is also a new org.osgi.framework.ServiceException class, which is also part of OSGi 4.2
* Because of the changes to org.osgi.core, the dependency to that component in framework/pom.xml has been updated to 1.3.0-SNAPSHOT (from 1.2.0). I was wondering, should it not move to 1.4.1-SNAPSHOT or something?

Unit tests are included for all code changes except for the changes to the org.apache.felix.framework.Felix class. Because all member variables of this class are Private its currently impossible to write unit tests for parts of it. I would happily volunteer to make this class unit-testable if this is considered to be a good idea.

The patch contains new files (which sometimes causes problems with older patch application tools). It was created with Tortoise 1.5.0.

> Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-804
>                 URL: https://issues.apache.org/jira/browse/FELIX-804
>             Project: Felix
>          Issue Type: New Feature
>          Components: Framework
>            Reporter: David Bosschaert
>         Attachments: ListenerHook.patch
>
>
> This bug relates to https://issues.apache.org/jira/browse/CXF-1897
> The CXF DOSGi project contains an implementation of the ListenerHook of RFC 126. This could should move into Felix.
> See also: http://www.mail-archive.com/dev@felix.apache.org/msg06475.html

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


[jira] Closed: (FELIX-804) Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project

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

David Bosschaert closed FELIX-804.
----------------------------------


This is now available on trunk.

> Incorporate the Service Registry ListenerHook (RFC 126) work done in the CXF DOSGi project
> ------------------------------------------------------------------------------------------
>
>                 Key: FELIX-804
>                 URL: https://issues.apache.org/jira/browse/FELIX-804
>             Project: Felix
>          Issue Type: New Feature
>          Components: Framework
>    Affects Versions: felix-1.4.0
>            Reporter: David Bosschaert
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.1
>
>         Attachments: ListenerHook.patch
>
>
> This bug relates to https://issues.apache.org/jira/browse/CXF-1897
> The CXF DOSGi project contains an implementation of the ListenerHook of RFC 126. This could should move into Felix.
> See also: http://www.mail-archive.com/dev@felix.apache.org/msg06475.html

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