dev@glassfish.java.net

[v3] exporting all Metro packages for OSGi

From: Fabian Ritzmann <Fabian.Ritzmann_at_Sun.COM>
Date: Thu, 21 Aug 2008 15:26:20 +0300

Hi,

I had originally planned to export only those Metro packages for the
GF V3 OSGi bundles that were public interfaces, e.g. java.xml.ws,
com.sun.xml.ws.api, etc. However we have had issues e.g. loading
property files for localized log messages if the packages that
contained these files were not exported. I have changed my thinking
and I believe now that exporting all packages for a stack like Metro
is the right thing to do for various reasons:

- Rearchitecting Metro to employ OSGi services internally is far too
much work, i.e. we have to continue using the existing logging,
service lookup, etc. mechanisms already implemented in Metro.

- The Metro stack consists of dozens of libraries that may be combined
and run in an uncontrollable amount of environments. These libraries
can not rely on the availability of an OSGi container.

- Exporting all packages is not worse than what we have in GF V2,
where all packages are available globally through the regular Java
classloading mechanisms.

Fabian