[hibernate-dev] Concept of "service availability"
mailing at bibbernet.org
mailing at bibbernet.org
Tue Aug 28 16:33:37 EDT 2012
I had a similar problem before:
In an osgi project we needed the ability to extend a main system with
functionality provided in addon bundles
We developed a main system which could be extended and complemented with
extenders of several kinds.
The main system provided (exported) a tree of marker interfaces like
public interface ExtenderMarker {};
public interface TypeAExtender extends ExtenderMarker
public interface TypeBExtender extends ExtenderMarker
....
and had a "helper" which scans services, tracks services and initially
scans the framework for interesting services (started from the bundle
activator of the main system).
The extender bundles only implemented the extenders and registered OSGI
services with the ExtenderMarker interface and maybe also the concrete
interface. They had no more tasks to do.
Now the main system could "use" the extenders which got registered by
the "helper" and the "helper" was handling the live cycle events, etc.
Simple approach based on the whiteboard pattern.
- Martin
More information about the hibernate-dev
mailing list