ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google

Mail Archive Home | oscar List | April 2005 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [oscar] Another alpha

On Wednesday 27 April 2005 14:35, Richard S. Hall wrote:

> There is a property called "org.osgi.framework.systemPackages" that
> allows you to expose class path packages via the System Bundle.

> So, the short answer to your question is "no" you cannot do it from a
> bundle manifest. But the long answer is that you can use the mechanism
> above to get the same effect. On some platforms the System Bundle may
> export a lot and on others it may all be provided by bundles.

> One of the reasons for this approach in the first place was to make
> bundles more portable and to make it possible to provide alternative
> implementations of packages that are normally found on the class path.
> For example, it is not possible to provide a different implementation of
> Swing, whereas before this was not possible.

Ok, I agree that it will work, but there is a drawback to this approach. If 
you use that property, those packages will automatically be exposed to all 
bundles. In other words, you completely bypass the whole import/export 
mechanism which has some serious disadvantages:
 - no run-time control over what gets imported/exported
 - no security
 - no way to update such packages

Ideally, I'd like to propose one of two things:

Either a service exposed by the system bundle. Such a service would allow you 
to add and remove exports:
interface SystemExports {
  public void add(String package) throws PackageNotFoundException;
  public void remove(String package);

Or a new manifest entry that allows you to export system packages:
Bundle-SystemExports: javax.swing
The bundle would fail to install if this package was not present in the 

<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.