felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Bachmann-Gmuer <reto.bachm...@trialox.org>
Subject Re: register scr component at runtime
Date Mon, 22 Nov 2010 11:02:12 GMT
On Sun, Nov 21, 2010 at 10:13 AM, Felix Meschberger <fmeschbe@gmail.com> wrote:
> Hi,
>
> Am Freitag, den 19.11.2010, 17:22 +0100 schrieb Reto Bachmann-Gmuer:
>> Hallo
>>
>> I'm wondering if I can add a dynamically compiled class available as
>> an instance of Class as a component and have the SCR add required
>> binding and activate/deactivate as needed.
>
> I do not exactly understand.
>
> But fact is, that descriptors are read at bundle start time and not
> re-read later. There is no dynamism in creating DS components during
> runtime.
>
> In addition -- at least for Apache Felix DS/SCR -- classes are just
> loaded through the providing bundle's class loader so must be available
> there.
The new classes I create (by compiling the source at runtime) are
available via a dedicated classloader. I can register them as service
but I was hoping to be able to use existing DS functionality to
(de)activate the components and inject dependencies, basically I was
hoping I could pass the classloader and the information of
serviceComponents.xml and have SCR taking care of the rest.

Cheers,
Reto

>
> HTH
>
> Regards
> Felix
>
>>
>> Cheers,
>> Reto
>>
>> ---------------------------------------------------------------------
>> 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
>
>

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


Mime
View raw message