You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Dmitry Lyash <dm...@gmail.com> on 2015/01/08 17:56:47 UTC

Component uses a stale instance of a service

Hello, Felix Users

I have run into a weird behaviour of container. Imagine, we have components:
  - A (immediate=false),
  - B (immediate=true), dependent on A
  - C (immediate=true), dependent on A

Restart of B leads to restart of A. After that C keeps using a stale
"deactivated" instance of A.

Bundle versions:
   System Bundle (org.apache.felix.framework): 4.1.0.R1404502
   Apache Felix Declarative Services (org.apache.felix.scr): 1.6.3.R1409029

Re: Component uses a stale instance of a service

Posted by Felix Meschberger <fm...@adobe.com>.
Hi Dmitry

> Am 08.01.2015 um 17:56 schrieb Dmitry Lyash <dm...@gmail.com>:
> 
> Hello, Felix Users
> 
> I have run into a weird behaviour of container. Imagine, we have components:
>  - A (immediate=false),
>  - B (immediate=true), dependent on A
>  - C (immediate=true), dependent on A
> 
> Restart of B leads to restart of A. After that C keeps using a stale
> "deactivated" instance of A.

If B has a reference on A, why should A be restarted if B is restarted ? I think I am missing bit of a context. Also, unless you do something nasty in C, C should be restarted as well if A is restarted — again, I may not have the full context such as what C looks like and what reference policies there are in B and C for the reference to A: Mandatory vs. optional and static vs. dynamic.

> 
> Bundle versions:
>   System Bundle (org.apache.felix.framework): 4.1.0.R1404502
>   Apache Felix Declarative Services (org.apache.felix.scr): 1.6.3.R1409029

I have the impression you are using quite an old scr bundle version. The latest would be 1.8.2.

(Yet with my Adobe hat on and looking at the bundle version numbers, could it be that you are using CQ/AEM ? In this case, you might want to contact Adobe support if you are unsure about the scr bundle update)

Regards
Felix


Re: Component uses a stale instance of a service

Posted by Neil Bartlett <nj...@gmail.com>.
Why not try with a more up-to-date version of Felix DS, i.e. 1.8.2?

Upgrading the framework version also wouldn’t hurt, though less likely to be related to this issue.

Regards,
Neil

> On 8 Jan 2015, at 16:56, Dmitry Lyash <dm...@gmail.com> wrote:
> 
> Hello, Felix Users
> 
> I have run into a weird behaviour of container. Imagine, we have components:
>  - A (immediate=false),
>  - B (immediate=true), dependent on A
>  - C (immediate=true), dependent on A
> 
> Restart of B leads to restart of A. After that C keeps using a stale
> "deactivated" instance of A.
> 
> Bundle versions:
>   System Bundle (org.apache.felix.framework): 4.1.0.R1404502
>   Apache Felix Declarative Services (org.apache.felix.scr): 1.6.3.R1409029


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org