Permalink
Browse files

add composite subsystem

  • Loading branch information...
Glyn Normington
Glyn Normington committed Oct 18, 2012
1 parent f5c4899 commit 0f2749a5a88f56288ac80a60a5688de514648583
@@ -0,0 +1,4 @@
+Subsystem-SymbolicName: hello.composite.subsystem
+Subsystem-Type: osgi.subsystem.composite
+Subsystem-Content: hello;version="[1,1]"
+Import-Package: org.osgi.framework
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
@@ -18,12 +18,15 @@
private Subsystem helloFeatureSubsystem;
+ private Subsystem helloCompositeSubsystem;
+
@Override
public void start(BundleContext bc) throws Exception {
this.sr = bc.getServiceReference(Subsystem.class);
this.rootSubsystem = bc.getService(this.sr);
this.helloApplicationSubsystem = deploySubsystem("hello.application.esa");
this.helloFeatureSubsystem = deploySubsystem("hello.feature.esa");
+ this.helloCompositeSubsystem = deploySubsystem("hello.composite.esa");
}
private Subsystem deploySubsystem(String subsystemDirectoryName) {
@@ -34,14 +37,18 @@ private Subsystem deploySubsystem(String subsystemDirectoryName) {
@Override
public void stop(BundleContext bc) throws Exception {
- if (this.helloApplicationSubsystem != null) {
- this.helloApplicationSubsystem.uninstall();
- this.helloApplicationSubsystem = null;
+ if (this.helloCompositeSubsystem != null) {
+ this.helloCompositeSubsystem.uninstall();
+ this.helloCompositeSubsystem = null;
}
if (this.helloFeatureSubsystem != null) {
this.helloFeatureSubsystem.uninstall();
this.helloFeatureSubsystem = null;
}
+ if (this.helloApplicationSubsystem != null) {
+ this.helloApplicationSubsystem.uninstall();
+ this.helloApplicationSubsystem = null;
+ }
if (this.sr != null) {
bc.ungetService(this.sr);
this.sr = null;

0 comments on commit 0f2749a

Please sign in to comment.