You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Jencks <da...@yahoo.com> on 2009/06/16 19:38:49 UTC

Re: Geronimo specs jars in OSGi

It's been a year.... IIUC servicemix has done something so the specs  
that have this discovery pattern solve the problem somehow.  Now we  
have a jaxws 2.2 spec with the same problem.

I think its silly to have the osgi-usable version of the spec far away  
from the spec source code.  Can we revisit this discussion?

I'd need to review what the servicemix bundles actually do but I'm  
pretty much in favor of having the geronimo spec jars work in osgi  
unchanged.  If that's really unacceptable I'd suggest releasing two  
artifacts, one a working osgi bundle the other a non-osgi plain jar.

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/


Re: Geronimo specs jars in OSGi

Posted by Daniel Kulp <dk...@apache.org>.
IMO, if we can release a single jar that has the OSGi mechanism in it that 
would also pass the TCK, then, to me, that is preferred.    Thus, my 
suggestion would be to take something that we DO have the tck for (jaxws 2.1 
or saaj or something), add the OSGi stuff to it, and run the tck's to see what 
happens.

Dan


On Tue June 16 2009 1:38:49 pm David Jencks wrote:
> It's been a year.... IIUC servicemix has done something so the specs
> that have this discovery pattern solve the problem somehow.  Now we
> have a jaxws 2.2 spec with the same problem.
>
> I think its silly to have the osgi-usable version of the spec far away
> from the spec source code.  Can we revisit this discussion?
>
> I'd need to review what the servicemix bundles actually do but I'm
> pretty much in favor of having the geronimo spec jars work in osgi
> unchanged.  If that's really unacceptable I'd suggest releasing two
> artifacts, one a working osgi bundle the other a non-osgi plain jar.
>
> 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/

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog