From ea244637a9fdf1ee8dc8b7559ed4abdc6c58cf2e Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Thu, 11 Mar 2010 18:24:51 +0000 Subject: [PATCH] INT-996 moving osgi samples to sandbox for now --- .../helloworld/README.txt | 10 ---- .../helloworld/HelloWorldBundleActivator.java | 56 ------------------- .../src/main/resources/META-INF/MANIFEST.MF | 10 ---- .../META-INF/spring/helloWorldDemo-osgi.xml | 21 ------- 4 files changed, 97 deletions(-) delete mode 100644 spring-integration-samples/helloworld/src/main/java/org/springframework/integration/samples/osgi/helloworld/HelloWorldBundleActivator.java delete mode 100644 spring-integration-samples/helloworld/src/main/resources/META-INF/MANIFEST.MF delete mode 100644 spring-integration-samples/helloworld/src/main/resources/META-INF/spring/helloWorldDemo-osgi.xml diff --git a/spring-integration-samples/helloworld/README.txt b/spring-integration-samples/helloworld/README.txt index 5374943731..f5233d2584 100644 --- a/spring-integration-samples/helloworld/README.txt +++ b/spring-integration-samples/helloworld/README.txt @@ -5,15 +5,5 @@ Instructions for running the HelloWorldDemo sample 2. To run this sample as a standalone application simply execute the HelloWorldDemo class that is located within the org.springframework.integration.samples.helloworld package. - -3. This sample is also configured to be a valid OSGi bundle. This means you can - deploy the generated JAR into an OSGi environment providing that the Spring - Integration bundles as well as other prerequisites (e.g., Spring Framework) - were installed. For example: To deploy it on SpringSource dm Server simply - drop the helloworld-[version].jar file, located in the 'target' directory, - to the 'pickup' directory of the dm Server instance. You should see output - similar to the following in the trace file: - - System.out I ==> HelloWorldDemo: Hello World Happy integration :-) \ No newline at end of file diff --git a/spring-integration-samples/helloworld/src/main/java/org/springframework/integration/samples/osgi/helloworld/HelloWorldBundleActivator.java b/spring-integration-samples/helloworld/src/main/java/org/springframework/integration/samples/osgi/helloworld/HelloWorldBundleActivator.java deleted file mode 100644 index 15d104ba44..0000000000 --- a/spring-integration-samples/helloworld/src/main/java/org/springframework/integration/samples/osgi/helloworld/HelloWorldBundleActivator.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2002-2009 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.integration.samples.osgi.helloworld; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; -import org.osgi.framework.Constants; -import org.osgi.framework.ServiceEvent; -import org.osgi.framework.ServiceListener; -import org.osgi.framework.ServiceReference; - -import org.springframework.context.ApplicationContext; -import org.springframework.integration.samples.helloworld.HelloWorldDemo; - -/** - * An OSGi BundleActivator which will register a ServiceListener to listen - * for an ApplicationContext published event. Once the event is received, - * the HelloWorldDemo will be executed. - * - * @author Oleg Zhurakousky - * @since 1.0.3 - */ -public class HelloWorldBundleActivator implements BundleActivator, ServiceListener{ - - private BundleContext context; - - public void start(BundleContext context) throws Exception { - this.context = context; - context.addServiceListener(this); - } - - public void stop(BundleContext context) throws Exception {} - - public void serviceChanged(ServiceEvent serviceEvent) { - ServiceReference sr = serviceEvent.getServiceReference(); - if (context.getBundle().getSymbolicName().equals(sr.getProperty(Constants.BUNDLE_SYMBOLICNAME))) { - ApplicationContext applicationContext = (ApplicationContext) context.getService(sr); - new HelloWorldDemo().performDemo(applicationContext); - } - } - -} diff --git a/spring-integration-samples/helloworld/src/main/resources/META-INF/MANIFEST.MF b/spring-integration-samples/helloworld/src/main/resources/META-INF/MANIFEST.MF deleted file mode 100644 index 3bd830355b..0000000000 --- a/spring-integration-samples/helloworld/src/main/resources/META-INF/MANIFEST.MF +++ /dev/null @@ -1,10 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Version: 2.0.0.BUILD-SNAPSHOT -Bundle-Name: org.springframework.integration.samples.helloworld -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: org.springframework.integration.samples.helloworld -Bundle-Activator: org.springframework.integration.samples.osgi.helloworld.HelloWorldBundleActivator -Import-Package: org.osgi.framework;version="[1.4.0, 1.4.0]" -Import-Library: org.aspectj;version="[1.6.2.RELEASE, 1.7.0)", - org.springframework.spring;version="[3.0.0, 3.1.0)" -Import-Bundle: org.springframework.integration;version="[2.0.0, 2.1.0)" diff --git a/spring-integration-samples/helloworld/src/main/resources/META-INF/spring/helloWorldDemo-osgi.xml b/spring-integration-samples/helloworld/src/main/resources/META-INF/spring/helloWorldDemo-osgi.xml deleted file mode 100644 index 7400ed2617..0000000000 --- a/spring-integration-samples/helloworld/src/main/resources/META-INF/spring/helloWorldDemo-osgi.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - -