Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 776 invoked from network); 16 Apr 2008 15:49:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Apr 2008 15:49:56 -0000 Received: (qmail 78986 invoked by uid 500); 16 Apr 2008 15:49:54 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 78946 invoked by uid 500); 16 Apr 2008 15:49:54 -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 78935 invoked by uid 99); 16 Apr 2008 15:49:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2008 08:49:54 -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 (nike.apache.org: local policy) Received: from [98.136.44.62] (HELO smtp107.prem.mail.sp1.yahoo.com) (98.136.44.62) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 16 Apr 2008 15:49:02 +0000 Received: (qmail 62414 invoked from network); 16 Apr 2008 15:49:21 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:From:Subject:Date:To:X-Mailer; b=5WSwjH5YG+/ZyXZuO4Cn+qDAk3v6FFgYLkmH4vekWKND0vJ0GWBN/jlyD/K598SHaHLXrUNQMoWhylssbgPcuSzaCAec2PqNK2zMQVU4M8a6coLB79uVi4LZGkMu5fd5LF8Msrfi4E+4bHR8LHeWTnZTilrE2zYG/mZHfNNshDU= ; Received: from unknown (HELO ?192.168.1.104?) (david_jencks@67.102.173.8 with plain) by smtp107.prem.mail.sp1.yahoo.com with SMTP; 16 Apr 2008 15:49:20 -0000 X-YMail-OSG: suVy0QMVM1mqLziqnUOp33Q8alNLwtyjKLq2ykHNv7JOxPJfxUz43dL2jUabh45jeijvv9zS0L2Z2sdsbw0Ozd5.VHNAnfs- X-Yahoo-Newman-Property: ymail-3 Mime-Version: 1.0 (Apple Message framework v753) In-Reply-To: References: Content-Type: multipart/alternative; boundary=Apple-Mail-3-273014900 Message-Id: <771A3014-298F-426A-A99F-E3CAF159E258@yahoo.com> From: David Jencks Subject: Re: Geronimo specs jars in OSGi Date: Wed, 16 Apr 2008 08:49:25 -0700 To: dev@geronimo.apache.org X-Mailer: Apple Mail (2.753) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-3-273014900 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed I'd like to see an example in action before I commit myself but so far I don't see any problems with this. I assume you have already or will soon verify this doesn't cause problems with the tck :-) I wonder if a package name with "osgi" in it somewhere would be more appropriate? There are some specs (jacc for instance) that use a system property to figure out what to create. I've always thought this was a less than brilliant idea and wonder if we can do something similar for those. I also wonder if there is a way to generalize the osgi method so it might work in some non-osgi environments. I'm looking forward to seeing what you have in mind. thanks david jencks On Apr 16, 2008, at 8:20 AM, Guillaume Nodet wrote: > 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/ --Apple-Mail-3-273014900 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 I'd like to see an example in action before I commit myself but so far I = don't see any problems with this. =A0I assume you have already or will = soon verify this doesn't cause problems with the tck = :-)

I wonder if a package name with "osgi" in it = somewhere would be more appropriate?

There are = some specs (jacc for instance) that use a system property to figure out = what to create. =A0I've always thought this was a less than brilliant = idea and wonder if we can do something similar for those. =A0I also = wonder if there is a way to generalize the osgi method so it might work = in some non-osgi environments. =A0I'm looking forward to seeing what you = have in mind.

thanks
david = jencks

On Apr 16, 2008, at 8:20 AM, Guillaume = Nodet wrote:
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.=A0 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).=A0 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/

= --Apple-Mail-3-273014900--