On 11/28/12 1:29 AM, "Mickael Istria" wrote:
Extensions Bundle are the only good way to go with clean OSGi.
It may seem to be a big pain, but it's not. It's just a matter of putting to fragment on system-bundle and use Export-Package. Just a Tycho "eclipse-plugin" with a MANIFEST.MF.
Moreover your software does not run against Java, it runs against a com.sun.* JRE. It is possible that it fails in other environment or in future releases of JREs (IBM JDK's, JRockit, IcedTea...). So you should consider remocing this dependency to internal JVM packages.
Actually, our software does in fact run against a specific JRE; we bundle the JRE with the product. I have asked the team responsible for the code to investigate removing the com.sun.* usage, but there is no guarantee that a reasonable alternative exists (I've yet to find another implementation of CachedRowSet other than vendor-specific ones).
If an extension bundle is really what OSGi wants to push me to, why doesn't Eclipse PDE complain about the access? Where is it configured that the com.sun.rowset package (or any package, for that matter) is "restricted" in the JRE? How can we expect a team of 100+ developers to know what Tycho or OSGi is going to be sensitive to when the IDE doesn't provide guidance?