You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2009/10/07 07:43:42 UTC

svn commit: r822594 - in /tuscany/sandbox/rfeng/helloworld-jsp-google-appengine: ./ src/org/ src/org/apache/ src/org/apache/tuscany/ src/org/apache/tuscany/sca/ src/org/apache/tuscany/sca/gae/ src/org/apache/tuscany/sca/gae/services/ src/sample/ war/WE...

Author: rfeng
Date: Wed Oct  7 05:43:41 2009
New Revision: 822594

URL: http://svn.apache.org/viewvc?rev=822594&view=rev
Log:
Add POJO components to represent GAE services

Added:
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/DatastoreServiceImpl.java   (with props)
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/MemcacheServiceImpl.java   (with props)
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/URLFetchServiceImpl.java   (with props)
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/UserServiceImpl.java   (with props)
Modified:
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/pom.xml
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/sample/HelloworldService.java
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/sample/HelloworldServiceImpl.java
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/war/WEB-INF/appengine-web.xml
    tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/war/WEB-INF/web.composite

Modified: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/pom.xml?rev=822594&r1=822593&r2=822594&view=diff
==============================================================================
--- tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/pom.xml (original)
+++ tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/pom.xml Wed Oct  7 05:43:41 2009
@@ -44,7 +44,37 @@
             <version>2.0-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
-
+        
+        <!-- 
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+         -->
+         
+        <!-- 
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-feature-webservice</artifactId>
+            <type>pom</type>
+            <version>2.0-SNAPSHOT</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.tuscany.sca</groupId>
+                    <artifactId>tuscany-host-jetty</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-feature-webapp</artifactId>
+            <type>pom</type>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+        -->
     </dependencies>
 
     <build>

Added: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/DatastoreServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/DatastoreServiceImpl.java?rev=822594&view=auto
==============================================================================
--- tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/DatastoreServiceImpl.java (added)
+++ tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/DatastoreServiceImpl.java Wed Oct  7 05:43:41 2009
@@ -0,0 +1,130 @@
+/*
+ * 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.tuscany.sca.gae.services;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+import com.google.appengine.api.datastore.DatastoreService;
+import com.google.appengine.api.datastore.DatastoreServiceFactory;
+import com.google.appengine.api.datastore.Entity;
+import com.google.appengine.api.datastore.EntityNotFoundException;
+import com.google.appengine.api.datastore.Key;
+import com.google.appengine.api.datastore.KeyRange;
+import com.google.appengine.api.datastore.PreparedQuery;
+import com.google.appengine.api.datastore.Query;
+import com.google.appengine.api.datastore.Transaction;
+
+/**
+ * 
+ */
+@Service(DatastoreService.class)
+@Scope("COMPOSITE")
+public class DatastoreServiceImpl implements DatastoreService {
+    private DatastoreService delegate;
+
+    public void init() {
+        delegate = DatastoreServiceFactory.getDatastoreService();
+    }
+
+    public KeyRange allocateIds(Key parent, String kind, long num) {
+        return delegate.allocateIds(parent, kind, num);
+    }
+
+    public KeyRange allocateIds(String kind, long num) {
+        return delegate.allocateIds(kind, num);
+    }
+
+    public Transaction beginTransaction() {
+        return delegate.beginTransaction();
+    }
+
+    public void delete(Iterable<Key> keys) {
+        delegate.delete(keys);
+    }
+
+    public void delete(Key... keys) {
+        delegate.delete(keys);
+    }
+
+    public void delete(Transaction txn, Iterable<Key> keys) {
+        delegate.delete(txn, keys);
+    }
+
+    public void delete(Transaction txn, Key... keys) {
+        delegate.delete(txn, keys);
+    }
+
+    public Map<Key, Entity> get(Iterable<Key> keys) {
+        return delegate.get(keys);
+    }
+
+    public Entity get(Key key) throws EntityNotFoundException {
+        return delegate.get(key);
+    }
+
+    public Map<Key, Entity> get(Transaction txn, Iterable<Key> keys) {
+        return delegate.get(txn, keys);
+    }
+
+    public Entity get(Transaction txn, Key key) throws EntityNotFoundException {
+        return delegate.get(txn, key);
+    }
+
+    public Collection<Transaction> getActiveTransactions() {
+        return delegate.getActiveTransactions();
+    }
+
+    public Transaction getCurrentTransaction() {
+        return delegate.getCurrentTransaction();
+    }
+
+    public Transaction getCurrentTransaction(Transaction returnedIfNoTxn) {
+        return delegate.getCurrentTransaction(returnedIfNoTxn);
+    }
+
+    public PreparedQuery prepare(Query query) {
+        return delegate.prepare(query);
+    }
+
+    public PreparedQuery prepare(Transaction txn, Query query) {
+        return delegate.prepare(txn, query);
+    }
+
+    public Key put(Entity entity) {
+        return delegate.put(entity);
+    }
+
+    public List<Key> put(Iterable<Entity> entities) {
+        return delegate.put(entities);
+    }
+
+    public Key put(Transaction txn, Entity entity) {
+        return delegate.put(txn, entity);
+    }
+
+    public List<Key> put(Transaction txn, Iterable<Entity> entities) {
+        return delegate.put(txn, entities);
+    }
+}

