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

[jira] Created: (FELIX-1166) SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests

SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests
------------------------------------------------------------------------

                 Key: FELIX-1166
                 URL: https://issues.apache.org/jira/browse/FELIX-1166
             Project: Felix
          Issue Type: Bug
          Components: Declarative Services (SCR)
    Affects Versions: scr-1.0.8
            Reporter: Bertrand Delacretaz
         Attachments: FELIX-1166-reproduce.patch

I'm testing the Sling jcrinstall module using Pax Exam, and the SCR reference shown below is not rebound after stopping and restarting the org.apache.felix.configadmin bundle, and waiting up to 5 seconds.

The reference is declared like this in the OsgiControllerImpl class:

    /** @scr.reference cardinality="0..1" policy="dynamic" */
    private ConfigurationAdmin configAdmin;

To reproduce, apply the attached patch to revision 776315 of  http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/extensions/jcrinstall, and run the tests with mvn clean install.

The OsgiControllerTest.testDeferredConfigInstall test then fails, because the ConfigurationAdmin service is not rebound to the OsgiControllerImpl class, after waiting up to 5 seconds for that to happen.




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


[jira] Commented: (FELIX-1166) SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712899#action_12712899 ] 

Felix Meschberger commented on FELIX-1166:
------------------------------------------

I found the problem: after previous rework the bound services are not really unbound as of serviceChanged: the unbind method is called but the DependencyManager keeps the service instance instead of ungetting it by calling the BundleContext.ungetService method.

This is only of importance if the reference is dynamic and optional or a replacement service is available. If the reference is static, the component is scheduled for deactivation (or reactivation if a replacement service is available) and thus ungetting the service anyway. If the reference is dynamic but required, the component will also be deactivated because it is not satisifed any longer.

Fixed this issue in Rev. 778604 and deployed new SNAPSHOT version  1.0.9-20090526.081005-3

> SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests
> ------------------------------------------------------------------------
>
>                 Key: FELIX-1166
>                 URL: https://issues.apache.org/jira/browse/FELIX-1166
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.8
>            Reporter: Bertrand Delacretaz
>            Assignee: Felix Meschberger
>         Attachments: FELIX-1166-reproduce.patch
>
>
> I'm testing the Sling jcrinstall module using Pax Exam, and the SCR reference shown below is not rebound after stopping and restarting the org.apache.felix.configadmin bundle, and waiting up to 5 seconds.
> The reference is declared like this in the OsgiControllerImpl class:
>     /** @scr.reference cardinality="0..1" policy="dynamic" */
>     private ConfigurationAdmin configAdmin;
> To reproduce, apply the attached patch to revision 776315 of  http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/extensions/jcrinstall, and run the tests with mvn clean install.
> The OsgiControllerTest.testDeferredConfigInstall test then fails, because the ConfigurationAdmin service is not rebound to the OsgiControllerImpl class, after waiting up to 5 seconds for that to happen.

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


[jira] Closed: (FELIX-1166) SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests

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

Felix Meschberger closed FELIX-1166.
------------------------------------


SCR 1.2.0 has been released. Close all issues.

> SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests
> ------------------------------------------------------------------------
>
>                 Key: FELIX-1166
>                 URL: https://issues.apache.org/jira/browse/FELIX-1166
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.8
>            Reporter: Bertrand Delacretaz
>            Assignee: Felix Meschberger
>             Fix For: scr-1.2.0
>
>         Attachments: FELIX-1166-reproduce.patch
>
>
> I'm testing the Sling jcrinstall module using Pax Exam, and the SCR reference shown below is not rebound after stopping and restarting the org.apache.felix.configadmin bundle, and waiting up to 5 seconds.
> The reference is declared like this in the OsgiControllerImpl class:
>     /** @scr.reference cardinality="0..1" policy="dynamic" */
>     private ConfigurationAdmin configAdmin;
> To reproduce, apply the attached patch to revision 776315 of  http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/extensions/jcrinstall, and run the tests with mvn clean install.
> The OsgiControllerTest.testDeferredConfigInstall test then fails, because the ConfigurationAdmin service is not rebound to the OsgiControllerImpl class, after waiting up to 5 seconds for that to happen.

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


