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


Marcel Offermans wrote:

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

Perhaps my explanation was confusing. By using that property, the packages listed on it are treated as actual exports of the System Bundle, i.e., they are treated as a normal export and thus must be explicitly imported by any bundle that wishes to use them. To state it another way, bundles are only given implicit access to java.* packages, all other packages must be explicitly imported, no matter what.

- no way to update such packages

This is true, but there isn't much I can do about that. However, at least now you can provide an alternative implementation, which could be an update. That is something you could not do before.

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);
}

I think the property is a way to do the same thing, albeit not dynamically.

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 system.

I am not sure that it makes sense for bundles to export system classes for the precise reason you mention, they don't know if they exist. I think it makes the most sense for the framework to do the exporting (e.g., via the system bundle as described). Whether or not to provide a mechanism to change this value dynamically is a separate issue as far as I can see.

-> richard



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

Reply via email to:

Powered by MHonArc.

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