"Richard S. Hall" <[EMAIL PROTECTED]> wrote on 06/06/2006 04:23:37 AM:
> I think Tom's description of the situation is slightly inaccurate (or at > least confusing to me). If I confused Richard then I'm sure everyone else is confused also ;-) My main point is that automatically importing every package you export can cause you unexpected results. - If you import every package you export without specifying a version range to only includes the version you are exporting (i.e. version="[1.0,1.0]") then you can prevent multiple versions of that package from existing in the Framework. - In many cases a bundle just wants to export a package but is unwilling to substitute another implementation of that package. There is a much greater burden on the developer when they decide to export a package if you automatically generate an import for that package. They will have to be prepared if their own package is replaced. - Importing any packages which contain your implementation classes can be dangerous. For example, exporting/importing the package with your BundleActivator can allow someone to replace your activator implementation with another implementation. If you have a service component (Declarative Services) and you export/import the package with your DS service component implementations then another bundle can replace your service component implementation classes. Tom