[jira] Updated: (FELIX-1166) SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests

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

Felix Meschberger updated FELIX-1166:
-------------------------------------

    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.

> SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests
> ------------------------------------------------------------------------
>
>                 Key: FELIX-1166
>                 URL: https://issues.apache.org/jira/browse/FELIX-1166
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.8
>            Reporter: Bertrand Delacretaz
>            Assignee: Felix Meschberger
>             Fix For: scr-1.2.0
>
>         Attachments: FELIX-1166-reproduce.patch
>
>
> I'm testing the Sling jcrinstall module using Pax Exam, and the SCR reference shown below is not rebound after stopping and restarting the org.apache.felix.configadmin bundle, and waiting up to 5 seconds.
> The reference is declared like this in the OsgiControllerImpl class:
>     /** @scr.reference cardinality="0..1" policy="dynamic" */
>     private ConfigurationAdmin configAdmin;
> To reproduce, apply the attached patch to revision 776315 of  http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/extensions/jcrinstall, and run the tests with mvn clean install.
> The OsgiControllerTest.testDeferredConfigInstall test then fails, because the ConfigurationAdmin service is not rebound to the OsgiControllerImpl class, after waiting up to 5 seconds for that to happen.

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


[jira] Commented: (FELIX-1166) SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710740#action_12710740 ] 

Bertrand Delacretaz commented on FELIX-1166:
--------------------------------------------

Note that this should not be related to Pax Exam, but I'm mentioning it as the rebinding mechanism seems to generally work in SCR 1.0.8, so there might be a weirdness related to this particular testing environment.

> SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests
> ------------------------------------------------------------------------
>
>                 Key: FELIX-1166
>                 URL: https://issues.apache.org/jira/browse/FELIX-1166
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.8
>            Reporter: Bertrand Delacretaz
>         Attachments: FELIX-1166-reproduce.patch
>
>
> I'm testing the Sling jcrinstall module using Pax Exam, and the SCR reference shown below is not rebound after stopping and restarting the org.apache.felix.configadmin bundle, and waiting up to 5 seconds.
> The reference is declared like this in the OsgiControllerImpl class:
>     /** @scr.reference cardinality="0..1" policy="dynamic" */
>     private ConfigurationAdmin configAdmin;
> To reproduce, apply the attached patch to revision 776315 of  http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/extensions/jcrinstall, and run the tests with mvn clean install.
> The OsgiControllerTest.testDeferredConfigInstall test then fails, because the ConfigurationAdmin service is not rebound to the OsgiControllerImpl class, after waiting up to 5 seconds for that to happen.

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


[jira] Updated: (FELIX-1166) SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests

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

Bertrand Delacretaz updated FELIX-1166:
---------------------------------------

    Attachment: FELIX-1166-reproduce.patch

Sling jcrinstall patch to reproduce the problem

> SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests
> ------------------------------------------------------------------------
>
>                 Key: FELIX-1166
>                 URL: https://issues.apache.org/jira/browse/FELIX-1166
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.8
>            Reporter: Bertrand Delacretaz
>         Attachments: FELIX-1166-reproduce.patch
>
>
> I'm testing the Sling jcrinstall module using Pax Exam, and the SCR reference shown below is not rebound after stopping and restarting the org.apache.felix.configadmin bundle, and waiting up to 5 seconds.
> The reference is declared like this in the OsgiControllerImpl class:
>     /** @scr.reference cardinality="0..1" policy="dynamic" */
>     private ConfigurationAdmin configAdmin;
> To reproduce, apply the attached patch to revision 776315 of  http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/extensions/jcrinstall, and run the tests with mvn clean install.
> The OsgiControllerTest.testDeferredConfigInstall test then fails, because the ConfigurationAdmin service is not rebound to the OsgiControllerImpl class, after waiting up to 5 seconds for that to happen.

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


