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 <[email protected]> > 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: [email protected] > >> For additional commands, e-mail: [email protected] > >> > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

