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 2009/07/02 15:41:48 UTC

[jira] Created: (FELIX-1295) ServiceRegistry decrements service use before ungetService() is called on ServiceFactory

ServiceRegistry decrements service use before ungetService() is called on ServiceFactory
----------------------------------------------------------------------------------------

                 Key: FELIX-1295
                 URL: https://issues.apache.org/jira/browse/FELIX-1295
             Project: Felix
          Issue Type: Bug
          Components: Framework
    Affects Versions: felix-1.8.1
            Reporter: David Bosschaert


The OSGi specification says about the call to ServiceFactory.ungetService():

"The bundle's usage count for that service object must drop to zero 
after this call returns; that is, the bundle is about to release its last 
dependency on the service object."

However the current implementation decrements it just before ungetService() is called.

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


[jira] Closed: (FELIX-1295) ServiceRegistry increments/decrements service use count after/before getService/ungetService() is called on ServiceFactory

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

David Bosschaert closed FELIX-1295.
-----------------------------------


> ServiceRegistry increments/decrements service use count after/before getService/ungetService() is called on ServiceFactory
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1295
>                 URL: https://issues.apache.org/jira/browse/FELIX-1295
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.8.1
>            Reporter: David Bosschaert
>            Assignee: Richard S. Hall
>            Priority: Minor
>             Fix For: felix-2.0.0
>
>
> The OSGi specification says about the call to BundleContext.getService():
> "1 If the service has been unregistered, null is returned.
> 2 The context bundle's use count for this service is incremented by one.
> 3 If the context bundle's use count for the service is currently one and the
> service was registered with an object implementing the ServiceFactory
> interface, the ServiceFactory.getService(Bundle, ServiceRegistration)
> method is called to create a service object for the context bundle."
> The OSGi specification says about the call to ServiceFactory.ungetService():
> "The bundle's usage count for that service object must drop to zero 
> after this call returns; that is, the bundle is about to release its last 
> dependency on the service object."
> However, the current implementation decrements it just after ServiceFactory.getService() and just before ServiceFactory.ungetService().

-- 
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-1295) ServiceRegistry increments/decrements service use count after/before getService/ungetService() is called on ServiceFactory

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

Richard S. Hall edited comment on FELIX-1295 at 7/29/09 1:17 PM:
-----------------------------------------------------------------

I didn't commit this as part of FELIX-1277 because it is sufficiently unrelated and also because I noticed some issues and ended up trying to take a crack at fixing this issue differently. I think it is working now and still passing the TCK. Please close if you are satisfied, thanks!

      was (Author: rickhall):
    I didn't commit this as part of FELIX-1277 because it is sufficiently unrelated and also because I noticed some issues and ended up trying to take a crack at fixing this issue differently. I think it is working now and still passing the TCK.
  
> ServiceRegistry increments/decrements service use count after/before getService/ungetService() is called on ServiceFactory
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1295
>                 URL: https://issues.apache.org/jira/browse/FELIX-1295
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.8.1
>            Reporter: David Bosschaert
>            Assignee: Richard S. Hall
>            Priority: Minor
>             Fix For: felix-2.0.0
>
>
> The OSGi specification says about the call to BundleContext.getService():
> "1 If the service has been unregistered, null is returned.
> 2 The context bundle's use count for this service is incremented by one.
> 3 If the context bundle's use count for the service is currently one and the
> service was registered with an object implementing the ServiceFactory
> interface, the ServiceFactory.getService(Bundle, ServiceRegistration)
> method is called to create a service object for the context bundle."
> The OSGi specification says about the call to ServiceFactory.ungetService():
> "The bundle's usage count for that service object must drop to zero 
> after this call returns; that is, the bundle is about to release its last 
> dependency on the service object."
> However, the current implementation decrements it just after ServiceFactory.getService() and just before ServiceFactory.ungetService().

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


[jira] Resolved: (FELIX-1295) ServiceRegistry increments/decrements service use count after/before getService/ungetService() is called on ServiceFactory

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

Richard S. Hall resolved FELIX-1295.
------------------------------------

    Resolution: Fixed

I didn't commit this as part of FELIX-1277 because it is sufficiently unrelated and also because I noticed some issues and ended up trying to take a crack at fixing this issue differently. I think it is working now and still passing the TCK.

