summaryrefslogtreecommitdiffstats
path: root/sandbox/lresende/sca/samples/store-appengine-webapp/war
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/lresende/sca/samples/store-appengine-webapp/war')
-rw-r--r--sandbox/lresende/sca/samples/store-appengine-webapp/war/META-INF/sca-contribution.xml24
-rw-r--r--sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/appengine-web.xml11
-rw-r--r--sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/log4j.properties25
-rw-r--r--sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/Catalog.classbin0 -> 139 bytes
-rw-r--r--sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/CatalogAggregatorImpl.classbin0 -> 1907 bytes
-rw-r--r--sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/CurrencyConverter.classbin0 -> 260 bytes
-rw-r--r--sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/CurrencyConverterImpl.classbin0 -> 1088 bytes
-rw-r--r--sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/Item.classbin0 -> 931 bytes
-rw-r--r--sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/store.composite46
-rw-r--r--sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/logging.properties29
-rw-r--r--sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/web.xml24
-rw-r--r--sandbox/lresende/sca/samples/store-appengine-webapp/war/store.html49
12 files changed, 208 insertions, 0 deletions
diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/META-INF/sca-contribution.xml b/sandbox/lresende/sca/samples/store-appengine-webapp/war/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..3fb1f2b1c7
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-appengine-webapp/war/META-INF/sca-contribution.xml
@@ -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/200903"
+ xmlns:store="http://store">
+
+ <deployable composite="store:catalog"/>
+</contribution> \ No newline at end of file
diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/appengine-web.xml b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/appengine-web.xml
new file mode 100644
index 0000000000..2e265231e9
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/appengine-web.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
+ <application>tuscany-store</application>
+ <version>1</version>
+
+ <!-- Configure java.util.logging -->
+ <system-properties>
+ <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
+ </system-properties>
+
+</appengine-web-app> \ No newline at end of file
diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/log4j.properties b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/log4j.properties
new file mode 100644
index 0000000000..c704d6adee
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/log4j.properties
@@ -0,0 +1,25 @@
+# A default log4j configuration for log4j users.
+#
+# To use this configuration, deploy it into your application's WEB-INF/classes
+# directory. You are also encouraged to edit it as you like.
+
+# Configure the console as our one appender
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n
+
+# tighten logging on the DataNucleus Categories
+log4j.category.DataNucleus.JDO=WARN, A1
+log4j.category.DataNucleus.Persistence=WARN, A1
+log4j.category.DataNucleus.Cache=WARN, A1
+log4j.category.DataNucleus.MetaData=WARN, A1
+log4j.category.DataNucleus.General=WARN, A1
+log4j.category.DataNucleus.Utility=WARN, A1
+log4j.category.DataNucleus.Transaction=WARN, A1
+log4j.category.DataNucleus.Datastore=WARN, A1
+log4j.category.DataNucleus.ClassLoading=WARN, A1
+log4j.category.DataNucleus.Plugin=WARN, A1
+log4j.category.DataNucleus.ValueGeneration=WARN, A1
+log4j.category.DataNucleus.Enhancer=WARN, A1
+log4j.category.DataNucleus.SchemaTool=WARN, A1
+log4j.category.org.apache.tuscany=ALL,A1
diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/Catalog.class b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/Catalog.class
new file mode 100644
index 0000000000..59527895a9
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/Catalog.class
Binary files differ
diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/CatalogAggregatorImpl.class b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/CatalogAggregatorImpl.class
new file mode 100644
index 0000000000..05c676ee75
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/CatalogAggregatorImpl.class
Binary files differ
diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/CurrencyConverter.class b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/CurrencyConverter.class
new file mode 100644
index 0000000000..1c4c9d6236
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/CurrencyConverter.class
Binary files differ
diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/CurrencyConverterImpl.class b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/CurrencyConverterImpl.class
new file mode 100644
index 0000000000..665b7d2467
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/CurrencyConverterImpl.class
Binary files differ
diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/Item.class b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/Item.class
new file mode 100644
index 0000000000..bd3b3cc27e
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/services/Item.class
Binary files differ
diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/store.composite b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/store.composite
new file mode 100644
index 0000000000..9a5897e87b
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/classes/store.composite
@@ -0,0 +1,46 @@
+<?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"
+ xmlns:s="http://store"
+ targetNamespace="http://store"
+ name="catalog">
+
+ <component name="CatalogAggregator">
+ <implementation.java class="services.CatalogAggregatorImpl"/>
+ <property name="currencyCode">USD</property>
+ <service name="Catalog">
+ <interface.java interface="services.Catalog"/>
+ <tuscany:binding.jsonrpc uri="/catalogAggregator"/>
+ </service>
+ <reference name="fruitsCatalog">
+ <interface.java interface="services.Catalog"/>
+ <tuscany:binding.jsonrpc uri="http://tuscany-store-catalog.appspot.com/catalog"/>
+ </reference>
+ <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>
diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/logging.properties b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/logging.properties
new file mode 100644
index 0000000000..1479043d2b
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/logging.properties
@@ -0,0 +1,29 @@
+# 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
diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/web.xml b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/web.xml
new file mode 100644
index 0000000000..31ad8abe98
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-appengine-webapp/war/WEB-INF/web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+
+ <!-- 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>store.html</welcome-file>
+ </welcome-file-list>
+
+</web-app>
diff --git a/sandbox/lresende/sca/samples/store-appengine-webapp/war/store.html b/sandbox/lresende/sca/samples/store-appengine-webapp/war/store.html
new file mode 100644
index 0000000000..237d5eb1b4
--- /dev/null
+++ b/sandbox/lresende/sca/samples/store-appengine-webapp/war/store.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+<title>Store</title>
+
+<script type="text/javascript" src="dojo/dojo/dojo.js"></script>
+
+<script type="text/javascript">
+ dojo.require("dojo.rpc.JsonService");
+</script>
+
+<script language="JavaScript">
+
+ var catalog = new dojo.rpc.JsonService("/catalogAggregator?smd");
+
+ var catalogItems;
+
+ function catalog_getResponse(items) {
+ var catalog = "";
+ for (var i=0; i<items.length; i++) {
+ var item = items[i].name + ' - ' + items[i].price;
+ catalog += '<input name="items" type="checkbox" value="' +
+ item + '">' + item + ' <br>';
+ }
+ document.getElementById('catalog').innerHTML=catalog;
+ catalogItems = items;
+ }
+
+ dojo.addOnUnload(function(){
+ catalog.get().addCallback(catalog_getResponse);
+ });
+
+
+</script>
+
+</head>
+
+<body>
+<h1>Store</h1>
+ <div id="store">
+ <h2>Catalog</h2>
+ <form name="catalogForm">
+ <div id="catalog" ></div>
+ <br>
+ </form>
+
+ <br>
+ </div>
+</body>
+</html>