Propchange: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/DatastoreServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/DatastoreServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/MemcacheServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/MemcacheServiceImpl.java?rev=822594&view=auto
==============================================================================
--- tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/MemcacheServiceImpl.java (added)
+++ tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/MemcacheServiceImpl.java Wed Oct  7 05:43:41 2009
@@ -0,0 +1,128 @@
+/*
+ * 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.tuscany.sca.gae.services;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+import com.google.appengine.api.memcache.ErrorHandler;
+import com.google.appengine.api.memcache.Expiration;
+import com.google.appengine.api.memcache.MemcacheService;
+import com.google.appengine.api.memcache.MemcacheServiceFactory;
+import com.google.appengine.api.memcache.Stats;
+
+/**
+ * 
+ */
+@Service(MemcacheService.class)
+@Scope("COMPOSITE")
+public class MemcacheServiceImpl implements MemcacheService {
+    private MemcacheService delegate;
+
+    @Init
+    public void init() {
+        delegate = MemcacheServiceFactory.getMemcacheService();
+    }
+    
+    public void clearAll() {
+        delegate.clearAll();
+    }
+
+    public boolean contains(Object key) {
+        return delegate.contains(key);
+    }
+
+    public boolean delete(Object key, long millisNoReAdd) {
+        return delegate.delete(key, millisNoReAdd);
+    }
+
+    public boolean delete(Object key) {
+        return delegate.delete(key);
+    }
+
+    public Set<Object> deleteAll(Collection<Object> keys, long millisNoReAdd) {
+        return delegate.deleteAll(keys, millisNoReAdd);
+    }
+
+    public Set<Object> deleteAll(Collection<Object> keys) {
+        return delegate.deleteAll(keys);
+    }
+
+    public Object get(Object key) {
+        return delegate.get(key);
+    }
+
+    public Map<Object, Object> getAll(Collection<Object> keys) {
+        return delegate.getAll(keys);
+    }
+
+    public ErrorHandler getErrorHandler() {
+        return delegate.getErrorHandler();
+    }
+
+    public String getNamespace() {
+        return delegate.getNamespace();
+    }
+
+    public Stats getStatistics() {
+        return delegate.getStatistics();
+    }
+
+    public Long increment(Object key, long delta) {
+        return delegate.increment(key, delta);
+    }
+
+    public boolean put(Object key, Object value, Expiration expires, SetPolicy policy) {
+        return delegate.put(key, value, expires, policy);
+    }
+
+    public void put(Object key, Object value, Expiration expires) {
+        delegate.put(key, value, expires);
+    }
+
+    public void put(Object key, Object value) {
+        delegate.put(key, value);
+    }
+
+    public Set<Object> putAll(Map<Object, Object> values, Expiration expires, SetPolicy policy) {
+        return delegate.putAll(values, expires, policy);
+    }
+
+    public void putAll(Map<Object, Object> values, Expiration expires) {
+        delegate.putAll(values, expires);
+    }
+
+    public void putAll(Map<Object, Object> values) {
+        delegate.putAll(values);
+    }
+
+    public void setErrorHandler(ErrorHandler handler) {
+        delegate.setErrorHandler(handler);
+    }
+
+    public void setNamespace(String newNamespace) {
+        delegate.setNamespace(newNamespace);
+    }
+}

