Previous Topic

Next Topic

Book Contents

Book Index

Weaving Hook Service

A service registered by a bundle that wants to weave other bundles.

Overview

Bytecode weaving is a popular technique that transforms class files to provide additional functionality. This is a powerful technique that, when used with care, can significantly reduce the coding effort for mundane programming chores.

The Weaving Hook service is a white board service – any party that wants to participate in weaving classes can register such a service. It defines API to influence the class loading in the bundle class loader. Additional debug code may be added on the fly while loading the bundles' classes in the bundle class loader in the OSGi Framework.

The service object is registered under the org.osgi.framework.hooks.weaving.WeavingHook class.

Registering Bundle

This service is registered by Core Benchmark Weaving Bundle.