Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

ClassloadingAspectweaving

Philipp Haussleiter edited this page Nov 25, 2015 · 1 revision

Classloading/Aspectweaving

In order to divert calls to service interfaces to a remote instance of that same service, we have to weave aspects into the existing service implementation. The actual weaving is done at classloading time using javassist .

Since bundle classes aren’t usually loaded by the system classloader, we have to somehow manipulate the used bundle classloader. In Eclipse Equinox this can be achieved by implementing a Class Loading Adaptor Hook as a framework extension fragment bundle (also see OSGi Core Specification chapter 3.15 “Extension Bundles”).

There are unfortunately a bunch of inconveniences connected to the framework extensions mechanism.
Most notably:

  • launcher bundle has to be used – can’t just start OSGi bundle directly
  • launcher bundle has to be in a folder called plugins (bug 186151)
  • the framework extension bundle has to be in a file called "symbolicname"_"version".jar, which needs to be in the same directory as the OSGi bundle (bug 206611)

See also Deployment to Equinox

Due the use of the Equinox class loading hook we are currently laid down in the use of the equinox framework.
There are some links to help use determining a method to use our classloading aproach and be also osgi-spec compatbile.

Clone this wiki locally