Propchange: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/MemcacheServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/MemcacheServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/URLFetchServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/URLFetchServiceImpl.java?rev=822594&view=auto
==============================================================================
--- tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/URLFetchServiceImpl.java (added)
+++ tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/URLFetchServiceImpl.java Wed Oct  7 05:43:41 2009
@@ -0,0 +1,54 @@
+/*
+ * 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.tuscany.sca.gae.services;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+import com.google.appengine.api.urlfetch.HTTPRequest;
+import com.google.appengine.api.urlfetch.HTTPResponse;
+import com.google.appengine.api.urlfetch.URLFetchService;
+import com.google.appengine.api.urlfetch.URLFetchServiceFactory;
+
+/**
+ * 
+ */
+@Service(URLFetchService.class)
+@Scope("COMPOSITE")
+public class URLFetchServiceImpl implements URLFetchService {
+    private URLFetchService delegate;
+
+    @Init
+    public void init() {
+        delegate = URLFetchServiceFactory.getURLFetchService();
+    }
+
+    public HTTPResponse fetch(HTTPRequest request) throws IOException {
+        return delegate.fetch(request);
+    }
+
+    public HTTPResponse fetch(URL url) throws IOException {
+        return delegate.fetch(url);
+    }
+}

Propchange: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/URLFetchServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/URLFetchServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/UserServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/UserServiceImpl.java?rev=822594&view=auto
==============================================================================
--- tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/UserServiceImpl.java (added)
+++ tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/UserServiceImpl.java Wed Oct  7 05:43:41 2009
@@ -0,0 +1,71 @@
+/*
+ * 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.tuscany.sca.gae.services;
+
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+import com.google.appengine.api.users.User;
+import com.google.appengine.api.users.UserService;
+import com.google.appengine.api.users.UserServiceFactory;
+
+/**
+ * 
+ */
+@Service(UserService.class)
+@Scope("COMPOSITE")
+public class UserServiceImpl implements UserService {
+    private UserService userService;
+    
+    @Init
+    public void init() {
+        userService = UserServiceFactory.getUserService();
+    }
+
+    public String createLoginURL(String destinationURL, String authDomain) {
+        return userService.createLoginURL(destinationURL, authDomain);
+    }
+
+    public String createLoginURL(String destinationURL) {
+        return userService.createLoginURL(destinationURL);
+    }
+
+    public String createLogoutURL(String destinationURL, String authDomain) {
+        return userService.createLogoutURL(destinationURL, authDomain);
+    }
+
+    public String createLogoutURL(String destinationURL) {
+        return userService.createLogoutURL(destinationURL);
+    }
+
+    public User getCurrentUser() {
+        return userService.getCurrentUser();
+    }
+
+    public boolean isUserAdmin() {
+        return userService.isUserAdmin();
+    }
+
+    public boolean isUserLoggedIn() {
+        return userService.isUserLoggedIn();
+    }
+    
+}

