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 <[email protected]>:
> 
> 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 <[email protected]>
> 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" <[email protected]> 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 <[email protected]
>>> :
>>>> 
>>>> 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)
>>> 
>> 

Reply via email to