From: Erik Brakkee Date: Thu, 18 Aug 2011 14:38:22 +0000 (+0200) Subject: Added bundleactivator to XMLRouter. X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=266c3a15014ed92c1eeb720e3fbccba0e22a95d1;p=xmlrouter Added bundleactivator to XMLRouter. --- diff --git a/pom.xml b/pom.xml index 80ce380..d2d2a85 100644 --- a/pom.xml +++ b/pom.xml @@ -137,11 +137,13 @@ org.osgi org.osgi.core 4.2.0 + provided org.osgi org.osgi.compendium 4.2.0 + provided diff --git a/router/bundle/pom.xml b/router/bundle/pom.xml index ff189df..ae2e913 100644 --- a/router/bundle/pom.xml +++ b/router/bundle/pom.xml @@ -25,7 +25,17 @@ org.wamblee wamblee-support-general - + + + org.osgi + org.osgi.core + + + org.osgi + org.osgi.compendium + + + junit junit @@ -35,7 +45,7 @@ mockito-all - + @@ -44,6 +54,7 @@ true + org.wamblee.xmlrouter.bundle.XmlrouterActivator ${pom.groupId}.${pom.artifactId} *;scope=compile|runtime lib diff --git a/router/bundle/src/main/java/org/wamblee/xmlrouter/bundle/XmlrouterActivator.java b/router/bundle/src/main/java/org/wamblee/xmlrouter/bundle/XmlrouterActivator.java index 03bb4a6..a070598 100644 --- a/router/bundle/src/main/java/org/wamblee/xmlrouter/bundle/XmlrouterActivator.java +++ b/router/bundle/src/main/java/org/wamblee/xmlrouter/bundle/XmlrouterActivator.java @@ -15,6 +15,19 @@ */ package org.wamblee.xmlrouter.bundle; -public class XmlrouterActivator { +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class XmlrouterActivator implements BundleActivator { + + @Override + public void start(BundleContext aContext) throws Exception { + System.out.println("Starting bundle"); + } + + @Override + public void stop(BundleContext aContext) throws Exception { + System.out.println("Stopping bundle"); + } }