Propchange: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/UserServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/org/apache/tuscany/sca/gae/services/UserServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/sample/HelloworldService.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/sample/HelloworldService.java?rev=822594&r1=822593&r2=822594&view=diff
==============================================================================
--- tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/sample/HelloworldService.java (original)
+++ tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/sample/HelloworldService.java Wed Oct  7 05:43:41 2009
@@ -18,6 +18,9 @@
  */
 package sample;
 
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
 public interface HelloworldService {
 
     String sayHello(String name);

Modified: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/sample/HelloworldServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/sample/HelloworldServiceImpl.java?rev=822594&r1=822593&r2=822594&view=diff
==============================================================================
--- tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/sample/HelloworldServiceImpl.java (original)
+++ tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/src/sample/HelloworldServiceImpl.java Wed Oct  7 05:43:41 2009
@@ -18,21 +18,47 @@
  */
 package sample;
 
+import java.io.IOException;
+import java.net.URL;
+
 import org.oasisopen.sca.annotation.EagerInit;
 import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Reference;
 import org.oasisopen.sca.annotation.Scope;
 
+import com.google.appengine.api.urlfetch.HTTPResponse;
+import com.google.appengine.api.urlfetch.URLFetchService;
+import com.google.appengine.api.users.User;
+import com.google.appengine.api.users.UserService;
+
 @EagerInit
 @Scope("COMPOSITE")
 public class HelloworldServiceImpl implements HelloworldService {
+    @Reference
+    protected UserService userService;
+
+    @Reference
+    protected URLFetchService fetchService;
 
     public String sayHello(String name) {
-        return "Hello " + name;
+        User user = userService.getCurrentUser();
+        String id = (user == null) ? "" : user.getUserId();
+        String content = "";
+        try {
+            HTTPResponse response = fetchService.fetch(new URL("http://tuscany.apache.org"));
+            content = new String(response.getContent(), 0, 1024);
+            content = content.replace("<", "&lt;");
+            content = content.replace(">", "&gt;");
+            content = content.replace("\"", "&quot;");
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return "[" + id + "] Hello " + name + "<hr><h1>Content from Tuscany Web Site</h1><p>" + content;
     }
 
     @Init
     public void init() {
-        System.out.println("Starting..." + sayHello("world"));
+        System.out.println("Starting...");
     }
 
 }

Modified: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/war/WEB-INF/appengine-web.xml
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/war/WEB-INF/appengine-web.xml?rev=822594&r1=822593&r2=822594&view=diff
==============================================================================
--- tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/war/WEB-INF/appengine-web.xml (original)
+++ tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/war/WEB-INF/appengine-web.xml Wed Oct  7 05:43:41 2009
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
 	<application>scacloud</application>
-	<version>2</version>
+	<version>3</version>
 	
 	<!-- Configure java.util.logging -->
 	<system-properties>

Modified: tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/war/WEB-INF/web.composite
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/war/WEB-INF/web.composite?rev=822594&r1=822593&r2=822594&view=diff
==============================================================================
--- tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/war/WEB-INF/web.composite (original)
+++ tuscany/sandbox/rfeng/helloworld-jsp-google-appengine/war/WEB-INF/web.composite Wed Oct  7 05:43:41 2009
@@ -1,34 +1,41 @@
 <?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.
--->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
-           xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
-           targetNamespace="http://samples"
-           name="Helloworld">
+    <!--
+        * 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.
+    -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+    targetNamespace="http://samples" name="Helloworld">
 
     <component name="foo">
-        <implementation.web web-uri=""/>
-        <reference name="service" target="HelloworldComponent"/>
+        <implementation.web web-uri="" />
+        <reference name="service" target="HelloworldComponent" />
     </component>
 
     <component name="HelloworldComponent">
-        <implementation.java class="sample.HelloworldServiceImpl"/>
+        <implementation.java class="sample.HelloworldServiceImpl" />
+        <service name="HelloworldService">
+            <binding.sca name="sca" />
+        </service>
+        <reference name="userService" target="UserService"/>
+        <reference name="fetchService" target="URLFetchService"/>
     </component>
 
+    <component name="UserService">
+        <implementation.java class="org.apache.tuscany.sca.gae.services.UserServiceImpl" />
+    </component>
+    <component name="MemcacheService">
+        <implementation.java class="org.apache.tuscany.sca.gae.services.MemcacheServiceImpl" />
+    </component>
+    <component name="URLFetchService">
+        <implementation.java class="org.apache.tuscany.sca.gae.services.URLFetchServiceImpl" />
+    </component>
+    <component name="DatastoreService">
+        <implementation.java class="org.apache.tuscany.sca.gae.services.DatastoreServiceImpl" />
+    </component>
 </composite>