felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject Re: register scr component at runtime
Date Tue, 07 Dec 2010 11:13:25 GMT
Hi,

Am Montag, den 22.11.2010, 12:02 +0100 schrieb Reto Bachmann-Gmuer: 
> 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.

This won't work --- but you could install the new classes along with the
descriptor as a bundle for SCR to pick them up....

Regards
Felix

> 
> 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
> 



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


Mime
View raw message