[jira] Assigned: (FELIX-1166) SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests

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

Felix Meschberger reassigned FELIX-1166:
----------------------------------------

    Assignee: Felix Meschberger

> SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests
> ------------------------------------------------------------------------
>
>                 Key: FELIX-1166
>                 URL: https://issues.apache.org/jira/browse/FELIX-1166
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.8
>            Reporter: Bertrand Delacretaz
>            Assignee: Felix Meschberger
>         Attachments: FELIX-1166-reproduce.patch
>
>
> I'm testing the Sling jcrinstall module using Pax Exam, and the SCR reference shown below is not rebound after stopping and restarting the org.apache.felix.configadmin bundle, and waiting up to 5 seconds.
> The reference is declared like this in the OsgiControllerImpl class:
>     /** @scr.reference cardinality="0..1" policy="dynamic" */
>     private ConfigurationAdmin configAdmin;
> To reproduce, apply the attached patch to revision 776315 of  http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/extensions/jcrinstall, and run the tests with mvn clean install.
> The OsgiControllerTest.testDeferredConfigInstall test then fails, because the ConfigurationAdmin service is not rebound to the OsgiControllerImpl class, after waiting up to 5 seconds for that to happen.

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


[jira] Commented: (FELIX-1166) SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712807#action_12712807 ] 

Felix Meschberger commented on FELIX-1166:
------------------------------------------

Could you test the SNAPSHOT version 1.0.9-20090525.214658-2 I have just deployed. This contains a number of concurrency and service binding fixes and may by that matter also fix this issue.

> SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests
> ------------------------------------------------------------------------
>
>                 Key: FELIX-1166
>                 URL: https://issues.apache.org/jira/browse/FELIX-1166
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.8
>            Reporter: Bertrand Delacretaz
>         Attachments: FELIX-1166-reproduce.patch
>
>
> I'm testing the Sling jcrinstall module using Pax Exam, and the SCR reference shown below is not rebound after stopping and restarting the org.apache.felix.configadmin bundle, and waiting up to 5 seconds.
> The reference is declared like this in the OsgiControllerImpl class:
>     /** @scr.reference cardinality="0..1" policy="dynamic" */
>     private ConfigurationAdmin configAdmin;
> To reproduce, apply the attached patch to revision 776315 of  http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/extensions/jcrinstall, and run the tests with mvn clean install.
> The OsgiControllerTest.testDeferredConfigInstall test then fails, because the ConfigurationAdmin service is not rebound to the OsgiControllerImpl class, after waiting up to 5 seconds for that to happen.

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


[jira] Resolved: (FELIX-1166) SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests

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

Felix Meschberger resolved FELIX-1166.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: scr-1.0.10

Ungetting the service after unbinding it solves the issue for me.

Please close this issue, if it also fixes your problem. Thanks.

> SCR does not rebind ConfigurationAdmin service in Sling jcrinstall tests
> ------------------------------------------------------------------------
>
>                 Key: FELIX-1166
>                 URL: https://issues.apache.org/jira/browse/FELIX-1166
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.8
>            Reporter: Bertrand Delacretaz
>            Assignee: Felix Meschberger
>             Fix For: scr-1.0.10
>
>         Attachments: FELIX-1166-reproduce.patch
>
>
> I'm testing the Sling jcrinstall module using Pax Exam, and the SCR reference shown below is not rebound after stopping and restarting the org.apache.felix.configadmin bundle, and waiting up to 5 seconds.
> The reference is declared like this in the OsgiControllerImpl class:
>     /** @scr.reference cardinality="0..1" policy="dynamic" */
>     private ConfigurationAdmin configAdmin;
> To reproduce, apply the attached patch to revision 776315 of  http://svn.apache.org/repos/asf/incubator/sling/trunk/contrib/extensions/jcrinstall, and run the tests with mvn clean install.
> The OsgiControllerTest.testDeferredConfigInstall test then fails, because the ConfigurationAdmin service is not rebound to the OsgiControllerImpl class, after waiting up to 5 seconds for that to happen.

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