You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by zo...@apache.org on 2010/03/10 16:04:31 UTC

svn commit: r921382 - in /incubator/aries/trunk/tutorials: ./ blueprint/ blueprint/tutorial-modules/ blueprint/tutorial-modules/greeter-api/ blueprint/tutorial-modules/greeter-api/src/ blueprint/tutorial-modules/greeter-api/src/main/ blueprint/tutorial...

Author: zoe
Date: Wed Mar 10 15:04:29 2010
New Revision: 921382

URL: http://svn.apache.org/viewvc?rev=921382&view=rev
Log:
ARIES-226 Blue print tutorial initial commit

Added:
    incubator/aries/trunk/tutorials/blueprint/
    incubator/aries/trunk/tutorials/blueprint/pom.xml
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/pom.xml
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/java/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/java/org/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/java/org/apache/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/java/org/apache/aries/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/java/org/apache/aries/tutorials/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/java/org/apache/aries/tutorials/blueprint/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/java/org/apache/aries/tutorials/blueprint/greeter/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/java/org/apache/aries/tutorials/blueprint/greeter/api/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/java/org/apache/aries/tutorials/blueprint/greeter/api/GreeterMessageService.java
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/resources/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/test/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/pom.xml
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/java/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/java/org/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/java/org/apache/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/java/org/apache/aries/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/java/org/apache/aries/tutorials/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/GreeterBlueprintClient.java
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/resources/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/resources/OSGI-INF/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/resources/OSGI-INF/blueprint/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/test/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/pom.xml
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/osgi/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/osgi/ClientBundleActivator.java
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/osgi/GreeterTestClient.java
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/resources/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/test/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/pom.xml
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/org/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/org/apache/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/org/apache/aries/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/org/apache/aries/tutorials/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/blueprint/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/blueprint/GreeterMessageServiceImpl.java
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/resources/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/resources/OSGI-INF/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/resources/OSGI-INF/blueprint/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/test/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/pom.xml
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/osgi/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/osgi/GreeterMessageServiceImpl.java
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/osgi/ServiceRegisteringActivator.java
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/resources/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/test/
    incubator/aries/trunk/tutorials/blueprint/tutorial-modules/pom.xml
    incubator/aries/trunk/tutorials/pom.xml

