You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by cs...@apache.org on 2016/03/11 20:43:24 UTC
[25/50] [abbrv] aries-rsa git commit: Switch project setup to Aries
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/discovery/client/pom.xml
----------------------------------------------------------------------
diff --git a/samples/discovery/client/pom.xml b/samples/discovery/client/pom.xml
deleted file mode 100644
index c2434bd..0000000
--- a/samples/discovery/client/pom.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- you 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. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-discovery-client</artifactId>
- <packaging>bundle</packaging>
- <name>Distributed OSGI Discovery Sample Client Bundle</name>
- <version>1.8-SNAPSHOT</version>
-
- <parent>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-discovery-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-discovery-interface</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-Name>${project.name}</Bundle-Name>
- <Bundle-Description>The client-side
- implementation of the Distributed OSGi
- Discovery sample</Bundle-Description>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.apache.cxf.dosgi.samples.discovery.consumer.Activator</Bundle-Activator>
- <Import-Package>
- org.apache.cxf.dosgi.samples.discovery,
- org.osgi.framework,
- org.osgi.util.tracker
- </Import-Package>
- <Private-Package>org.apache.cxf.dosgi.samples.discovery.consumer</Private-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/discovery/client/src/main/java/org/apache/cxf/dosgi/samples/discovery/consumer/Activator.java
----------------------------------------------------------------------
diff --git a/samples/discovery/client/src/main/java/org/apache/cxf/dosgi/samples/discovery/consumer/Activator.java b/samples/discovery/client/src/main/java/org/apache/cxf/dosgi/samples/discovery/consumer/Activator.java
deleted file mode 100644
index cdeb360..0000000
--- a/samples/discovery/client/src/main/java/org/apache/cxf/dosgi/samples/discovery/consumer/Activator.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.discovery.consumer;
-
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.cxf.dosgi.samples.discovery.DisplayService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class Activator implements BundleActivator {
-
- private ServiceTracker<DisplayService, DisplayService> tracker;
- private Map<DisplayService, String> displays = new ConcurrentHashMap<DisplayService, String>();
- private ScheduledExecutorService scheduler;
- private ScheduledFuture<?> handle;
-
- public void start(BundleContext bc) throws Exception {
- tracker = new ServiceTracker<DisplayService, DisplayService>(bc, DisplayService.class, null) {
-
- @Override
- public DisplayService addingService(ServiceReference<DisplayService> reference) {
- DisplayService service = super.addingService(reference);
- System.out.println("Adding display: " + service.getID() + " (" + service + ")");
- displays.put(service, service.getID());
- return service;
- }
-
- @Override
- public void removedService(ServiceReference<DisplayService> reference, DisplayService service) {
- String value = displays.remove(service);
- System.out.println("Removed display: " + value);
- super.removedService(reference, service);
- }
- };
- tracker.open();
-
- scheduler = Executors.newScheduledThreadPool(1);
- Runnable printer = new Runnable() {
- int counter;
- public void run() {
- counter++;
- String text = "some text " + counter;
- System.out.println("Sending text to displays: " + text);
- for (Entry<DisplayService, String> entry : displays.entrySet()) {
- try {
- entry.getKey().displayText(text);
- } catch (Throwable th) {
- System.out.println("Could not send message to display: " + entry.getValue());
- }
- }
- }
- };
- handle = scheduler.scheduleAtFixedRate(printer, 5, 5, TimeUnit.SECONDS);
- }
-
- public void stop(BundleContext bc) throws Exception {
- handle.cancel(true);
- scheduler.shutdown();
- tracker.close();
- }
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/discovery/impl/pom.xml
----------------------------------------------------------------------
diff --git a/samples/discovery/impl/pom.xml b/samples/discovery/impl/pom.xml
deleted file mode 100644
index adfc929..0000000
--- a/samples/discovery/impl/pom.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- you 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. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-discovery-impl</artifactId>
- <packaging>bundle</packaging>
- <name>Distributed OSGI Discovery Sample Implementation Bundle</name>
- <version>1.8-SNAPSHOT</version>
-
- <parent>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-discovery-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-discovery-interface</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-Name>${project.name}</Bundle-Name>
- <Bundle-Description>The server-side
- implementation of the Distributed OSGi
- Discovery sample</Bundle-Description>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.apache.cxf.dosgi.samples.discovery.impl.Activator</Bundle-Activator>
- <Import-Package>
- org.apache.cxf.dosgi.samples.discovery,
- org.osgi.framework
- </Import-Package>
- <Private-Package>org.apache.cxf.dosgi.samples.discovery.impl</Private-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/discovery/impl/src/main/java/org/apache/cxf/dosgi/samples/discovery/impl/Activator.java
----------------------------------------------------------------------
diff --git a/samples/discovery/impl/src/main/java/org/apache/cxf/dosgi/samples/discovery/impl/Activator.java b/samples/discovery/impl/src/main/java/org/apache/cxf/dosgi/samples/discovery/impl/Activator.java
deleted file mode 100644
index f9c972a..0000000
--- a/samples/discovery/impl/src/main/java/org/apache/cxf/dosgi/samples/discovery/impl/Activator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.discovery.impl;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.UnknownHostException;
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import org.apache.cxf.dosgi.samples.discovery.DisplayService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-public class Activator implements BundleActivator {
-
- private ServiceRegistration reg;
-
- public void start(BundleContext bc) throws Exception {
- Dictionary<String, Object> props = new Hashtable<String, Object>();
-
- String host = getHostName();
- int port = getPort();
-
- props.put("service.exported.interfaces", "*");
- props.put("service.exported.configs", "org.apache.cxf.ws");
- props.put("org.apache.cxf.ws.address", getAddress(host, port)); // old obsolete value
- props.put("endpoint.id", getAddress(host, port));
-
- reg = bc.registerService(DisplayService.class.getName(),
- new DisplayServiceImpl(host + ":" + port), props);
- }
-
- private static String getAddress(String host, int port) {
- return "http://" + host + ":" + port + "/display";
- }
-
- private static String getHostName() {
- try {
- return InetAddress.getLocalHost().getCanonicalHostName();
- } catch (UnknownHostException e) {
- return "localhost";
- }
- }
-
- private static int getPort() throws IOException {
- return new ServerSocket(0).getLocalPort();
- }
-
- public void stop(BundleContext bc) throws Exception {
- reg.unregister();
- }
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/discovery/impl/src/main/java/org/apache/cxf/dosgi/samples/discovery/impl/DisplayServiceImpl.java
----------------------------------------------------------------------
diff --git a/samples/discovery/impl/src/main/java/org/apache/cxf/dosgi/samples/discovery/impl/DisplayServiceImpl.java b/samples/discovery/impl/src/main/java/org/apache/cxf/dosgi/samples/discovery/impl/DisplayServiceImpl.java
deleted file mode 100644
index bd84a62..0000000
--- a/samples/discovery/impl/src/main/java/org/apache/cxf/dosgi/samples/discovery/impl/DisplayServiceImpl.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.discovery.impl;
-
-import org.apache.cxf.dosgi.samples.discovery.DisplayService;
-
-public class DisplayServiceImpl implements DisplayService {
-
- private final String id;
-
- public DisplayServiceImpl(String id) {
- this.id = id;
- System.out.println("Created DisplayService [" + id + "]");
- }
-
- public boolean displayText(String text) {
- System.out.println("DisplayService [" + id + "]: " + text);
- return true;
- }
-
- public String getID() {
- return id;
- }
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/discovery/interface/pom.xml
----------------------------------------------------------------------
diff --git a/samples/discovery/interface/pom.xml b/samples/discovery/interface/pom.xml
deleted file mode 100644
index bd45521..0000000
--- a/samples/discovery/interface/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-discovery-interface</artifactId>
- <packaging>bundle</packaging>
- <name>Distributed OSGI Discovery Sample Interface Bundle</name>
- <version>1.8-SNAPSHOT</version>
-
- <parent>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-discovery-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- </parent>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-Name>${project.name}</Bundle-Name>
- <Bundle-Description>The interfaces of the Distributed OSGi Discovery sample</Bundle-Description>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Import-Package />
- <Export-Package>org.apache.cxf.dosgi.samples.discovery</Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/discovery/interface/src/main/java/org/apache/cxf/dosgi/samples/discovery/DisplayService.java
----------------------------------------------------------------------
diff --git a/samples/discovery/interface/src/main/java/org/apache/cxf/dosgi/samples/discovery/DisplayService.java b/samples/discovery/interface/src/main/java/org/apache/cxf/dosgi/samples/discovery/DisplayService.java
deleted file mode 100644
index f05cef5..0000000
--- a/samples/discovery/interface/src/main/java/org/apache/cxf/dosgi/samples/discovery/DisplayService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.discovery;
-
-public interface DisplayService {
- boolean displayText(String text);
- String getID();
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/discovery/pom.xml
----------------------------------------------------------------------
diff --git a/samples/discovery/pom.xml b/samples/discovery/pom.xml
deleted file mode 100644
index d78db80..0000000
--- a/samples/discovery/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-discovery-parent</artifactId>
- <packaging>pom</packaging>
- <name>Distributed OSGI Discovery Sample</name>
- <version>1.8-SNAPSHOT</version>
-
- <parent>
- <groupId>org.apache.cxf.dosgi</groupId>
- <artifactId>cxf-dosgi-ri-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- <relativePath>../../parent/pom.xml</relativePath>
- </parent>
-
- <modules>
- <module>interface</module>
- <module>impl</module>
- <module>client</module>
- </modules>
-
-</project>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/ds/client/pom.xml
----------------------------------------------------------------------
diff --git a/samples/ds/client/pom.xml b/samples/ds/client/pom.xml
deleted file mode 100644
index be0b243..0000000
--- a/samples/ds/client/pom.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- you 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. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-ds-client</artifactId>
- <packaging>bundle</packaging>
- <name>Distributed OSGI Declarative Services Sample Client Bundle</name>
- <version>1.8-SNAPSHOT</version>
-
- <parent>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-ds-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-ds-interface</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-Name>${project.name}</Bundle-Name>
- <Bundle-Description>The client-side
- implementation of the Distributed OSGi with
- Declarative Services sample</Bundle-Description>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.apache.cxf.dosgi.samples.ds.consumer.Activator</Bundle-Activator>
- <Import-Package>*</Import-Package>
- <Private-Package>org.apache.cxf.dosgi.samples.ds.consumer</Private-Package>
- <Service-Component>OSGI-INF/component.xml</Service-Component>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/Activator.java
----------------------------------------------------------------------
diff --git a/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/Activator.java b/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/Activator.java
deleted file mode 100644
index ac059ad..0000000
--- a/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/Activator.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.ds.consumer;
-
-import org.apache.cxf.dosgi.samples.ds.AdderService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * This Activator simply registers a service tracker to indicate its interest in the
- * AdderService which causes the service to get registered by the Listener Hook.
- * It is a workaround for the problem that the current ListenerHook is incompatible
- * with the Equinox DS implementation which doesn't specify a filter when looking up
- * a service. See also DOSGI-73.
- */
-public class Activator implements BundleActivator {
-
- private ServiceTracker<AdderService, AdderService> tracker;
-
- public void start(BundleContext context) throws Exception {
- tracker = new ServiceTracker<AdderService, AdderService>(context, AdderService.class, null);
- tracker.open();
- }
-
- public void stop(BundleContext context) throws Exception {
- tracker.close();
- }
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/AdderConsumer.java
----------------------------------------------------------------------
diff --git a/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/AdderConsumer.java b/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/AdderConsumer.java
deleted file mode 100644
index 060ed42..0000000
--- a/samples/ds/client/src/main/java/org/apache/cxf/dosgi/samples/ds/consumer/AdderConsumer.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.ds.consumer;
-
-import org.apache.cxf.dosgi.samples.ds.AdderService;
-
-public class AdderConsumer {
-
- private AdderService adder;
-
- public void bindAdder(AdderService a) {
- adder = a;
- }
-
- public void unbindAdder(AdderService a) {
- adder = null;
- }
-
- public void start() {
- System.out.println("Declarative Service consumer component.");
- System.out.println("Using adder service: 1 + 1 = " + adder.add(1, 1));
- }
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/ds/client/src/main/resources/OSGI-INF/component.xml
----------------------------------------------------------------------
diff --git a/samples/ds/client/src/main/resources/OSGI-INF/component.xml b/samples/ds/client/src/main/resources/OSGI-INF/component.xml
deleted file mode 100644
index 31b91f7..0000000
--- a/samples/ds/client/src/main/resources/OSGI-INF/component.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to you 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.
- -->
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="DS Consumer Sample" activate="start">
- <implementation class="org.apache.cxf.dosgi.samples.ds.consumer.AdderConsumer"/>
- <reference interface="org.apache.cxf.dosgi.samples.ds.AdderService" name="AdderService" cardinality="1..1" policy="dynamic" bind="bindAdder" unbind="unbindAdder"/>
-</scr:component>
-
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/ds/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml
----------------------------------------------------------------------
diff --git a/samples/ds/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml b/samples/ds/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml
deleted file mode 100644
index e1f0b21..0000000
--- a/samples/ds/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to you 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.
- -->
-<endpoint-descriptions xmlns="http://www.osgi.org/xmlns/rsa/v1.0.0">
- <endpoint-description>
- <property name="objectClass">
- <array>
- <value>org.apache.cxf.dosgi.samples.ds.AdderService</value>
- </array>
- </property>
- <property name="endpoint.id">http://localhost:9090/adder</property>
- <property name="service.imported.configs">org.apache.cxf.ws</property>
- </endpoint-description>
-</endpoint-descriptions>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/ds/impl/pom.xml
----------------------------------------------------------------------
diff --git a/samples/ds/impl/pom.xml b/samples/ds/impl/pom.xml
deleted file mode 100644
index 69610f5..0000000
--- a/samples/ds/impl/pom.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-ds-impl</artifactId>
- <packaging>bundle</packaging>
- <name>Distributed OSGI Declarative Services Sample Implementation Bundle</name>
- <version>1.8-SNAPSHOT</version>
-
- <parent>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-ds-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-ds-interface</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-Name>${project.name}</Bundle-Name>
- <Bundle-Description>The server-side implementation of the Distributed OSGi with Declarative Services sample</Bundle-Description>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Import-Package>org.apache.cxf.dosgi.samples.ds</Import-Package>
- <Private-Package>org.apache.cxf.dosgi.samples.ds.impl</Private-Package>
- <Service-Component>OSGI-INF/component.xml</Service-Component>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/ds/impl/src/main/java/org/apache/cxf/dosgi/samples/ds/impl/AdderServiceImpl.java
----------------------------------------------------------------------
diff --git a/samples/ds/impl/src/main/java/org/apache/cxf/dosgi/samples/ds/impl/AdderServiceImpl.java b/samples/ds/impl/src/main/java/org/apache/cxf/dosgi/samples/ds/impl/AdderServiceImpl.java
deleted file mode 100644
index 0d1fcba..0000000
--- a/samples/ds/impl/src/main/java/org/apache/cxf/dosgi/samples/ds/impl/AdderServiceImpl.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.ds.impl;
-
-import org.apache.cxf.dosgi.samples.ds.AdderService;
-
-public class AdderServiceImpl implements AdderService {
-
- public int add(int a, int b) {
- int result = a + b;
- System.out.println("Adder service invoked: " + a + " + " + b + " = " + result);
- return result;
- }
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/ds/impl/src/main/resources/OSGI-INF/component.xml
----------------------------------------------------------------------
diff --git a/samples/ds/impl/src/main/resources/OSGI-INF/component.xml b/samples/ds/impl/src/main/resources/OSGI-INF/component.xml
deleted file mode 100644
index 3687b78..0000000
--- a/samples/ds/impl/src/main/resources/OSGI-INF/component.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to you 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.
- -->
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="DS Service Sample">
- <implementation class="org.apache.cxf.dosgi.samples.ds.impl.AdderServiceImpl"/>
-
- <property name="service.exported.interfaces" value="*" />
- <property name="service.exported.configs" value="org.apache.cxf.ws" />
- <property name="org.apache.cxf.ws.address" value="http://localhost:9090/adder" />
-
- <service>
- <provide interface="org.apache.cxf.dosgi.samples.ds.AdderService"/>
- </service>
-</scr:component>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/ds/interface/pom.xml
----------------------------------------------------------------------
diff --git a/samples/ds/interface/pom.xml b/samples/ds/interface/pom.xml
deleted file mode 100644
index 68e6be7..0000000
--- a/samples/ds/interface/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-ds-interface</artifactId>
- <packaging>bundle</packaging>
- <name>Distributed OSGI Declarative Services Sample Interface Bundle</name>
- <version>1.8-SNAPSHOT</version>
-
- <parent>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-ds-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- </parent>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-Name>${project.name}</Bundle-Name>
- <Bundle-Description>The interfaces of the Distributed OSGi with Declarative Services sample</Bundle-Description>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Import-Package />
- <Export-Package>org.apache.cxf.dosgi.samples.ds</Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/ds/interface/src/main/java/org/apache/cxf/dosgi/samples/ds/AdderService.java
----------------------------------------------------------------------
diff --git a/samples/ds/interface/src/main/java/org/apache/cxf/dosgi/samples/ds/AdderService.java b/samples/ds/interface/src/main/java/org/apache/cxf/dosgi/samples/ds/AdderService.java
deleted file mode 100644
index f5e77fc..0000000
--- a/samples/ds/interface/src/main/java/org/apache/cxf/dosgi/samples/ds/AdderService.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.ds;
-
-public interface AdderService {
- int add(int a, int b);
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/ds/pom.xml
----------------------------------------------------------------------
diff --git a/samples/ds/pom.xml b/samples/ds/pom.xml
deleted file mode 100644
index fb8bd60..0000000
--- a/samples/ds/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-ds-parent</artifactId>
- <packaging>pom</packaging>
- <name>Distributed OSGI Declarative Services Sample</name>
- <version>1.8-SNAPSHOT</version>
-
- <parent>
- <groupId>org.apache.cxf.dosgi</groupId>
- <artifactId>cxf-dosgi-ri-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- <relativePath>../../parent/pom.xml</relativePath>
- </parent>
-
- <modules>
- <module>interface</module>
- <module>impl</module>
- <module>client</module>
- </modules>
-
-</project>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/greeter/client/pom.xml
----------------------------------------------------------------------
diff --git a/samples/greeter/client/pom.xml b/samples/greeter/client/pom.xml
deleted file mode 100644
index 38fe90c..0000000
--- a/samples/greeter/client/pom.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-greeter-client</artifactId>
- <packaging>bundle</packaging>
- <name>Distributed OSGI Greeter Bundle Client</name>
- <version>1.8-SNAPSHOT</version>
-
- <parent>
- <groupId>org.apache.cxf.dosgi</groupId>
- <artifactId>cxf-dosgi-ri-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- <relativePath>../../../parent/pom.xml</relativePath>
- </parent>
-
- <properties>
- <bundle.import.package>*</bundle.import.package>
- <bundle.private.package>org.apache.cxf.dosgi.samples.greeter.client</bundle.private.package>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-Name>CXF Distributed OSGi Greeter Demo Client Bundle</Bundle-Name>
- <Bundle-Description>The client-side implementation of the Distributed OSGi Greeter demo</Bundle-Description>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.apache.cxf.dosgi.samples.greeter.client.Activator</Bundle-Activator>
- <Import-Package>${bundle.import.package}</Import-Package>
- <Private-Package>${bundle.private.package}</Private-Package>
- <DynamicImport-Package>org.apache.cxf.dosgi.dsw.qos,org.apache.cxf</DynamicImport-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/Activator.java
----------------------------------------------------------------------
diff --git a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/Activator.java b/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/Activator.java
deleted file mode 100644
index 121573e..0000000
--- a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/Activator.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.greeter.client;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.cxf.dosgi.samples.greeter.GreeterData;
-import org.apache.cxf.dosgi.samples.greeter.GreeterException;
-import org.apache.cxf.dosgi.samples.greeter.GreeterService;
-import org.apache.cxf.dosgi.samples.greeter.GreetingPhrase;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class Activator implements BundleActivator {
-
- private ServiceTracker<GreeterService, GreeterService> tracker;
- private ConcurrentHashMap<GreeterService, GreeterDialog> dialogs =
- new ConcurrentHashMap<GreeterService, GreeterDialog>();
-
- public void start(final BundleContext bc) {
- tracker = new ServiceTracker<GreeterService, GreeterService>(bc, GreeterService.class, null) {
- @Override
- public GreeterService addingService(ServiceReference<GreeterService> reference) {
- GreeterService service = super.addingService(reference);
- dialogs.put(service, new GreeterDialog());
- useService(service);
- return service;
- }
-
- @Override
- public void removedService(ServiceReference<GreeterService> reference, GreeterService service) {
- super.removedService(reference, service);
- GreeterDialog dialog = dialogs.remove(service);
- dialog.dispose();
- }
- };
- tracker.open();
- }
-
- protected void useService(final GreeterService greeter) {
- Thread t = new Thread(new Runnable() {
- public void run() {
- greeterUI(greeter);
- }
- });
- t.start();
- }
-
- private void greeterUI(final GreeterService greeter) {
- while (true) {
- GreeterDialog dialog = dialogs.get(greeter);
- if (dialog == null) {
- return; // exit thread if service is removed
- }
- System.out.println("*** Opening greeter client dialog ***");
- dialog.resetSelection();
- dialog.setVisible(true); // blocks until dismissed
- Object gd = dialog.getSelection();
-
- if (gd instanceof String) {
- System.out.println("*** Invoking greeter ***");
- Map<GreetingPhrase, String> result = greeter.greetMe((String) gd);
-
- System.out.println("greetMe(\"" + gd + "\") returns:");
- for (Map.Entry<GreetingPhrase, String> greeting : result.entrySet()) {
- System.out.println(" " + greeting.getKey().getPhrase()
- + " " + greeting.getValue());
- }
- } else if (gd instanceof GreeterData) {
- System.out.println("*** Invoking greeter ***");
- try {
- GreetingPhrase[] result = greeter.greetMe((GreeterData) gd);
- System.out.println("greetMe(\"" + gd + "\") returns:");
- for (GreetingPhrase phrase : result) {
- System.out.println(" " + phrase.getPhrase());
- }
- } catch (GreeterException ex) {
- System.out.println("GreeterException: " + ex.toString());
- }
- }
- }
- }
-
- public void stop(BundleContext bc) throws Exception {
- tracker.close();
- }
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDataImpl.java
----------------------------------------------------------------------
diff --git a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDataImpl.java b/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDataImpl.java
deleted file mode 100644
index 368be36..0000000
--- a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDataImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.greeter.client;
-
-import org.apache.cxf.dosgi.samples.greeter.GreeterData;
-
-public class GreeterDataImpl implements GreeterData {
-
- private final String name;
- private final int age;
- private final boolean exception;
-
- public GreeterDataImpl(String n, int a, boolean b) {
- name = n;
- age = a;
- exception = b;
- }
-
- public String getName() {
- return name;
- }
-
- public int getAge() {
- return age;
- }
-
- public boolean isException() {
- return exception;
- }
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDialog.java
----------------------------------------------------------------------
diff --git a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDialog.java b/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDialog.java
deleted file mode 100644
index fa48792..0000000
--- a/samples/greeter/client/src/main/java/org/apache/cxf/dosgi/samples/greeter/client/GreeterDialog.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.greeter.client;
-
-import java.awt.Component;
-import java.awt.FlowLayout;
-import java.awt.Frame;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.BoxLayout;
-import javax.swing.ButtonGroup;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JDialog;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-import javax.swing.JTextField;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-
-public class GreeterDialog extends JDialog {
-
- private static final long serialVersionUID = 1L;
-
- JTextField name1field;
- JTextField name2field;
- JTextField ageTextField;
- JCheckBox throwExCB;
- Object selection;
-
- public GreeterDialog() {
- super((Frame) null, "Invoke Remote Greeter Service", true);
-
- JPanel panel = new JPanel();
- panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
- setContentPane(panel);
-
- final JRadioButton rb1 = new JRadioButton("invoke: Map<GreetingPhrase, String> greetMe(String name);");
- rb1.setSelected(true);
- rb1.setAlignmentX(Component.LEFT_ALIGNMENT);
- panel.add(rb1);
-
- final JPanel simplePanel = createFirstOptionPanel();
- rb1.addChangeListener(new ChangeListener() {
- public void stateChanged(ChangeEvent e) {
- enablePanel(simplePanel, rb1.isSelected());
- }
- });
- panel.add(simplePanel);
- panel.add(new JLabel(" ")); // add a spacer
-
- final JRadioButton rb2
- = new JRadioButton("invoke: GreetingPhrase[] greetMe(GreeterData data) throws GreeterException;");
- rb2.setAlignmentX(Component.LEFT_ALIGNMENT);
- panel.add(rb2);
-
- final JPanel complexPanel = createSecondOptionPanel();
-
- rb2.addChangeListener(new ChangeListener() {
- public void stateChanged(ChangeEvent e) {
- enablePanel(complexPanel, rb2.isSelected());
- }
- });
-
- panel.add(complexPanel);
- enablePanel(complexPanel, false);
-
- JPanel buttons = new JPanel(new FlowLayout(FlowLayout.CENTER));
- buttons.setAlignmentX(Component.LEFT_ALIGNMENT);
-
- JButton b1 = new JButton("Invoke");
- buttons.add(b1);
-
- b1.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- if (rb1.isSelected()) {
- selection = name1field.getText();
- } else {
- selection = new GreeterDataImpl(name2field.getText(),
- new Integer(ageTextField.getText()),
- throwExCB.isSelected());
- }
-
- setVisible(false);
- }
- });
-
- panel.add(buttons);
-
- ButtonGroup bg = new ButtonGroup();
- bg.add(rb1);
- bg.add(rb2);
-
- pack();
- setLocationRelativeTo(null); // centers frame on screen
- }
-
- private JPanel createFirstOptionPanel() {
- final JPanel simplePanel = new JPanel(new GridBagLayout());
- simplePanel.setAlignmentX(Component.LEFT_ALIGNMENT);
- GridBagConstraints c1 = new GridBagConstraints();
-
- JLabel lb1 = new JLabel("Name: ");
- c1.weightx = 0.0;
- c1.gridx = 0;
- c1.gridy = 0;
- c1.insets = new Insets(0, 25, 0, 0);
- c1.anchor = GridBagConstraints.LINE_START;
- simplePanel.add(lb1, c1);
-
- name1field = new JTextField(20);
- c1.weightx = 0.2;
- c1.gridx = 1;
- c1.gridy = 0;
- c1.insets = new Insets(0, 10, 0, 0);
- c1.anchor = GridBagConstraints.LINE_START;
- simplePanel.add(name1field, c1);
- return simplePanel;
- }
- private JPanel createSecondOptionPanel() {
- final JPanel complexPanel = new JPanel(new GridBagLayout());
- complexPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
- GridBagConstraints c2 = new GridBagConstraints();
-
- JLabel lb2 = new JLabel("Name: ");
- c2.weightx = 0.0;
- c2.gridx = 0;
- c2.gridy = 0;
- c2.insets = new Insets(0, 25, 0, 0);
- c2.anchor = GridBagConstraints.LINE_START;
- complexPanel.add(lb2, c2);
-
- name2field = new JTextField(20);
- c2.weightx = 0.2;
- c2.gridx = 1;
- c2.gridy = 0;
- c2.insets = new Insets(0, 10, 0, 0);
- c2.anchor = GridBagConstraints.LINE_START;
- complexPanel.add(name2field, c2);
-
- JLabel lb3 = new JLabel("Age: ");
- c2.weightx = 0.0;
- c2.gridx = 0;
- c2.gridy = 1;
- c2.insets = new Insets(0, 25, 0, 0);
- c2.anchor = GridBagConstraints.LINE_START;
- complexPanel.add(lb3, c2);
-
- ageTextField = new JTextField(7);
- c2.weightx = 0.2;
- c2.gridx = 1;
- c2.gridy = 1;
- c2.insets = new Insets(0, 10, 0, 0);
- c2.anchor = GridBagConstraints.LINE_START;
- complexPanel.add(ageTextField, c2);
-
- throwExCB = new JCheckBox("Throw Exception");
- c2.weightx = 0.0;
- c2.gridx = 0;
- c2.gridy = 2;
- c2.gridwidth = 2;
- c2.insets = new Insets(0, 22, 0, 0);
- c2.anchor = GridBagConstraints.LINE_START;
- complexPanel.add(throwExCB, c2);
- return complexPanel;
- }
-
- public void resetSelection() {
- selection = null;
- }
-
- public Object getSelection() {
- return selection;
- }
-
- private static void enablePanel(JPanel panel, boolean b) {
- for (Component c : panel.getComponents()) {
- c.setEnabled(b);
- }
- }
-
- public static void main(String ... args) {
- GreeterDialog gd = new GreeterDialog();
- gd.setVisible(true);
- System.exit(0);
- }
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/greeter/client/src/main/resources/OSGI-INF/cxf/intents/intent-map.xml
----------------------------------------------------------------------
diff --git a/samples/greeter/client/src/main/resources/OSGI-INF/cxf/intents/intent-map.xml b/samples/greeter/client/src/main/resources/OSGI-INF/cxf/intents/intent-map.xml
deleted file mode 100644
index 026bf13..0000000
--- a/samples/greeter/client/src/main/resources/OSGI-INF/cxf/intents/intent-map.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you 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.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:p="http://cxf.apache.org/policy"
- xmlns:wsp="http://www.w3.org/ns/ws-policy"
- xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
- xmlns:http="http://cxf.apache.org/transports/http/configuration"
- xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
- xsi:schemaLocation="
- http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
- http://www.w3.org/ns/ws-policy http://www.w3.org/2007/02/ws-policy.xsd
- http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
- http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <bean id="intentMap" class="org.apache.cxf.dosgi.dsw.qos.IntentMap">
- <property name="intents">
- <map>
- <entry key="reliability" value-ref="reliableMessaging"/>
- <entry key="decoupled" value-ref="decoupledAddressing"/>
- </map>
- </property>
- </bean>
-
- <p:policies id="reliableMessaging">
- <wsp:PolicyReference URI="#ReliabilityPolicy"/>
- <wsp:PolicyReference URI="#DecoupledPolicy"/>
- <wsp:PolicyReference URI="#AddressingPolicy"/>
- </p:policies>
-
- <p:policies id="decoupledAddressing">
- <wsp:PolicyReference URI="#DecoupledPolicy"/>
- <wsp:PolicyReference URI="#AddressingPolicy"/>
- </p:policies>
-
- <wsp:Policy wsu:Id="ReliabilityPolicy">
- <wsrm-policy:RMAssertion>
- <wsrm-policy:BaseRetransmissionInterval Milliseconds="4000"/>
- <wsrm-policy:AcknowledgementInterval Milliseconds="2000" />
- </wsrm-policy:RMAssertion>
- </wsp:Policy>
-
- <wsp:Policy wsu:Id="DecoupledPolicy">
- <wsp:ExactlyOne>
- <http:client DecoupledEndpoint="http://localhost:9970/decoupled_endpoint"/>
- </wsp:ExactlyOne>
- </wsp:Policy>
-
- <wsp:Policy wsu:Id="AddressingPolicy"
- xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
- <wsam:Addressing>
- <wsp:Policy />
- </wsam:Addressing>
- </wsp:Policy>
-
-</beans>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/greeter/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml
----------------------------------------------------------------------
diff --git a/samples/greeter/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml b/samples/greeter/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml
deleted file mode 100644
index af3486e..0000000
--- a/samples/greeter/client/src/main/resources/OSGI-INF/remote-service/remote-services.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to you 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.
- -->
-<endpoint-descriptions xmlns="http://www.osgi.org/xmlns/rsa/v1.0.0">
- <endpoint-description>
- <property name="objectClass">
- <array>
- <value>org.apache.cxf.dosgi.samples.greeter.GreeterService</value>
- </array>
- </property>
- <property name="endpoint.id">http://localhost:9090/greeter</property>
- <property name="service.imported.configs">org.apache.cxf.ws</property>
- </endpoint-description>
-</endpoint-descriptions>
-
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/greeter/impl/pom.xml
----------------------------------------------------------------------
diff --git a/samples/greeter/impl/pom.xml b/samples/greeter/impl/pom.xml
deleted file mode 100644
index 5b1a741..0000000
--- a/samples/greeter/impl/pom.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-greeter-impl</artifactId>
- <packaging>bundle</packaging>
- <name>Distributed OSGI Greeter Implementation Bundle</name>
- <version>1.8-SNAPSHOT</version>
-
- <parent>
- <groupId>org.apache.cxf.dosgi</groupId>
- <artifactId>cxf-dosgi-ri-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- <relativePath>../../../parent/pom.xml</relativePath>
- </parent>
-
- <properties>
- <bundle.import.package>*</bundle.import.package>
- <bundle.private.package>org.apache.cxf.dosgi.samples.greeter.impl</bundle.private.package>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-Name>CXF Distributed OSGi Greeter Demo Service Implementation Bundle</Bundle-Name>
- <Bundle-Description>The server-side implementation of the CXF Distributed OSGi Greeter demo</Bundle-Description>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.apache.cxf.dosgi.samples.greeter.impl.Activator</Bundle-Activator>
- <Import-Package>${bundle.import.package}</Import-Package>
- <Private-Package>${bundle.private.package}</Private-Package>
- <DynamicImport-Package>org.apache.cxf.dosgi.dsw.qos,org.apache.cxf</DynamicImport-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/Activator.java
----------------------------------------------------------------------
diff --git a/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/Activator.java b/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/Activator.java
deleted file mode 100644
index 9bbbf66..0000000
--- a/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/Activator.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.greeter.impl;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import org.apache.cxf.dosgi.samples.greeter.GreeterService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-public class Activator implements BundleActivator {
-
- private ServiceRegistration registration;
-
- public void start(BundleContext bc) throws Exception {
- Dictionary<String, String> props = new Hashtable<String, String>();
-
- props.put("service.exported.interfaces", "*");
- props.put("service.exported.configs", "org.apache.cxf.ws");
- props.put("org.apache.cxf.ws.address", "http://localhost:9090/greeter");
-
- registration = bc.registerService(GreeterService.class.getName(),
- new GreeterServiceImpl(), props);
- }
-
- public void stop(BundleContext bc) throws Exception {
- registration.unregister();
- }
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/GreeterServiceImpl.java
----------------------------------------------------------------------
diff --git a/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/GreeterServiceImpl.java b/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/GreeterServiceImpl.java
deleted file mode 100644
index 0a10dd8..0000000
--- a/samples/greeter/impl/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl/GreeterServiceImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.greeter.impl;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.cxf.dosgi.samples.greeter.GreeterData;
-import org.apache.cxf.dosgi.samples.greeter.GreeterException;
-import org.apache.cxf.dosgi.samples.greeter.GreeterService;
-import org.apache.cxf.dosgi.samples.greeter.GreetingPhrase;
-
-public class GreeterServiceImpl implements GreeterService {
-
- public Map<GreetingPhrase, String> greetMe(String name) {
- System.out.println("Invoking: greetMe(" + name + ")");
-
- Map<GreetingPhrase, String> greetings = new HashMap<GreetingPhrase, String>();
-
- greetings.put(new GreetingPhrase("Hello"), name);
- greetings.put(new GreetingPhrase("Hoi"), name);
- greetings.put(new GreetingPhrase("Hola"), name);
- greetings.put(new GreetingPhrase("Bonjour"), name);
-
- return greetings;
- }
-
- public GreetingPhrase[] greetMe(GreeterData gd) throws GreeterException {
- if (gd.isException()) {
- System.out.println("Throwing custom exception from: greetMe(" + gd.getName() + ")");
- throw new GreeterException(gd.getName());
- }
-
- String details = gd.getName() + "(" + gd.getAge() + ")";
- System.out.println("Invoking: greetMe(" + details + ")");
-
- return new GreetingPhrase[] {
- new GreetingPhrase("Howdy " + details),
- new GreetingPhrase("Hallo " + details),
- new GreetingPhrase("Ni hao " + details)
- };
- }
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/greeter/interface/pom.xml
----------------------------------------------------------------------
diff --git a/samples/greeter/interface/pom.xml b/samples/greeter/interface/pom.xml
deleted file mode 100644
index 1482869..0000000
--- a/samples/greeter/interface/pom.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.cxf.dosgi.samples</groupId>
- <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId>
- <packaging>bundle</packaging>
- <name>Distributed OSGI Greeter Interface Bundle</name>
- <version>1.8-SNAPSHOT</version>
-
- <parent>
- <groupId>org.apache.cxf.dosgi</groupId>
- <artifactId>cxf-dosgi-ri-parent</artifactId>
- <version>1.8-SNAPSHOT</version>
- <relativePath>../../../parent/pom.xml</relativePath>
- </parent>
-
- <properties>
- <bundle.import.package>*</bundle.import.package>
- <bundle.export.package>org.apache.cxf.dosgi.samples.greeter</bundle.export.package>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymockclassextension</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-Name>CXF Distributed OSGi Greeter Demo Interface Bundle</Bundle-Name>
- <Bundle-Description>The interfaces of the CXF Distributed OSGi Greeter demo</Bundle-Description>
- <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Import-Package>${bundle.import.package}</Import-Package>
- <Export-Package>${bundle.export.package}</Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterData.java
----------------------------------------------------------------------
diff --git a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterData.java b/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterData.java
deleted file mode 100644
index be23cc4..0000000
--- a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterData.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.greeter;
-
-public interface GreeterData {
- String getName();
- int getAge();
- boolean isException();
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterException.java
----------------------------------------------------------------------
diff --git a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterException.java b/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterException.java
deleted file mode 100644
index ebc58d1..0000000
--- a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.greeter;
-
-public class GreeterException extends Exception {
-
- private static final long serialVersionUID = 1L;
- private String name;
-
- public GreeterException() {
- }
-
- public GreeterException(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String theName) {
- name = theName;
- }
-
- @Override
- public String toString() {
- return "GreeterService can not greet " + name;
- }
-}
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/d73a3a7f/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterService.java
----------------------------------------------------------------------
diff --git a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterService.java b/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterService.java
deleted file mode 100644
index 1a0d0e0..0000000
--- a/samples/greeter/interface/src/main/java/org/apache/cxf/dosgi/samples/greeter/GreeterService.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.apache.cxf.dosgi.samples.greeter;
-
-import java.util.Map;
-
-public interface GreeterService {
-
- Map<GreetingPhrase, String> greetMe(String name);
- GreetingPhrase[] greetMe(GreeterData name) throws GreeterException;
-}