> ServiceRegistry increments/decrements service use count after/before getService/ungetService() is called on ServiceFactory
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1295
>                 URL: https://issues.apache.org/jira/browse/FELIX-1295
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.8.1
>            Reporter: David Bosschaert
>            Assignee: Richard S. Hall
>            Priority: Minor
>             Fix For: felix-2.0.0
>
>
> The OSGi specification says about the call to BundleContext.getService():
> "1 If the service has been unregistered, null is returned.
> 2 The context bundle's use count for this service is incremented by one.
> 3 If the context bundle's use count for the service is currently one and the
> service was registered with an object implementing the ServiceFactory
> interface, the ServiceFactory.getService(Bundle, ServiceRegistration)
> method is called to create a service object for the context bundle."
> The OSGi specification says about the call to ServiceFactory.ungetService():
> "The bundle's usage count for that service object must drop to zero 
> after this call returns; that is, the bundle is about to release its last 
> dependency on the service object."
> However, the current implementation decrements it just after ServiceFactory.getService() and just before ServiceFactory.ungetService().

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


[jira] Updated: (FELIX-1295) ServiceRegistry increments/decrements service use count after/before getService/ungetService() is called on ServiceFactory

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

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

    Description: 
The OSGi specification says about the call to BundleContext.getService():

"1 If the service has been unregistered, null is returned.
2 The context bundle's use count for this service is incremented by one.
3 If the context bundle's use count for the service is currently one and the
service was registered with an object implementing the ServiceFactory
interface, the ServiceFactory.getService(Bundle, ServiceRegistration)
method is called to create a service object for the context bundle."

The OSGi specification says about the call to ServiceFactory.ungetService():

"The bundle's usage count for that service object must drop to zero 
after this call returns; that is, the bundle is about to release its last 
dependency on the service object."

However, the current implementation decrements it just after ServiceFactory.getService() and just before ServiceFactory.ungetService().

  was:
The OSGi specification says about the call to ServiceFactory.ungetService():

"The bundle's usage count for that service object must drop to zero 
after this call returns; that is, the bundle is about to release its last 
dependency on the service object."

However the current implementation decrements it just before ungetService() is called.

       Priority: Minor  (was: Major)
        Summary: ServiceRegistry increments/decrements service use count after/before getService/ungetService() is called on ServiceFactory  (was: ServiceRegistry decrements service use before ungetService() is called on ServiceFactory)

> ServiceRegistry increments/decrements service use count after/before getService/ungetService() is called on ServiceFactory
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1295
>                 URL: https://issues.apache.org/jira/browse/FELIX-1295
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.8.1
>            Reporter: David Bosschaert
>            Assignee: Richard S. Hall
>            Priority: Minor
>             Fix For: felix-2.0.0
>
>
> The OSGi specification says about the call to BundleContext.getService():
> "1 If the service has been unregistered, null is returned.
> 2 The context bundle's use count for this service is incremented by one.
> 3 If the context bundle's use count for the service is currently one and the
> service was registered with an object implementing the ServiceFactory
> interface, the ServiceFactory.getService(Bundle, ServiceRegistration)
> method is called to create a service object for the context bundle."
> The OSGi specification says about the call to ServiceFactory.ungetService():
> "The bundle's usage count for that service object must drop to zero 
> after this call returns; that is, the bundle is about to release its last 
> dependency on the service object."
> However, the current implementation decrements it just after ServiceFactory.getService() and just before ServiceFactory.ungetService().

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


[jira] Commented: (FELIX-1295) ServiceRegistry decrements service use before ungetService() is called on ServiceFactory

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

David Bosschaert commented on FELIX-1295:
-----------------------------------------

The patch I just attached to FELIX-1277 contains a fix for this bug. 

> ServiceRegistry decrements service use before ungetService() is called on ServiceFactory
> ----------------------------------------------------------------------------------------
>
>                 Key: FELIX-1295
>                 URL: https://issues.apache.org/jira/browse/FELIX-1295
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.8.1
>            Reporter: David Bosschaert
>
> The OSGi specification says about the call to ServiceFactory.ungetService():
> "The bundle's usage count for that service object must drop to zero 
> after this call returns; that is, the bundle is about to release its last 
> dependency on the service object."
> However the current implementation decrements it just before ungetService() is called.

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


[jira] Updated: (FELIX-1295) ServiceRegistry decrements service use before ungetService() is called on ServiceFactory

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

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

    Fix Version/s: felix-2.0.0
         Assignee: Richard S. Hall

> ServiceRegistry decrements service use before ungetService() is called on ServiceFactory
> ----------------------------------------------------------------------------------------
>
>                 Key: FELIX-1295
>                 URL: https://issues.apache.org/jira/browse/FELIX-1295
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.8.1
>            Reporter: David Bosschaert
>            Assignee: Richard S. Hall
>             Fix For: felix-2.0.0
>
>
> The OSGi specification says about the call to ServiceFactory.ungetService():
> "The bundle's usage count for that service object must drop to zero 
> after this call returns; that is, the bundle is about to release its last 
> dependency on the service object."
> However the current implementation decrements it just before ungetService() is called.

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