Added: incubator/aries/trunk/tutorials/blueprint/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/pom.xml?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/pom.xml (added)
+++ incubator/aries/trunk/tutorials/blueprint/pom.xml Wed Mar 10 15:04:29 2010
@@ -0,0 +1,35 @@
+<?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">
+	<parent>
+		<groupId>org.apache.aries.tutorials</groupId>
+		<artifactId>tutorials</artifactId>
+		<version>0.1-incubating-SNAPSHOT</version>
+	</parent>
+
+	<modelVersion>4.0.0</modelVersion>
+
+	<groupId>org.apache.aries.tutorials.blueprint</groupId>
+	<artifactId>blueprint</artifactId>
+	<name>Blueprint Tutorial</name>
+	<packaging>pom</packaging>
+	<version>0.1-incubating-SNAPSHOT</version>
+	<modules>
+		<module>tutorial-modules</module>
+	</modules>
+</project>

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/pom.xml?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/pom.xml (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/pom.xml Wed Mar 10 15:04:29 2010
@@ -0,0 +1,47 @@
+<?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.aries.tutorials.blueprint</groupId>
+	<artifactId>org.apache.aries.tutorials.blueprint.greeter.api</artifactId>
+	<packaging>bundle</packaging>
+
+	<name>Greeter API</name>
+	<version>0.1-incubating-SNAPSHOT</version>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<version>2.0.1</version>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+                                                <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+						<Export-Package>org.apache.aries.tutorials.blueprint.greeter.api</Export-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<profiles>
+	</profiles>
+</project>

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/java/org/apache/aries/tutorials/blueprint/greeter/api/GreeterMessageService.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/java/org/apache/aries/tutorials/blueprint/greeter/api/GreeterMessageService.java?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/java/org/apache/aries/tutorials/blueprint/greeter/api/GreeterMessageService.java (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-api/src/main/java/org/apache/aries/tutorials/blueprint/greeter/api/GreeterMessageService.java Wed Mar 10 15:04:29 2010
@@ -0,0 +1,23 @@
+/**
+ * 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.aries.tutorials.blueprint.greeter.api;
+
+public interface GreeterMessageService {
+    public String getGreetingMessage();
+}

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/pom.xml?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/pom.xml (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/pom.xml Wed Mar 10 15:04:29 2010
@@ -0,0 +1,59 @@
+<?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.aries.tutorials.blueprint</groupId>
+	<artifactId>org.apache.aries.tutorials.blueprint.greeter.client.blueprint</artifactId>
+	<packaging>bundle</packaging>
+	<name>Greeter Blueprint Client</name>
+	<version>0.1-incubating-SNAPSHOT</version>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin
+                </artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi</artifactId>
+			<version>3.0.0</version>
+			<type>jar</type>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.aries.tutorials.blueprint</groupId>
+			<artifactId>org.apache.aries.tutorials.blueprint.greeter.api</artifactId>
+			<version>0.1-incubating-SNAPSHOT</version>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/GreeterBlueprintClient.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/GreeterBlueprintClient.java?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/GreeterBlueprintClient.java (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/GreeterBlueprintClient.java Wed Mar 10 15:04:29 2010
@@ -0,0 +1,46 @@
+/**
+ * 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.aries.tutorials.blueprint.greeter.client;
+
+import org.apache.aries.tutorials.blueprint.greeter.api.GreeterMessageService;
+
+public class GreeterBlueprintClient {
+    GreeterMessageService greeterMessageService;
+    String clientID;
+    
+    public GreeterBlueprintClient(String clientID){
+        this.clientID = clientID;
+    }
+    
+    public void setGreeterMessageService(GreeterMessageService gms){
+        this.greeterMessageService = gms;
+    }
+    
+    public void doRequests(){
+        System.out.println("Invoking injected service...");
+        printResult(greeterMessageService.getGreetingMessage());
+    }
+    
+    private void printResult(String response){
+        System.out.println("**********************************");
+        System.out.println("*"+clientID);
+        System.out.println("*"+response);
+        System.out.println("**********************************");
+    }
+}

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml Wed Mar 10 15:04:29 2010
@@ -0,0 +1,31 @@
+<?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.
+	-->
+
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+	<reference id="greeterService"
+		interface="org.apache.aries.tutorials.blueprint.greeter.api.GreeterMessageService"
+		timeout="10000" availability="mandatory" />
+
+	<bean id="clientBean"
+		class="org.apache.aries.tutorials.blueprint.greeter.client.GreeterBlueprintClient"
+		activation="eager" init-method="doRequests">
+		<argument value="Blueprint Client" />
+		<property name="greeterMessageService" ref="greeterService" />
+	</bean>
+
+</blueprint>

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/pom.xml?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/pom.xml (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/pom.xml Wed Mar 10 15:04:29 2010
@@ -0,0 +1,59 @@
+<?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.aries.tutorials.blueprint</groupId>
+	<artifactId>org.apache.aries.tutorials.blueprint.greeter.client.osgi</artifactId>
+	<packaging>bundle</packaging>
+	<name>Greeter OSGi Client</name>
+	<version>0.1-incubating-SNAPSHOT</version>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin
+                </artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+						<Bundle-Activator>org.apache.aries.tutorials.blueprint.greeter.client.osgi.ClientBundleActivator</Bundle-Activator>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.aries.tutorials.blueprint</groupId>
+			<artifactId>org.apache.aries.tutorials.blueprint.greeter.api</artifactId>
+			<version>0.1-incubating-SNAPSHOT</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi</artifactId>
+			<version>3.0.0</version>
+			<type>jar</type>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/osgi/ClientBundleActivator.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/osgi/ClientBundleActivator.java?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/osgi/ClientBundleActivator.java (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/osgi/ClientBundleActivator.java Wed Mar 10 15:04:29 2010
@@ -0,0 +1,35 @@
+/**
+ * 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.aries.tutorials.blueprint.greeter.client.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class ClientBundleActivator implements BundleActivator {
+
+    public void start(BundleContext context) throws Exception {
+        //We use the 'start' notification to kick off our client.
+        GreeterTestClient hwc = new GreeterTestClient(context, "OSGI-Client");
+        hwc.doRequests();
+    }
+
+    public void stop(BundleContext context) throws Exception {
+    }
+
+}

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/osgi/GreeterTestClient.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/osgi/GreeterTestClient.java?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/osgi/GreeterTestClient.java (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-client-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/client/osgi/GreeterTestClient.java Wed Mar 10 15:04:29 2010
@@ -0,0 +1,136 @@
+/**
+ * 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.aries.tutorials.blueprint.greeter.client.osgi;
+
+import org.apache.aries.tutorials.blueprint.greeter.api.GreeterMessageService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * Example of various approaches to using an osgi service.
+ */
+public class GreeterTestClient {
+    String clientID = "<unset>";
+    ServiceTracker tracker = null;
+    GreeterMessageService cachedService = null;
+    BundleContext owningContext;
+    
+    GreeterMessageService proxy = null;
+    
+    /**
+     * A simple class to hide if a service is available to invoke.
+     */
+    class GreeterMessageServiceProxy implements GreeterMessageService{
+        ServiceTracker greetingServiceTracker = null;
+        public GreeterMessageServiceProxy(BundleContext ctx){
+            greetingServiceTracker = new ServiceTracker(ctx, GreeterMessageService.class.getName(), null);
+            greetingServiceTracker.open();
+        }
+        public String getGreetingMessage(){
+            if(greetingServiceTracker.getTrackingCount()>0){
+                return ((GreeterMessageService)greetingServiceTracker.getService()).getGreetingMessage();
+            }else{
+                return "<No Service Available>";
+            }
+            
+        }
+    }
+    
+    public GreeterTestClient(BundleContext ctx, String clientID){
+     this.clientID = clientID;
+     owningContext = ctx;
+     
+     //setup for proxied service usage.
+     proxy = new GreeterMessageServiceProxy(ctx);
+     
+     //setup for tracker usage.
+     tracker = new ServiceTracker(ctx, GreeterMessageService.class.getName(), null);
+     tracker.open();
+     
+     //setup for super optimistic osgi service usage ;-)
+     try{
+         cachedService  = (GreeterMessageService)ctx.getService(ctx.getServiceReference(GreeterMessageService.class.getName()));
+     }catch(RuntimeException e){
+         System.err.println("Unable to cache service at bundle start!");
+     }
+    }
+    
+    public void doRequests(){
+        System.out.println("Proxy based...");
+        doRequestUsingProxy();
+        System.out.println("Tracker based...");
+        doRequestUsingTracker();
+        System.out.println("Immediate Lookup... ");
+        doRequestUsingImmediateLookup(owningContext);
+        System.out.println("Extremely hopeful...");
+        doRequestUsingCachedService();
+    }
+    
+    private void doRequestUsingImmediateLookup(BundleContext ctx){
+        ServiceReference ref = ctx.getServiceReference(GreeterMessageService.class.getName());
+        if(ref!=null){
+            GreeterMessageService greetingService = (GreeterMessageService)ctx.getService(ref);
+            if(greetingService!=null){
+                String response = greetingService.getGreetingMessage();
+                printResult(response);
+            }else{
+                System.err.println("Immediate lookup gave null for getService");
+            }
+            ctx.ungetService(ref); // dont forget this!!
+        }else{
+            System.err.println("Immediate lookup gave null service reference");
+        }
+    }
+    
+    private void doRequestUsingTracker(){
+        System.out.println("Tracker is tracking.. "+tracker.getTrackingCount()+" services");
+        GreeterMessageService greetingService = (GreeterMessageService)tracker.getService();
+        if(greetingService!=null){
+            String response = greetingService.getGreetingMessage();
+            printResult(response);
+        }else{
+            System.err.println("Tracker gave null for service..");
+        }
+    }
+    
+    private void doRequestUsingCachedService(){
+        try{
+            printResult(cachedService.getGreetingMessage());
+        }catch(RuntimeException e){
+            System.err.println("Unable to use cached service. "+e);
+        }
+    }
+    
+    private void doRequestUsingProxy(){
+        try{
+            printResult(proxy.getGreetingMessage());
+        }catch(RuntimeException e){
+            System.err.println("Unable to use proxied service. "+e);
+        }
+    }
+    
+    private void printResult(String response){
+        System.out.println("**********************************");
+        System.out.println("*"+clientID);
+        System.out.println("*"+response);
+        System.out.println("**********************************");
+    }
+
+}

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/pom.xml?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/pom.xml (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/pom.xml Wed Mar 10 15:04:29 2010
@@ -0,0 +1,58 @@
+<?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.aries.tutorials.blueprint</groupId>
+	<artifactId>org.apache.aries.tutorials.blueprint.greeter.server.blueprint</artifactId>
+	<packaging>bundle</packaging>
+	<name>Greeter Blueprint Server</name>
+	<version>0.1-incubating-SNAPSHOT</version>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin
+                </artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.aries.tutorials.blueprint</groupId>
+			<artifactId>org.apache.aries.tutorials.blueprint.greeter.api</artifactId>
+			<version>0.1-incubating-SNAPSHOT</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi</artifactId>
+			<version>3.0.0</version>
+			<type>jar</type>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/blueprint/GreeterMessageServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/blueprint/GreeterMessageServiceImpl.java?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/blueprint/GreeterMessageServiceImpl.java (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/blueprint/GreeterMessageServiceImpl.java Wed Mar 10 15:04:29 2010
@@ -0,0 +1,38 @@
+/**
+ * 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.aries.tutorials.blueprint.greeter.server.blueprint;
+
+
+import org.apache.aries.tutorials.blueprint.greeter.api.GreeterMessageService;
+
+
+public class GreeterMessageServiceImpl implements GreeterMessageService{
+    private String sender="<unset>";
+    
+    public String getGreetingMessage() {
+        return "Hello World! from : "+sender;
+    }
+    
+    public void setSender(String sender){
+        this.sender=sender;
+        if(this.sender==null)
+            this.sender="";
+    }
+
+}

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml Wed Mar 10 15:04:29 2010
@@ -0,0 +1,27 @@
+<?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.
+	-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+	<service id="greeterService"
+		interface="org.apache.aries.tutorials.blueprint.greeter.api.GreeterMessageService">
+		<bean
+			class="org.apache.aries.tutorials.blueprint.greeter.server.blueprint.GreeterMessageServiceImpl">
+			<property name="sender" value="Blueprint Greeting Service" />
+		</bean>
+	</service>
+
+</blueprint>

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/pom.xml?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/pom.xml (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/pom.xml Wed Mar 10 15:04:29 2010
@@ -0,0 +1,59 @@
+<?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.aries.tutorials.blueprint</groupId>
+	<artifactId>org.apache.aries.tutorials.blueprint.greeter.server.osgi</artifactId>
+	<packaging>bundle</packaging>
+	<name>Greeter OSGi Server</name>
+	<version>0.1-incubating-SNAPSHOT</version>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin
+                </artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+						<Bundle-Activator>org.apache.aries.tutorials.blueprint.greeter.server.osgi.ServiceRegisteringActivator</Bundle-Activator>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.aries.tutorials.blueprint</groupId>
+			<artifactId>org.apache.aries.tutorials.blueprint.greeter.api</artifactId>
+			<version>0.1-incubating-SNAPSHOT</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi</artifactId>
+			<version>3.0.0</version>
+			<type>jar</type>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/osgi/GreeterMessageServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/osgi/GreeterMessageServiceImpl.java?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/osgi/GreeterMessageServiceImpl.java (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/osgi/GreeterMessageServiceImpl.java Wed Mar 10 15:04:29 2010
@@ -0,0 +1,37 @@
+/**
+ * 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.aries.tutorials.blueprint.greeter.server.osgi;
+
+import org.apache.aries.tutorials.blueprint.greeter.api.GreeterMessageService;
+
+
+public class GreeterMessageServiceImpl implements GreeterMessageService{
+    private String sender="<unset>";
+    
+    public String getGreetingMessage() {
+        return "Hello World! from : "+sender;
+    }
+    
+    public void setSender(String sender){
+        this.sender=sender;
+        if(this.sender==null)
+            this.sender="";
+    }
+
+}

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/osgi/ServiceRegisteringActivator.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/osgi/ServiceRegisteringActivator.java?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/osgi/ServiceRegisteringActivator.java (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/greeter-server-osgi/src/main/java/org/apache/aries/tutorials/blueprint/greeter/server/osgi/ServiceRegisteringActivator.java Wed Mar 10 15:04:29 2010
@@ -0,0 +1,48 @@
+/**
+ * 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.aries.tutorials.blueprint.greeter.server.osgi;
+
+import java.util.Properties;
+
+import org.apache.aries.tutorials.blueprint.greeter.api.GreeterMessageService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+public class ServiceRegisteringActivator implements BundleActivator {
+
+    private ServiceRegistration greeterServiceRegistration=null;
+    
+    public void start(BundleContext context) throws Exception {
+        //create the class providing service, and initialise it
+        GreeterMessageServiceImpl helloService = new GreeterMessageServiceImpl();
+        helloService.setSender("OSGI via BundleActivator");
+        
+        //register the service
+        greeterServiceRegistration = 
+            context.registerService(GreeterMessageService.class.getName(), helloService, new Properties());
+    }
+
+    public void stop(BundleContext context) throws Exception {
+        //unregister the service
+        if(greeterServiceRegistration!=null)
+            greeterServiceRegistration.unregister();
+    }
+
+}

Added: incubator/aries/trunk/tutorials/blueprint/tutorial-modules/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/blueprint/tutorial-modules/pom.xml?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/blueprint/tutorial-modules/pom.xml (added)
+++ incubator/aries/trunk/tutorials/blueprint/tutorial-modules/pom.xml Wed Mar 10 15:04:29 2010
@@ -0,0 +1,40 @@
+<?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>
+
+  <parent>
+    <groupId>org.apache.aries.tutorials.blueprint</groupId>
+    <artifactId>blueprint</artifactId>
+    <version>0.1-incubating-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.aries.tutorials.blueprint</groupId>
+  <artifactId>tutorial-modules</artifactId>
+  <name>Greeter Modules</name>
+  <packaging>pom</packaging>
+  <version>0.1-incubating-SNAPSHOT</version>
+
+  <modules>
+  	<module>greeter-api</module>
+  	<module>greeter-client-osgi</module>
+  	<module>greeter-server-osgi</module>
+  	<module>greeter-client-blueprint</module>
+  	<module>greeter-server-blueprint</module>
+  </modules>
+</project>

Added: incubator/aries/trunk/tutorials/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials/pom.xml?rev=921382&view=auto
==============================================================================
--- incubator/aries/trunk/tutorials/pom.xml (added)
+++ incubator/aries/trunk/tutorials/pom.xml Wed Mar 10 15:04:29 2010
@@ -0,0 +1,244 @@
+<?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>
+
+    <parent>
+        <groupId>org.apache.aries</groupId>
+        <artifactId>java5-parent</artifactId>
+        <version>0.1-incubating-SNAPSHOT</version>
+    </parent>
+    
+    
+    <groupId>org.apache.aries.tutorials</groupId>
+    <artifactId>tutorials</artifactId>
+    <version>0.1-incubating-SNAPSHOT</version>
+    <name>Apache Aries Tutorials</name>
+    <packaging>pom</packaging>
+  
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/aries/trunk/tutorials</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/aries/trunk/tutorials</developerConnection>
+        <url>http://svn.apache.org/viewvc/incubator/aries/trunk/tutorials</url>
+    </scm>
+
+    <properties>
+        <ariesApplicationVersion>0.1-incubating-SNAPSHOT</ariesApplicationVersion>
+        <ariesBlueprintVersion>0.1-incubating-SNAPSHOT</ariesBlueprintVersion>
+        <ariesJmxVersion>0.1-incubating-SNAPSHOT</ariesJmxVersion>
+        <ariesJndiVersion>0.1-incubating-SNAPSHOT</ariesJndiVersion>
+        <ariesJpaVersion>0.1-incubating-SNAPSHOT</ariesJpaVersion>
+        <ariesTransactionVersion>0.1-incubating-SNAPSHOT</ariesTransactionVersion>
+        <ariesUtilVersion>0.1-incubating-SNAPSHOT</ariesUtilVersion>
+        <ariesWebVersion>0.1-incubating-SNAPSHOT</ariesWebVersion>
+    </properties>
+    
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>org.apache.felix.main</artifactId>
+                <version>2.0.4</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>org.apache.felix.shell</artifactId>
+                <version>1.4.2</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>org.apache.felix.shell.tui</artifactId>
+                <version>1.4.1</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>org.apache.felix.eventadmin</artifactId>
+                <version>1.2.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.web</groupId>
+                <artifactId>pax-web-extender-war</artifactId>
+                <version>0.7.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.web</groupId>
+                <artifactId>pax-web-jetty-bundle</artifactId>
+                <version>0.7.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.ops4j.pax.web</groupId>
+                <artifactId>pax-web-jsp</artifactId>
+                <version>0.7.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.geronimo.specs</groupId>
+                <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
+                <version>2.0.0</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.geronimo.specs</groupId>
+                <artifactId>geronimo-servlet_2.5_spec</artifactId>
+                <version>1.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.geronimo.specs</groupId>
+                <artifactId>geronimo-jsp_2.1_spec</artifactId>
+                <version>1.0.1</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.geronimo.specs</groupId>
+                <artifactId>geronimo-jta_1.1_spec</artifactId>
+                <version>1.1.1</version>
+            </dependency>
+<!--
+            <dependency>
+                <groupId>org.apache.geronimo.specs</groupId>
+                <artifactId>geronimo-jpa_1.0_spec</artifactId>
+                <version>1.1.2</version>
+            </dependency>
+-->
+            <dependency>
+                <groupId>org.apache.geronimo.specs</groupId>
+                <artifactId>geronimo-jpa_2.0_spec</artifactId>
+                <version>1.0</version>
+            </dependency>
+            <dependency>
+                <groupId>javax.servlet</groupId>
+                <artifactId>jstl</artifactId>
+                <version>1.2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.derby</groupId>
+                <artifactId>derby</artifactId>
+                <version>10.5.3.0_1</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.openjpa</groupId>
+                <artifactId>openjpa</artifactId>
+                <version>2.0.0-beta2</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.openjpa</groupId>
+                <artifactId>openjpa-persistence-jdbc</artifactId>
+                <version>2.0.0-beta2</version>
+            </dependency>
+            <dependency>
+                <groupId>net.sourceforge.serp</groupId>
+                <artifactId>serp</artifactId>
+                <version>1.13.1</version>
+            </dependency>
+            <!-- bundle version of serp necessary for equinox assembly using openjpa -->
+            <dependency>
+                <groupId>org.apache.servicemix.bundles</groupId>
+                <artifactId>org.apache.servicemix.bundles.serp</artifactId>
+                <version>1.13.1_2</version>
+            </dependency>
+            <dependency>
+                <groupId>commons-lang</groupId>
+                <artifactId>commons-lang</artifactId>
+                <version>2.5</version>
+            </dependency>
+            <dependency>
+                <groupId>commons-pool</groupId>
+                <artifactId>commons-pool</artifactId>
+                <version>1.5.4</version>
+            </dependency>
+            <dependency>
+                <groupId>commons-collections</groupId>
+                <artifactId>commons-collections</artifactId>
+                <version>3.2.1</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.servicemix.bundles</groupId>
+                <artifactId>org.apache.servicemix.bundles.cglib</artifactId>
+                <version>2.1_3_4</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>org.apache.felix.fileinstall</artifactId>
+                <version>2.0.8</version>
+            </dependency>
+
+            <!-- other aries subproject dependency management -->
+            <dependency>
+                <groupId>org.apache.aries</groupId>
+                <artifactId>org.apache.aries.util</artifactId>
+                <version>${ariesUtilVersion}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.application</groupId>
+                <artifactId>application</artifactId>
+                <version>${ariesApplicationVersion}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.blueprint</groupId>
+                <artifactId>blueprint</artifactId>
+                <version>${ariesBlueprintVersion}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.jmx</groupId>
+                <artifactId>jmx</artifactId>
+                <version>${ariesJmxVersion}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.jndi</groupId>
+                <artifactId>jndi</artifactId>
+                <version>${ariesJndiVersion}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.jpa</groupId>
+                <artifactId>jpa</artifactId>
+                <version>${ariesJpaVersion}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.transaction</groupId>
+                <artifactId>transaction</artifactId>
+                <version>${ariesTransactionVersion}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.web</groupId>
+                <artifactId>web</artifactId>
+                <version>${ariesWebVersion}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+        </dependencies>
+    </dependencyManagement>
+
+    <modules>
+        <module>blueprint</module>
+    </modules>
+
+</project>