From ea84136563c01508f7df591a4013122531fb90b1 Mon Sep 17 00:00:00 2001 From: Ken Gilmer Date: Fri, 10 Jun 2011 14:35:29 +0900 Subject: [PATCH] bug-osgi: added new bundle com.buglabs.bug.ws --- com.buglabs.bug.ws/META-INF/MANIFEST.MF | 9 ++++++ com.buglabs.bug.ws/build.properties | 4 +++ .../com/buglabs/bug/ws/Activator.java | 30 +++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 com.buglabs.bug.ws/META-INF/MANIFEST.MF create mode 100644 com.buglabs.bug.ws/build.properties create mode 100644 com.buglabs.bug.ws/com/buglabs/bug/ws/Activator.java diff --git a/com.buglabs.bug.ws/META-INF/MANIFEST.MF b/com.buglabs.bug.ws/META-INF/MANIFEST.MF new file mode 100644 index 0000000..a45c7a8 --- /dev/null +++ b/com.buglabs.bug.ws/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: BUG Web Services +Bundle-SymbolicName: com.buglabs.bug.ws +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: com.buglabs.bug.ws.Activator +Bundle-Vendor: Bug Labs, Inc. +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Import-Package: org.osgi.framework;version="1.3.0" diff --git a/com.buglabs.bug.ws/build.properties b/com.buglabs.bug.ws/build.properties new file mode 100644 index 0000000..485f354 --- /dev/null +++ b/com.buglabs.bug.ws/build.properties @@ -0,0 +1,4 @@ +source.. = . +output.. = . +bin.includes = META-INF/,\ + . diff --git a/com.buglabs.bug.ws/com/buglabs/bug/ws/Activator.java b/com.buglabs.bug.ws/com/buglabs/bug/ws/Activator.java new file mode 100644 index 0000000..0082421 --- /dev/null +++ b/com.buglabs.bug.ws/com/buglabs/bug/ws/Activator.java @@ -0,0 +1,30 @@ +package com.buglabs.bug.ws; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + +}