This is my recollection from the distant past, it could be wrong in several 
ways.

IIRC if you have a factory component, when you call it to create a component 
the properties are a mix of the factory component’s properties and the ones you 
supply.

Furthermore, the spec says if you change the factory component’s properties, 
all the previously created instances are immediately disposed of. If the 
manually created component instances are used as dependencies this might not be 
what you want.

So, IIRC, setting this property changes the behavior when you change the 
factory properties so the created instances are not automatically disposed of.

I thought I’d documented all the non-standard behaviors I implemented, but this 
certainly isn’t in the .md.

David Jencks

> On Apr 25, 2023, at 6:56 AM, Raymond Augé <raymond.a...@liferay.com.INVALID> 
> wrote:
> 
> Hello all,
> 
> Could someone explain what it means to use
> 
> felix:persistentFactoryComponent="true"
> 
> As in:
> 
> <components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0";
> 
> xmlns:felix="http://felix.apache.org/xmlns/scr/extensions/v1.0.0";>
> 
> 
> <scr:component name="factory.component"
> 
> felix:persistentFactoryComponent="true"
> 
> enabled="false"
> 
> factory="factory.component.factory" >
> 
> <implementation class="
> org.apache.felix.scr.integration.components.SimpleComponent" />
> 
> </scr:component>
> 
> ...
> 
> -- 
> *Raymond Augé* (@rotty3000)
> Senior Software Architect *Liferay, Inc.* (@Liferay)
> OSGi Fellow, Java Champion


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

Reply via email to