felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject Re: Declarative Services and Startup
Date Sun, 23 Nov 2008 19:21:36 GMT
Hi Peter,

Peter schrieb:
> Hi,
> 
> it works now , thanks Felix.
> But I discovered something. the maven-scr-plugin docs claim that the
> default value
> for the "immediate" parameter of a component is true, but the Component
> wont be
> initialized immediately unless I provide the "immediate=true" parameter
> explicitly.
> 
> Is this a bug, or a documentation error or did I missunderstand something ?

It is a somewhat complicated situation, unfortunately due to the
specification.

The value of immediate attribute of the component element defaults to
true unless the service element is specified in which case the value
defaults to false. But some combinations of values of the immediate
attribute and the servicefactory attribute of the service element,
handling a default value for the immediate attribute is not easy to
implement and may lead to strange and unexpected behaviour.

Therefore we modified the maven-scr-plugin such that the immediate
attribute is only set in the generated declaration if it is set in the
@scr.component tag. Otherwise the attribute is not set.

This way we leave the complicated resolution and validation of the
immediate attribute to the scr plugin and do not try to duplicate code.

In the end of the day, this amounts to documentation, which is not
completely up to date, and which I just fixed.

Hope this helps.

Regards
Felix


> 
>  
> 
> Thanks in advance
> 
> 
> Peter
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 

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


Mime
View raw message