Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 85573 invoked from network); 16 Apr 2008 15:21:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Apr 2008 15:21:01 -0000 Received: (qmail 11695 invoked by uid 500); 16 Apr 2008 15:20:59 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 11647 invoked by uid 500); 16 Apr 2008 15:20:59 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 11636 invoked by uid 99); 16 Apr 2008 15:20:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2008 08:20:59 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gnodet@gmail.com designates 74.125.46.31 as permitted sender) Received: from [74.125.46.31] (HELO yw-out-2324.google.com) (74.125.46.31) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2008 15:20:16 +0000 Received: by yw-out-2324.google.com with SMTP id 9so1218515ywe.85 for ; Wed, 16 Apr 2008 08:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=c8xn49z6i4Pcgr5+u6euqDu0ZXaKR0tWN2GXVArISdg=; b=rOhnjIS9WYd2bHBQMp0VQzx09lbrWTtpuQ6ncomX/OVm6qJOnPXgLba42xI7mVR2H84dSzp7K7MEc7dFOfaFE+X577lz2lpu5LyyIvPl5g8i8TQUOtPsorbBncIjqrgH7e8ij3SewMuXglyRoce31KRzKFZcRBcd43qu+pWo/Ww= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=KR8jUX3wFPXlTAPK90B0MNJyBGGIhb7OSuCLapyCP+i8Uuj3/pkL1AOuza3IILuK0x8yH5FwKJLkoeVqynKnk0djVdoRFqqbxXW7IM6JvPGfo9QeJfhXahf/lJdLiMe1uZMSi0KrDpHmvS8cR6ujdqL7WC4n+qeT76Agc3TS+Oo= Received: by 10.150.212.14 with SMTP id k14mr243007ybg.148.1208359213327; Wed, 16 Apr 2008 08:20:13 -0700 (PDT) Received: by 10.150.154.2 with HTTP; Wed, 16 Apr 2008 08:20:13 -0700 (PDT) Message-ID: Date: Wed, 16 Apr 2008 17:20:13 +0200 From: "Guillaume Nodet" To: dev@geronimo.apache.org Subject: Geronimo specs jars in OSGi MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8335_338.1208359213354" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_8335_338.1208359213354 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline In the past months, I've been working on making the specs jars from Geronimo working in an OSGi environment. All these jars have been published and work great :-) However, lots of these spec jars define factories (stax, saaj for example) that use the META-INF/services/ discovery mechanism to find an implementation of the spec and load it. This mechanism does not fit well in OSGi (really, it does not), mainly because usually, the classloader containing the spec jar will not contain the implementation. I'd like to work on these spec jars so that they will contain an OSGi BundleActivator that would change the behavior of these factories when deployed in an OSGi environment (without changing the behavior in other case). The idea is that the activator would scan OSGi bundles when they are started to find META-INF/services and populate a map that would be used by the factory when creating an object before using the standard mechanism. The only real difference compared to what we currently have would be the addition of a package named org.apache.geronimo.specs.stax (for example) that would contain the needed classes (i suppose two classes), and the modification of the factories to delegate to one of these class before using the standard behavior (the class would do nothing if not deployed in an OSGi environment). Has anyone any objection with such an enhancement in the specs jar ? -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------=_Part_8335_338.1208359213354 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline In the past months, I've been working on making the specs jars from Geronimo working in an OSGi environment.
All these jars have been published and work great :-)
However, lots of these spec jars define factories (stax, saaj for example) that use the META-INF/services/ discovery mechanism to find an implementation of the spec and load it.  This mechanism does not fit well in OSGi (really, it does not), mainly because usually, the classloader containing the spec jar will not contain the implementation.
I'd like to work on these spec jars so that they will contain an OSGi BundleActivator that would change the behavior of these factories when deployed in an OSGi environment (without changing the behavior in other case).  The idea is that the activator would scan OSGi bundles when they are started to find META-INF/services and populate a map that would be used by the factory when creating an object before using the standard mechanism.

The only real difference compared to what we currently have would be the addition of a package named org.apache.geronimo.specs.stax (for example) that would contain the needed classes (i suppose two classes), and the modification of the factories to delegate to one of these class before using the standard behavior (the class would do nothing if not deployed in an OSGi environment).
Has anyone any objection with such an enhancement in the specs jar ?

--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/ ------=_Part_8335_338.1208359213354--