This document discusses using Eclipse Equinox framework extensions to customize and integrate existing OSGi bundles at runtime without modifying their source code. It describes using XSLT transforms to modify plugin.xml definitions, and AspectJ weaving to suppress method calls or access internals. While this allows customizing bundles without access to their APIs, it breaks information hiding and relies on internal implementation details, requiring coping with changes across versions. The approach shifts responsibility from bundle vendors to those doing the integration work.
Runtime Surgery: New Ways to Integrate and Customize Eclipse OSGi Bundles
1. Runtime Surgery
New ways to integrate softwarecomponents
with eclipse equinox
Tobias Jenkner (edmPRO)
2. Surgery - who are the patients
●Eclipse Runtime – equinox
●Osgi: Reuse existing software
components
➔Patients: existing osgi bundles we want
to reuse
3. Reuse bundles: Customize
Plugin
to be reused
Java and OSGI
access restrictions
Initialization
Customize No public interface
Plugin
to be reused
Java and OSGI
access restrictions
Security
4. Reuse bundles: Separation of concerns
Client Common Server
Log API RCP ...
Menu-Entry Global UI
Software-Updates
Log impl RCP ...
Change Window View 1
Title
Log config RCP ...
RCP View 1 View 2
5. Summary:
Reuse bundles
✗ Separation of concerns
✗ Interfaces available
➔ Write a component once run everywhere
● Separation of concerns only in the context of
the original development (A single OSGI Bundle contains GUI,
configuration, business logic, …)
● Customization not possible (API not available)
● Write once break everywhere else
12. Use case summary
Weaving:
●Customize and extend existing functionality
(without API)
●Suppress method calls
Transforms:
●Cleanup Menus / UI
Both:
●Enforce integration specific coding
guidelines. Forbid usage of available APIs (e.g.
set window title).