incubator-nuvem-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1100647 [2/4] - in /incubator/nuvem/trunk/nuvem-samples: store-appengine-webapp/ store-appengine-webapp/src/ store-appengine-webapp/src/services/ store-appengine-webapp/war/ store-appengine-webapp/war/META-INF/ store-appengine-webapp/war/W...
Date Sat, 07 May 2011 22:44:15 GMT
Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/Shipment.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/Shipment.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/Shipment.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/Shipment.java Sat May  7 22:44:12 2011
@@ -0,0 +1,101 @@
+/*
+ * 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 services;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.nuvem.cloud.xmpp.JID;
+
+import services.Item;
+import services.ShipmentObserver;
+
+public class Shipment {
+
+	private TrackingCode code;
+
+	private List<Item> items;
+
+	private Address deliveryAddress;
+
+	private JID jidToUpdate;
+
+	private List<Event> history = new ArrayList<Event>();
+
+	private Location currentLocation;
+
+	private List<ShipmentObserver> observers = new ArrayList<ShipmentObserver>();
+
+	public Shipment(List<Item> items, Address address, JID jid) {
+		this.items = new ArrayList<Item>();
+		this.items.addAll(items);
+		this.deliveryAddress = address;
+		this.jidToUpdate = jid;
+		this.currentLocation = new Location("starting location",
+				new LocationCode("STR"));
+	}
+
+	public void startFrom(Location location) {
+		this.currentLocation = location;
+	}
+
+	public void setTrackingCode(TrackingCode code) {
+		this.code = code;
+	}
+
+	public TrackingCode trackingCode() {
+		return code;
+	}
+
+	public List<Item> getItems() {
+		return Collections.unmodifiableList(items);
+	}
+
+	public Address getDeliveryAddress() {
+		return deliveryAddress;
+	}
+
+	public JID getJidToUpdate() {
+		return jidToUpdate;
+	}
+
+	public void updateStatus(Event event) {
+		for (ShipmentObserver observer : observers) {
+			observer.onStatusUpdate(this, event);
+		}
+		this.currentLocation = event.loacationAfterEvent();
+		this.history.add(event);
+	}
+
+	public void addObserver(ShipmentObserver observer) {
+		observers.add(observer);
+	}
+
+	public List<Event> history() {
+		return history;
+	}
+
+	public Location getCurrentLocation() {
+		return currentLocation;
+	}
+
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentException.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentException.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentException.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentException.java Sat May  7 22:44:12 2011
@@ -0,0 +1,45 @@
+/*
+ * 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 services;
+
+/**
+ * Signals shipment errors.
+ *
+ */
+public class ShipmentException extends Exception {
+
+	/**
+	 * serial id.
+	 */
+	private static final long serialVersionUID = -5237579957873565482L;
+
+	public ShipmentException() {
+
+	}
+
+	public ShipmentException(Throwable e) {
+		super(e);
+	}
+
+	public ShipmentException(String message, Throwable e) {
+		super(message, e);
+	}
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentObserver.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentObserver.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentObserver.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentObserver.java Sat May  7 22:44:12 2011
@@ -0,0 +1,26 @@
+/*
+ * 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 services;
+
+public interface ShipmentObserver {
+
+	void onStatusUpdate(Shipment shipment, Event event);
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentRegistry.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentRegistry.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentRegistry.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentRegistry.java Sat May  7 22:44:12 2011
@@ -0,0 +1,137 @@
+/*
+ * 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 services;
+
+import java.util.Map;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Logger;
+
+/**
+ * Registry/Container for all shipments.
+ * 
+ * @author john
+ * 
+ */
+public final class ShipmentRegistry {
+
+	private static final Logger log = Logger.getLogger(ShipmentRegistry.class
+			.getName());
+
+	private static final ShipmentRegistry INSTANCE = new ShipmentRegistry();
+
+	private Simulator simulator;
+
+	private Map<TrackingCode, Shipment> shipments = new ConcurrentHashMap<TrackingCode, Shipment>();
+
+	private BlockingQueue<TrackingCode> trackingCodes = new ArrayBlockingQueue<TrackingCode>(
+			10);
+
+	private ShipmentRegistry() {
+		// simulator = new Simulator(trackingCodes);
+		// new Thread(simulator).start();
+	}
+
+	public static ShipmentRegistry getInstance() {
+		return INSTANCE;
+	}
+
+	public void shipmentHandled(TrackingCode code, Location newLocation) {
+		Shipment shipment = shipments.get(code);
+		Event.updateShipment(shipment, newLocation);
+	}
+
+	public void cancelShipment(TrackingCode trackingCode) {
+		Shipment shipment = shipments.get(trackingCode);
+		Event.triggerCancellation(shipment, shipment.getCurrentLocation());
+	}
+
+	public void markShipmentDelivered(TrackingCode trackingCode) {
+		Shipment shipment = shipments.get(trackingCode);
+		Event.triggerDeliverySuccessful(shipment, shipment.getDeliveryAddress()
+				.getStreet());
+	}
+
+	public String addNewShipment(Shipment shipment) throws ShipmentException {
+		TrackingCode code = TrackingCode.getNewTrackingCode();
+		shipment.setTrackingCode(code);
+		shipments.put(code, shipment);
+		Event.newShipment(shipment);
+		// trackingCodes.add(code);
+
+		// shipment simulation done in the same thread as GAE doesnt allow
+		// creation of threads.
+		shipmentHandled(code, new Location("inter1", new LocationCode("INT1")));
+		try {
+			Thread.sleep(5000);
+
+			shipmentHandled(code, new Location("inter2", new LocationCode(
+					"INT2")));
+			Thread.sleep(5000);
+			shipmentHandled(code, new Location("inter3", new LocationCode(
+					"INT3")));
+			Thread.sleep(5000);
+			shipmentHandled(code, new Location("inter4", new LocationCode(
+					"INT4")));
+			Thread.sleep(5000);
+		} catch (InterruptedException e) {
+			// TODO:fix me
+			log.severe("error during shipment");
+			throw new ShipmentException("shipment error", e);
+		}
+		markShipmentDelivered(code);
+		return code.toString();
+	}
+
+	public static class Simulator implements Runnable {
+
+		private BlockingQueue<TrackingCode> codes;
+
+		Simulator(BlockingQueue<TrackingCode> queue) {
+			codes = queue;
+		}
+
+		public void run() {
+			TrackingCode codeToProcess;
+			try {
+				while (true) {
+					codeToProcess = codes.take();
+					ShipmentRegistry registry = ShipmentRegistry.getInstance();
+					registry.shipmentHandled(codeToProcess, new Location(
+							"inter1", new LocationCode("INT1")));
+					Thread.sleep(5000);
+					registry.shipmentHandled(codeToProcess, new Location(
+							"inter2", new LocationCode("INT2")));
+					Thread.sleep(5000);
+					registry.shipmentHandled(codeToProcess, new Location(
+							"inter3", new LocationCode("INT3")));
+					Thread.sleep(5000);
+					registry.shipmentHandled(codeToProcess, new Location(
+							"inter4", new LocationCode("INT4")));
+					Thread.sleep(5000);
+					registry.markShipmentDelivered(codeToProcess);
+				}
+			} catch (InterruptedException ex) {
+			}
+		}
+	}
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentService.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentService.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentService.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentService.java Sat May  7 22:44:12 2011
@@ -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 services;
+
+import java.util.List;
+
+
+
+import org.apache.nuvem.cloud.xmpp.JID;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Business process service for shipment.
+ * 
+ */
+@Remotable
+public interface ShipmentService {
+
+	/**
+	 * Ships the items to the corresponding address
+	 * 
+	 * @param to
+	 *            the address to which the item needs to be delivered.
+	 * @param items
+	 *            the items to be shipped.
+	 * @return a unique tracking id.
+	 */
+	String shipItemsAndRegisterForUpdates(Address to, JID jid, List<Item> items)
+			throws ShipmentException;
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentServiceImpl.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentServiceImpl.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShipmentServiceImpl.java Sat May  7 22:44:12 2011
@@ -0,0 +1,51 @@
+/*
+ * 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 services;
+
+import java.util.List;
+import java.util.logging.Logger;
+
+import org.apache.nuvem.cloud.xmpp.JID;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+@Scope("COMPOSITE")
+public class ShipmentServiceImpl implements ShipmentService {
+	
+	private static final Logger log = Logger
+	.getLogger(ShipmentServiceImpl.class.getName());
+	
+	private static final Location STARTING_LOCATION = new Location("starting1",
+			new LocationCode("START1"));
+	
+	@Reference
+	private ShipmentObserver observer;
+
+	public String shipItemsAndRegisterForUpdates(Address to, JID jid,
+			List<Item> items) throws ShipmentException {
+		Shipment shipment = new Shipment(items, to, jid);
+		shipment.startFrom(STARTING_LOCATION);
+		shipment.addObserver(observer);
+		log.info("preparing shipment...");
+		return ShipmentRegistry.getInstance().addNewShipment(shipment);
+	}
+
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShoppingCart.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShoppingCart.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShoppingCart.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShoppingCart.java Sat May  7 22:44:12 2011
@@ -0,0 +1,27 @@
+/*
+ * 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 services;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface ShoppingCart extends Cart, Total {
+
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShoppingCartImpl.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShoppingCartImpl.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShoppingCartImpl.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShoppingCartImpl.java Sat May  7 22:44:12 2011
@@ -0,0 +1,119 @@
+/*
+ * 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 services;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.logging.Logger;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.nuvem.cloud.data.DocumentService;
+import org.apache.tuscany.sca.data.collection.Entry;
+import org.apache.tuscany.sca.data.collection.NotFoundException;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+@Scope("COMPOSITE")
+public class ShoppingCartImpl implements ShoppingCart {
+    private static final Logger log = Logger.getLogger(ShoppingCartImpl.class.getName());
+
+    @Reference
+    private DocumentService docService;
+
+    private Map<String, Item> cart = new HashMap<String, Item>();
+
+    public Entry<String, Item>[] getAll() {
+        Entry<String, Item>[] entries = new Entry[cart.size()];
+        int i = 0;
+        for (Map.Entry<String, Item> e : cart.entrySet()) {
+            entries[i++] = new Entry<String, Item>(e.getKey(), e.getValue());
+        }
+        return entries;
+    }
+
+    public Item get(String key) throws NotFoundException {
+        Item item = cart.get(key);
+        if (item == null) {
+            throw new NotFoundException(key);
+        } else {
+            return item;
+        }
+    }
+
+    public String post(String key, Item item) {
+        if (key == null || key.isEmpty()) {
+            key = "cart-" + UUID.randomUUID().toString();
+        }
+        cart.put(key, item);
+        return key;
+    }
+
+    public void put(String key, Item item) throws NotFoundException {
+        if (!cart.containsKey(key)) {
+            throw new NotFoundException(key);
+        }
+        cart.put(key, item);
+    }
+
+    public void delete(String key) throws NotFoundException {
+        if (key == null || key.equals("")) {
+            cart.clear();
+        } else {
+            Item item = cart.remove(key);
+            if (item == null)
+                throw new NotFoundException(key);
+        }
+    }
+
+    public Entry<String, Item>[] query(String queryString) {
+        List<Entry<String, Item>> entries = new ArrayList<Entry<String, Item>>();
+        if (queryString.startsWith("name=")) {
+            String name = queryString.substring(5);
+            for (Map.Entry<String, Item> e : cart.entrySet()) {
+                Item item = e.getValue();
+                if (item.getName().equals(name)) {
+                    entries.add(new Entry<String, Item>(e.getKey(), e.getValue()));
+                }
+            }
+        }
+        return entries.toArray(new Entry[entries.size()]);
+    }
+
+    public String getTotal() {
+        double total = 0;
+        String currencySymbol = "";
+        if (!cart.isEmpty()) {
+            Item item = cart.values().iterator().next();
+            currencySymbol = item.getCurrencySymbol();
+        }
+        for (Item item : cart.values()) {
+            total += item.getPrice();
+        }
+        return currencySymbol + String.valueOf(total);
+    }
+
+	@Override
+	public String shipItems(String jid) {
+		return StringUtils.EMPTY;
+	}
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShoppingCartManager.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShoppingCartManager.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShoppingCartManager.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/ShoppingCartManager.java Sat May  7 22:44:12 2011
@@ -0,0 +1,201 @@
+/*
+ * 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 services;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.logging.Logger;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.nuvem.cloud.data.DocumentService;
+import org.apache.nuvem.cloud.user.User;
+import org.apache.nuvem.cloud.user.UserService;
+import org.apache.nuvem.cloud.xmpp.JID;
+import org.apache.tuscany.sca.data.collection.Entry;
+import org.apache.tuscany.sca.data.collection.NotFoundException;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+@Scope("COMPOSITE")
+public class ShoppingCartManager implements ShoppingCart {
+	private static final Logger log = Logger
+			.getLogger(ShoppingCartManager.class.getName());
+	private static String ANONYMOUS = "anonymous";
+
+	@Reference
+	private DocumentService documentService;
+
+	@Reference
+	private UserService userService;
+
+	@Reference
+	private ShipmentService shipmentService;
+
+	public Entry<String, Item>[] getAll() {
+		Map<String, Item> cart = getUserShoppingCart();
+
+		Entry<String, Item>[] entries = new Entry[cart.size()];
+		int i = 0;
+		for (Map.Entry<String, Item> e : cart.entrySet()) {
+			entries[i++] = new Entry<String, Item>(e.getKey(), e.getValue());
+		}
+		return entries;
+	}
+
+	public Item get(String key) throws NotFoundException {
+		Map<String, Item> cart = getUserShoppingCart();
+
+		Item item = cart.get(key);
+		if (item == null) {
+			throw new NotFoundException(key);
+		} else {
+			return item;
+		}
+	}
+
+	public String post(String key, Item item) {
+		Map<String, Item> cart = getUserShoppingCart();
+
+		if (key == null || key.isEmpty()) {
+			key = this.generateItemKey();
+		}
+
+		// add to the cart map
+		cart.put(key, item);
+		// add back to the store
+		documentService.post(getCartKey(), cart);
+		return key;
+	}
+
+	public void put(String key, Item item) throws NotFoundException {
+		Map<String, Item> cart = getUserShoppingCart();
+
+		if (!cart.containsKey(key)) {
+			throw new NotFoundException(key);
+		}
+		// add to the cart map
+		cart.put(key, item);
+		// add back to the store
+		documentService.put(getCartKey(), cart);
+	}
+
+	public void delete(String key) throws NotFoundException {
+		if (key == null || key.isEmpty()) {
+			documentService.delete(getCartKey());
+		} else {
+			Map<String, Item> cart = getUserShoppingCart();
+
+			Item item = cart.remove(key);
+			if (item == null) {
+				throw new NotFoundException(key);
+			}
+			documentService.put(getCartKey(), cart);
+		}
+	}
+
+	public Entry<String, Item>[] query(String queryString) {
+		throw new UnsupportedOperationException("Operation not supported !");
+	}
+
+	public String getTotal() {
+		double total = 0;
+		String currencySymbol = "";
+
+		Map<String, Item> cart = getUserShoppingCart();
+		if (!cart.isEmpty()) {
+			Item item = cart.values().iterator().next();
+			currencySymbol = item.getCurrencySymbol();
+		}
+		for (Item item : cart.values()) {
+			total += item.getPrice();
+		}
+
+		return currencySymbol + String.valueOf(total);
+	}
+
+	/**
+	 * Utility functions
+	 */
+
+	private Map<String, Item> getUserShoppingCart() {
+		String userCartKey = getCartKey();
+		HashMap<String, Item> cart;
+
+		try {
+			cart = (HashMap<String, Item>) documentService.get(userCartKey);
+		} catch (NotFoundException e) {
+			cart = new HashMap<String, Item>();
+			documentService.post(userCartKey, cart);
+		}
+
+		return cart;
+	}
+
+	private String getUserId() {
+		String userId = null;
+		if (userService != null) {
+			try {
+				User user = userService.getCurrentUser();
+				userId = user.getUserId();
+			} catch (Exception e) {
+				// ignore
+				e.printStackTrace();
+			}
+		}
+		if (userId == null || userId.length() == 0) {
+			userId = ANONYMOUS;
+		}
+		return userId;
+	}
+
+	private String getCartKey() {
+		String cartKey = "cart-" + this.getUserId();
+		return cartKey;
+	}
+
+	private String generateItemKey() {
+		String itemKey = getCartKey() + "-item-" + UUID.randomUUID().toString();
+		return itemKey;
+	}
+
+	@Override
+	public String shipItems(String jid) {
+		if (getUserShoppingCart() == null || getUserShoppingCart().isEmpty())
+			return StringUtils.EMPTY;
+		if (jid == null) {
+			log
+					.warning("using current user's email address for shipment updates");
+			jid = userService.getCurrentUser().getEmail();
+		}
+		List<Item> items = new ArrayList<Item>();
+		items.addAll(getUserShoppingCart().values());
+		try {
+			return shipmentService.shipItemsAndRegisterForUpdates(
+					Address.DUMMY_ADDRESS, new JID(jid), items);
+		} catch (ShipmentException e) {
+			log.severe("error occured during shipment");
+			return "shipment error";
+		}
+
+	}
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/Total.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/Total.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/Total.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/Total.java Sat May  7 22:44:12 2011
@@ -0,0 +1,29 @@
+/*
+ * 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 services;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Total {
+
+    String getTotal();
+
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/TrackingCode.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/TrackingCode.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/TrackingCode.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/TrackingCode.java Sat May  7 22:44:12 2011
@@ -0,0 +1,61 @@
+/*
+ * 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 services;
+
+import java.util.UUID;
+
+public class TrackingCode {
+
+	private String code;
+
+	public static TrackingCode getNewTrackingCode() {
+		return new TrackingCode(UUID.randomUUID().toString());
+	}
+
+	private TrackingCode(String code) {
+		this.code = code;
+	}
+
+	/**
+	 * .
+	 */
+	public boolean equals(Object o) {
+		if (this == o)
+			return true;
+		if (!(o instanceof TrackingCode))
+			return false;
+
+		final TrackingCode other = (TrackingCode) o;
+
+		return code.equals(other.code);
+	}
+
+	/**
+	 */
+	public int hashCode() {
+		return code.hashCode();
+	}
+
+	@Override
+	public String toString() {
+		return code;
+	}
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/VegetablesCatalogImpl.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/VegetablesCatalogImpl.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/VegetablesCatalogImpl.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/VegetablesCatalogImpl.java Sat May  7 22:44:12 2011
@@ -0,0 +1,58 @@
+/*
+ * 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 services;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Property;
+import org.oasisopen.sca.annotation.Reference;
+
+public class VegetablesCatalogImpl implements Catalog {
+
+    @Property
+    public String currencyCode = "USD";
+
+    @Reference
+    public CurrencyConverter currencyConverter;
+
+    private List<Item> catalog = new ArrayList<Item>();
+
+    @Init
+    public void init() {
+        String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode);
+        catalog.add(new Item("Broccoli", currencyCode, currencySymbol, currencyConverter.getConversion("USD",
+                                                                                                       currencyCode,
+                                                                                                       2.99)));
+        catalog.add(new Item("Asparagus", currencyCode, currencySymbol, currencyConverter.getConversion("USD",
+                                                                                                        currencyCode,
+                                                                                                        3.55)));
+        catalog.add(new Item("Cauliflower", currencyCode, currencySymbol, currencyConverter.getConversion("USD",
+                                                                                                          currencyCode,
+                                                                                                          1.55)));
+    }
+
+    public Item[] items() {
+        Item[] catalogArray = new Item[catalog.size()];
+        catalog.toArray(catalogArray);
+        return catalogArray;
+    }
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/XMPPShipmentObserver.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/XMPPShipmentObserver.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/XMPPShipmentObserver.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/java/services/XMPPShipmentObserver.java Sat May  7 22:44:12 2011
@@ -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 services;
+
+import org.apache.nuvem.cloud.xmpp.JID;
+import org.apache.nuvem.cloud.xmpp.Status;
+import org.apache.nuvem.cloud.xmpp.XMPPEndPoint;
+import org.apache.nuvem.cloud.xmpp.message.MessageBuilder;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+@Scope("COMPOSITE")
+public class XMPPShipmentObserver implements ShipmentObserver {
+
+	@Reference
+	private XMPPEndPoint endpoint;
+
+	public void onStatusUpdate(Shipment shipment, Event event) {
+		JID jid = shipment.getJidToUpdate();
+		System.out.println("inviting user of jid : " + jid.asString());
+		Status status = endpoint.invite(jid.asString());
+		System.out.println("status of invite:" + status.hasErrors());
+		if (!status.hasErrors()) {
+			endpoint.sendMessage(new MessageBuilder().toRecipient(
+					shipment.getJidToUpdate().asString()).containing(
+					event.toString()).build());
+		}
+	}
+
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/resources/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/resources/META-INF/sca-contribution.xml?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/resources/META-INF/sca-contribution.xml (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-assets/src/main/resources/META-INF/sca-contribution.xml Sat May  7 22:44:12 2011
@@ -0,0 +1,25 @@
+<?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.    
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+	xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" 
+	xmlns:store="http://store">
+
+	<export.java package="services" />
+</contribution>
\ No newline at end of file

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/README
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/README?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/README (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/README Sat May  7 22:44:12 2011
@@ -0,0 +1,11 @@
+Steps to run with Maven 
+
+ 1.)  "mvn gae:unpack " to unpack appengine SDK. 
+
+ 2.) "mvn gae:run" to run the application locally. You can access application using http://localhost:8080/ url.
+
+ 3.)  Change the application name in the "appengine-web.xml" file located in store-appengine-webapp/war/WEB-INF directory. 
+
+       e.g -  <application>yournamedemo1</application>
+
+ 4.) "mvn gae:update" to upload the application. 

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/pom.xml?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/pom.xml (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/pom.xml Sat May  7 22:44:12 2011
@@ -0,0 +1,173 @@
+<?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>
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.nuvem</groupId>
+		<artifactId>nuvem-samples</artifactId>
+		<version>1.0-incubating-SNAPSHOT</version>
+		<relativePath>../pom.xml</relativePath>
+	</parent>
+	<artifactId>store-catalog-appengine-webapp</artifactId>
+	<version>1.0-incubating-SNAPSHOT</version>
+	<packaging>war</packaging>
+	<name>Apache Nuvem Cloud Store Catalog Service</name>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.nuvem</groupId>
+			<artifactId>store-assets</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.nuvem</groupId>
+			<artifactId>nuvem-api</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.nuvem</groupId>
+			<artifactId>nuvem-google</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.tuscany.sca</groupId>
+			<artifactId>tuscany-sca-api</artifactId>
+			<version>${tuscany.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.tuscany.sca</groupId>
+			<artifactId>tuscany-implementation-java-runtime</artifactId>
+			<version>${tuscany.version}</version>
+			<scope>runtime</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.tuscany.sca</groupId>
+			<artifactId>tuscany-binding-jsonrpc-runtime</artifactId>
+			<version>${tuscany.version}</version>
+			<scope>runtime</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.tuscany.sca</groupId>
+			<artifactId>tuscany-host-webapp</artifactId>
+			<version>${tuscany.version}</version>
+			<scope>runtime</scope>
+			<exclusions>
+				<exclusion>
+					<groupId>org.apache.tuscany.sca</groupId>
+					<artifactId>tuscany-databinding-jaxb</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.apache.tuscany.sca</groupId>
+					<artifactId>tuscany-interface-java-jaxws</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.5</version>
+			<scope>provided</scope>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<finalName>${artifactId}</finalName>
+		<sourceDirectory>src</sourceDirectory>
+		<outputDirectory>war/WEB-INF/classes</outputDirectory>
+
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-eclipse-plugin</artifactId>
+				<configuration>
+					<sourceIncludes>
+						<sourceInclude>**/*</sourceInclude>
+					</sourceIncludes>
+
+					<projectnatures>
+						<projectnature>org.eclipse.jdt.core.javanature</projectnature>
+						<projectnature>com.google.appengine.eclipse.core.gaeNature</projectnature>
+						<projectnature>com.google.gdt.eclipse.core.webAppNature</projectnature>
+					</projectnatures>
+					<buildcommands>
+						<buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
+						<buildcommand>com.google.appengine.eclipse.core.enhancerbuilder</buildcommand>
+						<buildcommand>com.google.appengine.eclipse.core.projectValidator</buildcommand>
+						<buildcommand>com.google.gdt.eclipse.core.webAppProjectValidator</buildcommand>
+					</buildcommands>
+					<classpathContainers>
+						<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
+						<classpathContainer>com.google.appengine.eclipse.core.GAE_CONTAINER</classpathContainer>
+					</classpathContainers>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<version>2.1</version>
+				<executions>
+					<execution>
+						<id>copy-dependencies</id>
+						<phase>process-sources</phase>
+						<goals>
+							<goal>copy-dependencies</goal>
+						</goals>
+						<configuration>
+							<outputDirectory>war/WEB-INF/lib</outputDirectory>
+							<overWriteIfNewer>true</overWriteIfNewer>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>2.1-beta-1</version>
+				<configuration>
+					<warSourceDirectory>war</warSourceDirectory>
+				</configuration>
+			</plugin>
+
+			<!--
+				The maven-gae-plugin. Type "mvn gae:run" to run project, "mvn
+				gae:deploy" to upload to GAE.
+			-->
+			<plugin>
+				<groupId>net.kindleit</groupId>
+				<artifactId>maven-gae-plugin</artifactId>
+				<version>${maven.gae.plugin.version}</version>
+				<dependencies>
+					<dependency>
+						<groupId>net.kindleit</groupId>
+						<artifactId>gae-runtime</artifactId>
+						<version>${gae.version}</version>
+						<type>pom</type>
+					</dependency>
+				</dependencies>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/src/Workaround.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/src/Workaround.java?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/src/Workaround.java (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/src/Workaround.java Sat May  7 22:44:12 2011
@@ -0,0 +1,22 @@
+/*
+ * 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.    
+ */
+
+public class Workaround {
+
+}

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/META-INF/sca-contribution.xml?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/META-INF/sca-contribution.xml (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/META-INF/sca-contribution.xml Sat May  7 22:44:12 2011
@@ -0,0 +1,24 @@
+<?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.    
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+              xmlns:store="http://store">
+              
+      <deployable composite="store:catalog"/>
+</contribution>
\ No newline at end of file

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/WEB-INF/appengine-web.xml
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/WEB-INF/appengine-web.xml?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/WEB-INF/appengine-web.xml (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/WEB-INF/appengine-web.xml Sat May  7 22:44:12 2011
@@ -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.
+-->
+<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
+	<application>tuscany-store-catalog</application>
+	<version>5</version>
+
+	<!-- Configure java.util.logging -->
+	<system-properties>
+		<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
+	</system-properties>
+
+	<sessions-enabled>true</sessions-enabled>
+	
+</appengine-web-app>
\ No newline at end of file

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/WEB-INF/logging.properties
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/WEB-INF/logging.properties?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/WEB-INF/logging.properties (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/WEB-INF/logging.properties Sat May  7 22:44:12 2011
@@ -0,0 +1,49 @@
+#
+#
+#    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.
+#
+#
+# A default java.util.logging configuration.
+# (All App Engine logging is through java.util.logging by default).
+#
+# To use this configuration, copy it into your application's WEB-INF
+# folder and add the following to your appengine-web.xml:
+#
+# <system-properties>
+#   <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
+# </system-properties>
+#
+
+# Set the default logging level for all loggers to WARNING
+.level = WARNING
+
+# Set the default logging level for ORM, specifically, to WARNING
+DataNucleus.JDO.level=WARNING
+DataNucleus.Persistence.level=WARNING
+DataNucleus.Cache.level=WARNING
+DataNucleus.MetaData.level=WARNING
+DataNucleus.General.level=WARNING
+DataNucleus.Utility.level=WARNING
+DataNucleus.Transaction.level=WARNING
+DataNucleus.Datastore.level=WARNING
+DataNucleus.ClassLoading.level=WARNING
+DataNucleus.Plugin.level=WARNING
+DataNucleus.ValueGeneration.level=WARNING
+DataNucleus.Enhancer.level=WARNING
+DataNucleus.SchemaTool.level=WARNING
+log4j.category.org.apache.tuscany=ALL,A1

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/WEB-INF/web.xml?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/WEB-INF/web.xml (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/WEB-INF/web.xml Sat May  7 22:44:12 2011
@@ -0,0 +1,42 @@
+<?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.
+-->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
+
+	<!-- Tuscany Filter -->
+	<filter>
+		<filter-name>tuscany</filter-name>
+		<filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class>
+	</filter>
+
+	<filter-mapping>
+		<filter-name>tuscany</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+
+	<!-- Default page to serve -->
+	<welcome-file-list>
+		<welcome-file>index.html</welcome-file>
+	</welcome-file-list>
+
+</web-app>

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/catalog.composite
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/catalog.composite?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/catalog.composite (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/catalog.composite Sat May  7 22:44:12 2011
@@ -0,0 +1,42 @@
+<?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/200912"
+           xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+	       xmlns:store="http://store" 
+	       targetNamespace="http://store" 
+	       name="catalog">
+		
+	<component name="Catalog">
+		<implementation.java class="services.FruitsCatalogImpl"/>
+		<property name="currencyCode">USD</property>
+		<service name="Catalog">
+		    <interface.java interface="services.Catalog"/>
+			<tuscany:binding.jsonrpc uri="/Catalog"/>
+		</service>
+		<reference name="currencyConverter" target="CurrencyConverter" />
+	</component>
+
+	<component name="CurrencyConverter">
+		<implementation.java class="services.CurrencyConverterImpl" />
+		<service name="CurrencyConverter">
+			<interface.java interface="services.CurrencyConverter"/>
+		</service>
+	</component>
+</composite>

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/index.html
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/index.html?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/index.html (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-appengine-webapp/war/index.html Sat May  7 22:44:12 2011
@@ -0,0 +1,33 @@
+<!--
+    * 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.    
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Tuscany Store Scenario</title>
+</head>
+<body>
+
+<h2>Tuscany Store Catalog Service</h2>
+</br>
+</br>
+Catalog Service Definition available at : <a href="Catalog?smd">Store Catalog Service - JSON-RPC SMD</a>
+</body>
+</html>
\ No newline at end of file

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/README
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/README?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/README (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/README Sat May  7 22:44:12 2011
@@ -0,0 +1,28 @@
+Store Sample
+======================================
+
+This is a sample store scenario that is used as a getting started guide
+for Tuscany SCA. For detailed information, please see:
+
+http://tuscany.apache.org/getting-started-with-tuscany.html
+
+or
+
+http://tuscany.apache.org/getting-started-with-tuscany-using-tuscany-eclipse-plugin.html
+
+
+Building And Running The Sample Using Ant
+-----------------------------------------
+With the binary distribution the sample can be built using Ant as follows:
+
+cd store
+ant compile
+
+and then, to run:
+
+ant run
+
+Once the store application is running use your browser to visit the following
+URL:
+
+http://localhost:8080/store/

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/pom.xml?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/pom.xml (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/pom.xml Sat May  7 22:44:12 2011
@@ -0,0 +1,79 @@
+<?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>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.nuvem</groupId>
+        <artifactId>nuvem-samples</artifactId>
+        <version>1.0-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>store-catalog-ibmcloud-webapp</artifactId>
+	<version>1.0-incubating-SNAPSHOT</version>
+    <packaging>war</packaging>
+    <name>Apache Nuvem Cloud Store Catalog for IBM Cloud</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.nuvem</groupId>
+            <artifactId>store-assets</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+		
+       <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-sca-api</artifactId>
+            <version>${tuscany.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-webapp</artifactId>
+            <version>${tuscany.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>${tuscany.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-jsonrpc-runtime</artifactId>
+            <version>${tuscany.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>xml-apis</groupId>
+            <artifactId>xml-apis</artifactId>
+            <version>1.3.04</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>    
+    
+    <build>
+       <finalName>${artifactId}</finalName>
+    </build>
+
+</project>

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/resources/catalog.composite
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/resources/catalog.composite?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/resources/catalog.composite (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/resources/catalog.composite Sat May  7 22:44:12 2011
@@ -0,0 +1,43 @@
+<?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/200912"
+           xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+           xmlns:store="http://store"
+		   targetNamespace="http://store"
+		   name="catalog">
+		    
+	<component name="Catalog">
+		<implementation.java class="services.VegetablesCatalogImpl"/> 
+		<property name="currencyCode">USD</property>
+		<service name="Catalog">
+		    <interface.java interface="services.Catalog"/>
+			<tuscany:binding.jsonrpc uri="/Catalog"/>
+   		</service>
+		<reference name="currencyConverter" target="CurrencyConverter"/>	
+	</component> 
+ 	    
+	<component name="CurrencyConverter">
+		<implementation.java class="services.CurrencyConverterImpl"/>
+		<service name="CurrencyConverter">
+			<interface.java interface="services.CurrencyConverter"/>
+		</service>
+	</component>     
+
+</composite>

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/META-INF/sca-contribution-generated.xml
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/META-INF/sca-contribution-generated.xml?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/META-INF/sca-contribution-generated.xml (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/META-INF/sca-contribution-generated.xml Sat May  7 22:44:12 2011
@@ -0,0 +1,23 @@
+<?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.    
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+              xmlns:store="http://store">
+   <deployable composite="store:catalog"/>
+</contribution>
\ No newline at end of file

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/WEB-INF/geronimo-web.xml?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/WEB-INF/geronimo-web.xml (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/WEB-INF/geronimo-web.xml Sat May  7 22:44:12 2011
@@ -0,0 +1,50 @@
+<?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.    
+-->
+<web:web-app
+	xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
+	xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0"
+	xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
+	xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
+	xmlns:lc="http://geronimo.apache.org/xml/ns/loginconfig-2.0"
+	xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
+	xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2"
+	xmlns:pers="http://java.sun.com/xml/ns/persistence"
+	xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1"
+	xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
+	xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
+	<dep:environment>
+		<dep:moduleId>
+			<dep:groupId>org.apache.tuscany</dep:groupId>
+			<dep:artifactId>store-catalog-ibmcloud-webapp</dep:artifactId>
+			<dep:version>1.0</dep:version>
+			<dep:type>car</dep:type>
+		</dep:moduleId>
+		
+		<!-- TUSCANY-2622 -->
+		<dep:hidden-classes>
+			<dep:filter>org.apache.axiom</dep:filter>
+			<dep:filter>org.apache.axis2</dep:filter>
+			<dep:filter>org.apache.commons</dep:filter>
+			<dep:filter>org.jdom</dep:filter>
+		</dep:hidden-classes>		
+		
+	</dep:environment>
+	<web:context-root>/store-catalog-ibmcloud-webapp</web:context-root>
+</web:web-app>

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/WEB-INF/web.xml?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/WEB-INF/web.xml (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/WEB-INF/web.xml Sat May  7 22:44:12 2011
@@ -0,0 +1,36 @@
+<?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.    
+-->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
+  <display-name>store-catalog-ibmcloud-webapp</display-name>
+
+  <filter>
+    <filter-name>tuscany</filter-name> 
+    <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class> 
+  </filter>
+
+  <filter-mapping>
+    <filter-name>tuscany</filter-name> 
+    <url-pattern>/*</url-pattern> 
+  </filter-mapping>
+
+  <welcome-file-list id="WelcomeFileList">
+    <welcome-file>index.html</welcome-file>
+  </welcome-file-list>
+</web-app>
\ No newline at end of file

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/index.html?rev=1100647&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/index.html (added)
+++ incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/src/main/webapp/index.html Sat May  7 22:44:12 2011
@@ -0,0 +1,32 @@
+<!--
+    * 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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Tuscany Store Scenario - IBM Cloud</title>
+</head>
+<body>
+
+<h2>Tuscany Store Catalog Service</h2>
+</br>
+</br>
+Catalog Service Definition available at : <a href="Catalog?smd">Store Catalog Service - JSON-RPC SMD</a>
+</body>
+</html>
\ No newline at end of file

Added: incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/store.png
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/store.png?rev=1100647&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/nuvem/trunk/nuvem-samples/store-catalog-ibmcloud-webapp/store.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message