felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@adobe.com>
Subject Re: persistently disable a component
Date Sun, 13 Nov 2016 23:10:21 GMT
Hi

True, but then the SCR Runtime introspection API allows to access all components. And so Ray’s
idea is potentially possible:

* define the components to be disabled by default
* have the controller be configured by configuration
* introspect the components and enable according to configuratin

Regards
Felix

> Am 13.11.2016 um 12:29 schrieb Pierre De Rop <pierre.derop@gmail.com>:
> 
> Hi Ray,
> 
> As far as I remember, the ComponentContext.enableComponent(String name)
> method only works for components within the same bundle of the
> ComponentContext. So, if you write a global manager, it will only be able
> to enable the components from its own bundle (if I'm correct).
> 
> BR
> /Pierre
> 
> On Sun, Nov 13, 2016 at 2:39 AM, Raymond Auge <raymond.auge@liferay.com>
> wrote:
> 
>> Actually using David's example, couldn't I make a global bundle that speaks
>> SCR runtime and through configuration of its own disable any component?
>> 
>> - Ray
>> 
>> On Nov 11, 2016 23:28, "Felix Meschberger" <fmeschbe@adobe.com> wrote:
>> 
>>> Hi Ray
>>> 
>>> Indirectly: have your component require configuration. In this case the
>>> component is only activated if there is configuration for it. This is
>>> similar to a mandatory reference.
>>> 
>>> Regards
>>> Felix
>>> 
>>> --
>>> Typos caused by my iPhone
>>> 
>>>> Am 11.11.2016 um 20:42 schrieb Raymond Auge <raymond.auge@liferay.com
>>> :
>>>> 
>>>> Hey all,
>>>> 
>>>> is there a way in SCR to persistently disable a component, for instance
>>> via
>>>> config admin?
>>>> 
>>>> --
>>>> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>>>> (@rotty3000)
>>>> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>>>> (@Liferay)
>>>> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
>>> (@OSGiAlliance)
>>> 
>> 

Mime
View raw message