You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2009/05/25 14:53:45 UTC

[jira] Created: (FELIX-1177) Components must correctly be disposed off

Components must correctly be disposed off
-----------------------------------------

                 Key: FELIX-1177
                 URL: https://issues.apache.org/jira/browse/FELIX-1177
             Project: Felix
          Issue Type: Bug
          Components: Declarative Services (SCR)
    Affects Versions: scr-1.0.8
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger
             Fix For: scr-1.0.10


When a component is to be disposed off, the following tasks run:

   * unregister the service (if registered)
   * call deactivate method (if any)
   * unbind references

In the current implementation the service unregistration throws an IllegalStateException if the service cannot be unregistered because the registration lock is being held by a nother thread. This exception is forwarded to the caller causing neither the deactivate method being called nor the reference being unbound.

Rather we should continue with the controlled deactivation (and maybe even try to unregister again).

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


[jira] Resolved: (FELIX-1177) Components must correctly be disposed off

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

Felix Meschberger resolved FELIX-1177.
--------------------------------------

    Resolution: Fixed

In Rev. 778511 modified the IllegalStateException handling to log the situation and properly shut down the component regardless of failure to unregister the service or not. If the service fails to unregister in the first attempt, a second one is tried, just in case.

> Components must correctly be disposed off
> -----------------------------------------
>
>                 Key: FELIX-1177
>                 URL: https://issues.apache.org/jira/browse/FELIX-1177
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.8
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: scr-1.0.10
>
>
> When a component is to be disposed off, the following tasks run:
>    * unregister the service (if registered)
>    * call deactivate method (if any)
>    * unbind references
> In the current implementation the service unregistration throws an IllegalStateException if the service cannot be unregistered because the registration lock is being held by a nother thread. This exception is forwarded to the caller causing neither the deactivate method being called nor the reference being unbound.
> Rather we should continue with the controlled deactivation (and maybe even try to unregister again).

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


[jira] Closed: (FELIX-1177) Components must correctly be disposed off

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

Felix Meschberger closed FELIX-1177.
------------------------------------


SCR 1.2.0 has been released. Close all issues.

> Components must correctly be disposed off
> -----------------------------------------
>
>                 Key: FELIX-1177
>                 URL: https://issues.apache.org/jira/browse/FELIX-1177
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.8
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: scr-1.2.0
>
>
> When a component is to be disposed off, the following tasks run:
>    * unregister the service (if registered)
>    * call deactivate method (if any)
>    * unbind references
> In the current implementation the service unregistration throws an IllegalStateException if the service cannot be unregistered because the registration lock is being held by a nother thread. This exception is forwarded to the caller causing neither the deactivate method being called nor the reference being unbound.
> Rather we should continue with the controlled deactivation (and maybe even try to unregister again).

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


[jira] Updated: (FELIX-1177) Components must correctly be disposed off

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

Felix Meschberger updated FELIX-1177:
-------------------------------------

    Fix Version/s:     (was: scr-1.0.10)
                   scr-1.2.0

Retargeting fixes for SCR 1.2.0 release. There will be no 1.0.10 release.

> Components must correctly be disposed off
> -----------------------------------------
>
>                 Key: FELIX-1177
>                 URL: https://issues.apache.org/jira/browse/FELIX-1177
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.8
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: scr-1.2.0
>
>
> When a component is to be disposed off, the following tasks run:
>    * unregister the service (if registered)
>    * call deactivate method (if any)
>    * unbind references
> In the current implementation the service unregistration throws an IllegalStateException if the service cannot be unregistered because the registration lock is being held by a nother thread. This exception is forwarded to the caller causing neither the deactivate method being called nor the reference being unbound.
> Rather we should continue with the controlled deactivation (and maybe even try to unregister again).

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


[jira] Updated: (FELIX-1177) Components must correctly be disposed off

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

Felix Meschberger updated FELIX-1177:
-------------------------------------


Deployed SNAPSHOT version 1.0.9-20090525.212438-1 containing this fix.

> Components must correctly be disposed off
> -----------------------------------------
>
>                 Key: FELIX-1177
>                 URL: https://issues.apache.org/jira/browse/FELIX-1177
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.8
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: scr-1.0.10
>
>
> When a component is to be disposed off, the following tasks run:
>    * unregister the service (if registered)
>    * call deactivate method (if any)
>    * unbind references
> In the current implementation the service unregistration throws an IllegalStateException if the service cannot be unregistered because the registration lock is being held by a nother thread. This exception is forwarded to the caller causing neither the deactivate method being called nor the reference being unbound.
> Rather we should continue with the controlled deactivation (and maybe even try to unregister again).

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