The Lesser Known Feature: OSP Extension Bundles

Release 2010.1 of the Open Service Platform introduced the concept of “Extension Bundles”. This allows a bundle to declare in its manifest that it extends another bundle (Extends-Bundle header in manifest; <extends> element in bundle specification file). When an extension bundle has been loaded, its properties (from and localized variants) will overlay all properties of the extended bundle. This can be used to add new properties, or to override existing properties. The resources contained in the extension bundle also are “donated” to the extended bundle. This could be very useful for localizing applications — an extension bundle could add localized HTML pages, etc. for a new language. When the extension bundle is unloaded, its properties and resources are removed from the extended bundle. This is useful for dynamic configuration — a new version of the extension bundle can be installed, and its properties are dynamically added to the extended bundle, without restarting the application.