Return-Path: Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: (qmail 258 invoked from network); 22 Nov 2010 11:28:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Nov 2010 11:28:57 -0000 Received: (qmail 85164 invoked by uid 500); 22 Nov 2010 11:29:28 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 84844 invoked by uid 500); 22 Nov 2010 11:29:28 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Delivered-To: moderator for users@felix.apache.org Received: (qmail 53803 invoked by uid 99); 22 Nov 2010 11:02:42 -0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) MIME-Version: 1.0 Sender: reto@trialox.org X-Originating-IP: [217.71.247.242] In-Reply-To: <1290330833.2516.3.camel@meschbix.corp.day.com> References: <1290330833.2516.3.camel@meschbix.corp.day.com> Date: Mon, 22 Nov 2010 12:02:12 +0100 X-Google-Sender-Auth: Ut8CPYqFhf71hIrF7ko475neKLQ Message-ID: Subject: Re: register scr component at runtime From: Reto Bachmann-Gmuer To: users@felix.apache.org Content-Type: text/plain; charset=UTF-8 On Sun, Nov 21, 2010 at 10:13 AM, Felix Meschberger 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