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 2007/09/18 16:31:44 UTC

[jira] Closed: (FELIX-112) activate() calls do not match with deactivate() calls for a delayed component (immediate="false") and service instances are multiple (although there is no factory)

     [ https://issues.apache.org/jira/browse/FELIX-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed FELIX-112.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.0

According to Didier, this issue has been solved with the refactorings of the bundle over the last few month.

Therefore, I close this bug fixed.

> activate() calls do not match with deactivate() calls for a delayed component (immediate="false") and service instances are multiple (although there is no factory)
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-112
>                 URL: https://issues.apache.org/jira/browse/FELIX-112
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services
>    Affects Versions: 0.8.0
>         Environment: WinXP, Sun JDK 5.0
>            Reporter: Didier DONSEZ
>             Fix For: 1.0.0
>
>
> activate() calls do not match with deactivate() calls for a delayed component (immediate="false")
> and service instances are multiple (although there is no factory)
> See the first trace.
> If the component is immediate (immediate="false"), the behavior is correct : see the second trace.
> The instance is the same singleton for the two clients.
> Didier
> ========================
> TRACE WITH immediate="false"
> ========================
> <?xml version="1.0" encoding="UTF-8"?>
> <component name="Hello.Service" immediate="false">
> 	<!-- for immediate="false", see 112.5.4 Delayed Component -->
> 	<implementation class="fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl"/>
> 	<property name="language" value="fr"/>
> 	<service>
> 		<provide interface="fr.imag.adele.bundle.hello.HelloService"/>
> 	</service>
> </component>
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (0.8.0.SNAPSHOT)
> [   1] [Active     ] [    1] ShellService (0.8.0.SNAPSHOT)
> [   2] [Active     ] [    1] ShellTUI (0.8.0.SNAPSHOT)
> [   3] [Active     ] [    1] BundleRepository (0.8.0.SNAPSHOT)
> [   4] [Active     ] [    1] servlet (2.1)
> [   5] [Active     ] [    1] osgi.compendium (4)
> [   6] [Active     ] [    1] Service Component Runtime (0.8.0.SNAPSHOT)
> [   7] [Resolved   ] [    1] Hello Service Specification 1.2 (0.3.0)
> [   8] [Resolved   ] [    1] Hello Command (with SCR) (0.1.0)
> [   9] [Resolved   ] [    1] Hello Service Impl 1.1 SCR (0.1.0)
> [  10] [Resolved   ] [    1] Hello Requester Impl 1.1 SCR (0.1.0)
> -> start 9
> --- [Hello.Service] Validated and registered component
> --- [Hello.Service] ManagerFactory.createManager
> --- [Hello.Service] Enabling component
> --- [Hello.Service] State transition : CREATING -> CREATED
> --- [Hello.Service] State transition : CREATED -> VALIDATING
> --- [Hello.Service] State transition : VALIDATING -> VALID
> --- [Hello.Service] registering services
> -> start 8
> --- [Hello.Cmd] Validated and registered component
> --- [Hello.Cmd] ManagerFactory.createManager
> --- [Hello.Cmd] Enabling component
> --- [Hello.Cmd] State transition : CREATING -> CREATED
> --- [Hello.Cmd] State transition : CREATED -> VALIDATING
> --- [Hello.Cmd] State transition : VALIDATING -> VALID
> --- [Hello.Cmd] registering services
> --- [Hello.Cmd] DelayedComponentServiceFactory.getService()
> --- [Hello.Service] DelayedComponentServiceFactory.getService()
> (Bundle #9) call activate
> (Bundle #8) call activate
> -> hello Didier
> Hello  Didier (from fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@e83912) !!
> -> stop 8
> --- [Hello.Cmd] State transition : VALID -> DESTROYING
> --- [Hello.Cmd] unregistering the services
> (Bundle #8) call deactivate
> --- [Hello.Cmd] getting unbind: unbindHelloService
> --- [Hello.Cmd] State transition : DESTROYING -> DESTROYED
> -> start 8
> --- [Hello.Cmd] Validated and registered component
> --- [Hello.Cmd] ManagerFactory.createManager
> --- [Hello.Cmd] Enabling component
> --- [Hello.Cmd] State transition : CREATING -> CREATED
> --- [Hello.Cmd] State transition : CREATED -> VALIDATING
> --- [Hello.Cmd] State transition : VALIDATING -> VALID
> --- [Hello.Cmd] registering services
> --- [Hello.Cmd] DelayedComponentServiceFactory.getService()
> --- [Hello.Service] DelayedComponentServiceFactory.getService()
> (Bundle #9) call activate
> (Bundle #8) call activate
> -> hello Rick
> Hello  Rick (from fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@7ffe01) !!
> -> start 10
> --- [Hello.Requester.11] Validated and registered component
> --- [Hello.Requester.11] ManagerFactory.createManager
> --- [Hello.Requester.11] Enabling component
> --- [Hello.Requester.11] State transition : CREATING -> CREATED
> --- [Hello.Requester.11] State transition : CREATED -> VALIDATING
> --- [Hello.Service] DelayedComponentServiceFactory.getService()
> (Bundle #9) call activate
> (Bundle #10) call activate
> --- [Hello.Requester.11] State transition : VALIDATING -> VALID
> -> (Bundle #10) 1:fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@fd13b5 says '
> Hello World !!
> '
> (Bundle #10) 2:fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@fd13b5 says '
> Hello World !!
> '
> (Bundle #10) 3:fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@fd13b5 says '
> Hello World !!
> '
> (Bundle #10) 4:fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@fd13b5 says '
> Hello World !!
> '
> (Bundle #10) 5:fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@fd13b5 says '
> Hello World !!
> '
> hello Rick
> (Bundle #10) 6:fr.imag.adele.bundle.helloservicescr.impl.HelloServiceI
> mpl@fd13b5 says '
> Hello World !!
> '
> Hello  Rick (from fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@7ffe01) !!
> -> (Bundle #10) 7:fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@fd13b5 says '
> Hello World !!
> '
> (Bundle #10) 8:fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@fd13b5
>  says '
> Hello World !!
> '
> (Bundle #10) 9:fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@fd13b5
>  says '
> Hello World !!
> '
> stop 10
> --- [Hello.Requester.11] State transition : VALID -> DESTROYING
> (Bundle #10) call deactivate
> --- [Hello.Requester.11] getting unbind: unbindHelloService
> --- [Hello.Requester.11] State transition : DESTROYING -> DESTROYED
> -> services 9
> Hello Service Impl 1.1 SCR (9) provides:
> ----------------------------------------
> language = fr
> objectClass = fr.imag.adele.bundle.hello.HelloService
> service.id = 37
> -> (Bundle #10) thread completed
> stop 8
> --- [Hello.Cmd] State transition : VALID -> DESTROYING
> --- [Hello.Cmd] unregistering the services
> (Bundle #8) call deactivate
> --- [Hello.Cmd] getting unbind: unbindHelloService
> --- [Hello.Cmd] State transition : DESTROYING -> DESTROYED
> -> stop 9
> --- [Hello.Service] State transition : VALID -> DESTROYING
> --- [Hello.Service] unregistering the services
> (Bundle #9) call deactivate
> --- [Hello.Service] State transition : DESTROYING -> DESTROYED
> ->
> ========================
> TRACE WITH immediate="true"
> ========================
> <?xml version="1.0" encoding="UTF-8"?>
> <component name="Hello.Service" immediate="true">
> 	<!-- for immediate="false", see 112.5.4 Delayed Component -->
> 	<implementation class="fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl"/>
> 	<property name="language" value="fr"/>
> 	<service>
> 		<provide interface="fr.imag.adele.bundle.hello.HelloService"/>
> 	</service>
> </component>
> -> ps
> START LEVEL 1
>    ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (0.8.0.SNAPSHOT)
> [   1] [Active     ] [    1] ShellService (0.8.0.SNAPSHOT)
> [   2] [Active     ] [    1] ShellTUI (0.8.0.SNAPSHOT)
> [   3] [Active     ] [    1] BundleRepository (0.8.0.SNAPSHOT)
> [   4] [Active     ] [    1] servlet (2.1)
> [   5] [Active     ] [    1] osgi.compendium (4)
> [   6] [Active     ] [    1] Service Component Runtime (0.8.0.SNAPSHOT)
> [   7] [Resolved   ] [    1] Hello Service Specification 1.2 (0.3.0)
> [   8] [Resolved   ] [    1] Hello Command (with SCR) (0.1.0)
> [   9] [Resolved   ] [    1] Hello Service Impl 1.1 SCR (0.1.0)
> [  10] [Resolved   ] [    1] Hello Requester Impl 1.1 SCR (0.1.0)
> ->
> ->
> -> start 9
> --- [Hello.Service] Validated and registered component
> --- [Hello.Service] ManagerFactory.createManager
> --- [Hello.Service] Enabling component
> --- [Hello.Service] State transition : CREATING -> CREATED
> --- [Hello.Service] State transition : CREATED -> VALIDATING
> (Bundle #9) call activate
> --- [Hello.Service] State transition : VALIDATING -> VALID
> --- [Hello.Service] registering services
> -> start 8
> --- [Hello.Cmd] Validated and registered component
> --- [Hello.Cmd] ManagerFactory.createManager
> --- [Hello.Cmd] Enabling component
> --- [Hello.Cmd] State transition : CREATING -> CREATED
> --- [Hello.Cmd] State transition : CREATED -> VALIDATING
> --- [Hello.Cmd] State transition : VALIDATING -> VALID
> --- [Hello.Cmd] registering services
> --- [Hello.Cmd] DelayedComponentServiceFactory.getService()
> (Bundle #8) call activate
> -> hello Rick
> Hello  Rick (from fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@291aff) !!
> -> start 10
> --- [Hello.Requester.11] Validated and registered component
> --- [Hello.Requester.11] ManagerFactory.createManager
> --- [Hello.Requester.11] Enabling component
> --- [Hello.Requester.11] State transition : CREATING -> CREATED
> --- [Hello.Requester.11] State transition : CREATED -> VALIDATING
> (Bundle #10) call activate
> --- [(Bundle #10) 1:fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@291aff says '
> Hello World !!
> '
> Hello.Requester.11] State transition : VALIDATING -> VALID
> -> (Bundle #10) 2:fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@291aff says '
> Hello World !!
> '
> (Bundle #10) 3:fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@291aff
>  says '
> Hello World !!
> '
> (Bundle #10) 4:fr.imag.adele.bundle.helloservicescr.impl.HelloServiceImpl@291aff
>  says '
> Hello World !!
> '
> stop 10
> --- [Hello.Requester.11] State transition : VALID -> DESTROYING
> (Bundle #10) call deactivate
> --- [Hello.Requester.11] getting unbind: unbindHelloService
> --- [Hello.Requester.11] State transition : DESTROYING -> DESTROYED
> -> (Bundle #10) thread completed
> stop 8
> --- [Hello.Cmd] State transition : VALID -> DESTROYING
> --- [Hello.Cmd] unregistering the services
> (Bundle #8) call deactivate
> --- [Hello.Cmd] getting unbind: unbindHelloService
> --- [Hello.Cmd] State transition : DESTROYING -> DESTROYED
> -> stop 9
> --- [Hello.Service] State transition : VALID -> DESTROYING
> --- [Hello.Service] unregistering the services
> (Bundle #9) call deactivate
> --- [Hello.Service] State transition : DESTROYING -> DESTROYED
> ->

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