From 194369b022823a4c869c0018222b2ee9360169d9 Mon Sep 17 00:00:00 2001 From: lresende Date: Mon, 5 Oct 2009 17:57:15 +0000 Subject: [PATCH] Tuscany expertise REST service appengine sample application git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@821941 13f79535-47bb-0310-9956-ffa450edef68 --- .../.classpath | 9 ++ .../expertise-rest-appengine-webapp/.project | 34 +++++ .../com.google.appengine.eclipse.core.prefs | 3 + .../com.google.gdt.eclipse.core.prefs | 3 + .../com.google.gwt.eclipse.core.prefs | 3 + .../expertise-rest-appengine-webapp/pom.xml | 122 ++++++++++++++++++ .../src/log4j.properties | 24 ++++ .../org/apache/tuscany/expertise/Expert.java | 64 +++++++++ .../expertise/restfull/ExpertRegistry.java | 35 +++++ .../restfull/ExpertRegistryImpl.java | 92 +++++++++++++ .../restfull/RestfulExpertiseLocator.java | 104 +++++++++++++++ .../src/rest.composite | 38 ++++++ .../war/META-INF/sca-contribution.xml | 24 ++++ .../war/WEB-INF/appengine-web.xml | 11 ++ .../war/WEB-INF/classes/log4j.properties | 24 ++++ .../org/apache/tuscany/expertise/Expert.class | Bin 0 -> 1317 bytes .../expertise/restfull/ExpertRegistry.class | Bin 0 -> 512 bytes .../restfull/ExpertRegistryImpl.class | Bin 0 -> 2524 bytes .../restfull/RestfulExpertiseLocator.class | Bin 0 -> 3947 bytes .../war/WEB-INF/classes/rest.composite | 38 ++++++ .../war/WEB-INF/logging.properties | 28 ++++ .../war/WEB-INF/web.xml | 24 ++++ .../war/index.html | 10 ++ 23 files changed, 690 insertions(+) create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.classpath create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.project create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.settings/com.google.appengine.eclipse.core.prefs create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.settings/com.google.gdt.eclipse.core.prefs create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.settings/com.google.gwt.eclipse.core.prefs create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/pom.xml create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/log4j.properties create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/Expert.java create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistry.java create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistryImpl.java create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/RestfulExpertiseLocator.java create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/rest.composite create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/META-INF/sca-contribution.xml create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/appengine-web.xml create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/log4j.properties create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/org/apache/tuscany/expertise/Expert.class create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/org/apache/tuscany/expertise/restfull/ExpertRegistry.class create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/org/apache/tuscany/expertise/restfull/ExpertRegistryImpl.class create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/org/apache/tuscany/expertise/restfull/RestfulExpertiseLocator.class create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/rest.composite create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/logging.properties create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/web.xml create mode 100644 sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/index.html diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.classpath b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.classpath new file mode 100644 index 0000000000..ccc7355a00 --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.project b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.project new file mode 100644 index 0000000000..22c776f675 --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.project @@ -0,0 +1,34 @@ + + + expertise-rest-appengine-webapp + + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.google.appengine.eclipse.core.enhancerbuilder + + + + + com.google.appengine.eclipse.core.projectValidator + + + + + com.google.gdt.eclipse.core.webAppProjectValidator + + + + + + org.eclipse.jdt.core.javanature + com.google.appengine.eclipse.core.gaeNature + com.google.gdt.eclipse.core.webAppNature + + diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.settings/com.google.appengine.eclipse.core.prefs b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.settings/com.google.appengine.eclipse.core.prefs new file mode 100644 index 0000000000..4cb9799348 --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.settings/com.google.appengine.eclipse.core.prefs @@ -0,0 +1,3 @@ +#Mon Sep 21 17:52:18 PDT 2009 +eclipse.preferences.version=1 +filesCopiedToWebInfLib=appengine-api-1.0-sdk-1.2.5.jar|appengine-api-labs-1.2.5.jar|datanucleus-appengine-1.0.3.jar|datanucleus-core-1.1.5.jar|datanucleus-jpa-1.1.5.jar|geronimo-jpa_3.0_spec-1.1.1.jar|geronimo-jta_1.1_spec-1.1.1.jar|jdo2-api-2.3-eb.jar diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.settings/com.google.gdt.eclipse.core.prefs b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.settings/com.google.gdt.eclipse.core.prefs new file mode 100644 index 0000000000..9fc852536a --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.settings/com.google.gdt.eclipse.core.prefs @@ -0,0 +1,3 @@ +#Mon Sep 21 18:15:57 PDT 2009 +eclipse.preferences.version=1 +jarsExcludedFromWebInfLib= diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.settings/com.google.gwt.eclipse.core.prefs b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.settings/com.google.gwt.eclipse.core.prefs new file mode 100644 index 0000000000..2d3aa6f07f --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/.settings/com.google.gwt.eclipse.core.prefs @@ -0,0 +1,3 @@ +#Mon Sep 21 18:15:57 PDT 2009 +eclipse.preferences.version=1 +filesCopiedToWebInfLib= diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/pom.xml b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/pom.xml new file mode 100644 index 0000000000..38781fc649 --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/pom.xml @@ -0,0 +1,122 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-SNAPSHOT + ../pom.xml + + expertise-rest-appengine-webapp + war + Apache Tuscany SCA RESTFull Expertise Locator + + + + org.apache.tuscany.sca + tuscany-sca-api + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-http-runtime + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-host-webapp + 2.0-SNAPSHOT + runtime + + + + javax.servlet + servlet-api + 2.5 + provided + + + + + ${artifactId} + + + org.apache.maven.plugins + maven-eclipse-plugin + + + org.eclipse.jdt.core.javanature + com.google.appengine.eclipse.core.gaeNature + com.google.gdt.eclipse.core.webAppNature + + + org.eclipse.jdt.core.javabuilder + com.google.appengine.eclipse.core.enhancerbuilder + com.google.appengine.eclipse.core.projectValidator> + com.google.gdt.eclipse.core.webAppProjectValidator> + + + org.eclipse.jdt.launching.JRE_CONTAINER + com.google.appengine.eclipse.core.GAE_CONTAINER + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.1 + + + copy-dependencies + process-sources + + copy-dependencies + + + war/WEB-INF/lib + true + + + + + + + org.apache.maven.plugins + maven-war-plugin + 2.1-beta-1 + + war + + + + + + diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/log4j.properties b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/log4j.properties new file mode 100644 index 0000000000..d9c3edc9fe --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/log4j.properties @@ -0,0 +1,24 @@ +# 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 diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/Expert.java b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/Expert.java new file mode 100644 index 0000000000..61ac1c12b7 --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/Expert.java @@ -0,0 +1,64 @@ +/* + * 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.expertise; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +public class Expert implements Serializable { + private static final long serialVersionUID = 2026687637313310397L; + + private String id; + private String name; + private String location; + private List expertises = new ArrayList(); + + public Expert() { + + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + public List getExpertise() { + return this.expertises; + } +} diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistry.java b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistry.java new file mode 100644 index 0000000000..04dc7424a6 --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistry.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.expertise.restfull; + +import java.util.List; + +import org.apache.tuscany.expertise.Expert; + +public interface ExpertRegistry { + + void addExpert(Expert expert); + + void removeExpert(Expert expert); + + List getExperts(); + + List getExpertsByExpertise(String expertise); +} \ No newline at end of file diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistryImpl.java b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistryImpl.java new file mode 100644 index 0000000000..800dc101a0 --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/ExpertRegistryImpl.java @@ -0,0 +1,92 @@ +/* + * 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.expertise.restfull; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.tuscany.expertise.Expert; +import org.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.Service; + +@Service(ExpertRegistry.class) +public class ExpertRegistryImpl implements ExpertRegistry { + private List experts = new ArrayList(); + + public ExpertRegistryImpl() { + + } + + @Init + public void init() { + Expert expert; + + expert = new Expert(); + expert.setId("1"); + expert.setName("John Smith"); + expert.setLocation("CA"); + expert.getExpertise().add("SOA"); + expert.getExpertise().add("SCA"); + expert.getExpertise().add("WAS"); + + experts.add(expert); + + expert = new Expert(); + expert.setId("2"); + expert.setName("Ken Johnson"); + expert.setLocation("NY"); + expert.getExpertise().add("Search"); + + experts.add(expert); + + expert = new Expert(); + expert.setId("3"); + expert.setName("Mark Smith"); + expert.setLocation("CA"); + expert.getExpertise().add("SCA"); + expert.getExpertise().add("WASCE"); + + experts.add(expert); + } + + public void addExpert(Expert expert) { + experts.add(expert); + } + + public void removeExpert(Expert expert) { + experts.remove(expert); + } + + public List getExperts() { + return experts; + } + + public List getExpertsByExpertise(String expertise) { + List expertsByExpertise = new ArrayList(); + + for (Expert expert : experts) { + if (expert.getExpertise().contains(expertise)) { + expertsByExpertise.add(expert); + } + } + + return expertsByExpertise; + } +} diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/RestfulExpertiseLocator.java b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/RestfulExpertiseLocator.java new file mode 100644 index 0000000000..73828c639f --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/org/apache/tuscany/expertise/restfull/RestfulExpertiseLocator.java @@ -0,0 +1,104 @@ +/* + * 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.expertise.restfull; + +import java.io.IOException; +import java.net.URLDecoder; +import java.util.List; + +import javax.servlet.Servlet; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.tuscany.expertise.Expert; +import org.oasisopen.sca.annotation.Reference; +import org.oasisopen.sca.annotation.Scope; +import org.oasisopen.sca.annotation.Service; + +@Service(Servlet.class) +@Scope("COMPOSITE") +public class RestfulExpertiseLocator extends HttpServlet implements Servlet { + + private static final long serialVersionUID = 4021701701436888369L; + + @Reference + protected ExpertRegistry experts; + + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + String path = URLDecoder.decode(getRequestPath(request), "UTF-8"); + String expertise = path.substring(1); + + if (expertise != null && expertise.length() > 0 ) { + printExperts(response.getOutputStream(), experts.getExpertsByExpertise(expertise)); + } else { + printExperts(response.getOutputStream(), experts.getExperts()); + } + + } + + + private void printExperts(ServletOutputStream out, List experts) throws IOException { + out.print(""); + out.print("

Expertise Locator

"); + + if (experts.size() > 0) { + for (Expert expert: experts) { + out.print("Location: " + expert.getLocation() + " - " + expert.getName() +" ==> "); + for (String expertise : expert.getExpertise()) { + out.print(expertise + ";"); + } + out.print("
"); + } + } else { + out.println("No experts found"); + } + out.print(""); + } + + /** + * + * @param request + * @return + */ + private static String getRequestPath(HttpServletRequest request) { + // Get the request path + String contextPath = request.getContextPath(); + String servletPath = request.getServletPath(); + String requestURI = request.getRequestURI(); + + int contextPathLength = request.getContextPath().length(); + int servletPathLenght = servletPath.contains(contextPath) ? servletPath.length() - contextPath.length() : servletPath.length(); + + String requestPath = requestURI.substring(contextPathLength + servletPathLenght); + + if (requestURI.startsWith("/")) { + requestPath = requestPath.substring(1); + } + + return requestPath; + } + + +} diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/rest.composite b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/rest.composite new file mode 100644 index 0000000000..9e32209a18 --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/src/rest.composite @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/META-INF/sca-contribution.xml b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..13eb0dbc2b --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/META-INF/sca-contribution.xml @@ -0,0 +1,24 @@ + + + + + + \ No newline at end of file diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/appengine-web.xml b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/appengine-web.xml new file mode 100644 index 0000000000..42e4330edf --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/appengine-web.xml @@ -0,0 +1,11 @@ + + + scaapps + 1 + + + + + + + \ No newline at end of file diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/log4j.properties b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/log4j.properties new file mode 100644 index 0000000000..d9c3edc9fe --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/log4j.properties @@ -0,0 +1,24 @@ +# 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 diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/org/apache/tuscany/expertise/Expert.class b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/org/apache/tuscany/expertise/Expert.class new file mode 100644 index 0000000000000000000000000000000000000000..b814e12956840e7a668f90d3b9503ca1bc5f417f GIT binary patch literal 1317 zcma)+T~8B16o%g^EemCl3IzdCQ9f*ounOvhU=u}6Fb!T*n|L{tO&PN6lHIKl|B^SF zNJ#wp0sbiCJG12@?UI;gccy3FbIx!HZWyb`bzYjCg{(kfUw)8|C;gW5W@q1R#uoYoipHt}r|yPIdg_zh@mz`{^S9xK zkqZ2GTQ3B}Yk}d-z>i|-#|`PV-Q3LV)6d19+rI=dYFA*icAlahhstlQ3uJwHz<>i@ z(3CM_3FOc4A|^_F+OhJSnu=n24Axc4mvK9!+kDsYMsJELUHUhaui~meU#Z++&dp%g z&7%*KHi{UxFfA}<*i4>hVJMGuvOK0RIS7FpHVU{ZFj7;#yWKw6al^MsBSvfF_8OAS zVPiVRY`mw)zEJy*-jgoZa^o%br&ucY;_LJaHf#)27$w5-Qm;g>7Vu*@UyMRqqaw~X0II~lxixXJvF<#R5d_8D~P4|`3cV;LF zyP_M7+XU$2ljCn176!N<#e LnhLaL2Kn$GQ3>NZ literal 0 HcmV?d00001 diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/org/apache/tuscany/expertise/restfull/ExpertRegistry.class b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/org/apache/tuscany/expertise/restfull/ExpertRegistry.class new file mode 100644 index 0000000000000000000000000000000000000000..9cb8566552e57258c8a0f82bc61b6ffa1f5d8de8 GIT binary patch literal 512 zcma)(u};G<5Qcx3($G+#fOrFjbiqPmK|u^iurv}9k=RXo7*`>w9H%0$#=rycP>3U@ zWdNZ}KHvSm@4xf=$Lkw_Q|t%m37nNyOSMqh6G>NBnJOAdFAK8HR3t4`?y=5udEKV& zNSn&pCO}_cJXcF4b5&@0`!J`>2@KV2=9L0bl>FP;>*C41z{t{bxun(0P?Pg_L*3*~A{0_VR37oEVD+~??rbk%qyPc3j9d1gCY>Z~br{D+Nc2U&MB zVOrKUqZ^a6gG29TweXX#6$}IfHu&#=KJR}M0}cd&?{f=7u7_OhVVmNyJ5p5t-tKk(0}-G==K#iB72Y^}(=<@xT;TxqKqLsX#sk-2Re zMbpk3%Nvhmj+jjXSN;#CKrD>w5jGRxmVK*eWEe3i(44jMw&|B$DKK{Acp_6bV3>Py zk|<3RmTmcy0u6orYXZ@Vn9kj#{$Dr13DD`nfaN^;HeECxu~ zw&R<=<=DjU3Gf}$vpi=@+6KF5mr- z{@kWOS6|3}(DbbDT6R9!zowyAAU^LD>~qt+q~eO~-YN z)5hF9ns%twWdD5)6AC1q(x61Kp2}*NV&%gcrkUJ=w9l!UJjd2>i^(tD(=baJWu@un z3L4(0?TChX*1l-EkHgwEWJnjW(lay-MJ;f#z6dHJrO=sf_#x2OcPu9*W!;q}XIqAz ziju63RaJgdc)$z~D5YeszeMQqFHu(&XnH3M7&Pg^zbWHr+XNPlVRqbPRG}Z~_!tia zG|QK+={v4K_o3?MD*MS6d*cZkRC!=q$pYk!=?vrgH~ z$yrMcoRcB*wIlhGiXhNie;j0`yKUtpM@!?jSu7K3w7$w-F`tq+&xzQ;r;$%Y4MzSp z^S>p6IGVWTNag!A?o0=EK>NTRS_fXB{oWore#VI(1M4onTWJ9zMsXHxoH*V5Qr`5z zNxZ>d&Oq)&aGGm{{w9BkEvC2^;rf>sI78UCGl`C~yEvcdxVVdV6CDG)7)txOPMz|jM2`3WavI=xF07?Zw>3yJ?Iu5r3hq=R%Yojf^)COI4DFoHX{f^}TQ1L`q{F*qD_Um%GuF@dje17Fkf8{EWqn8FX_ zeh=vYxjW>k!l#C3Si};U6j;Uwe5+2~s<5fo@KMb$9w5xJv$tyy^$Mcu*goQ&S0b*k z2}cppW_pO-*IMXh$^B&HY4~JErUa0Bh`6c;OXCg4yp_qf(%YG z2VjMbT&1M%vVCi8)hgQ&ws?RtSC=9bwpu+#ky&dPM~UwUy}AM_8(`B?U4-yVH6X%< St6H~$tI)!;&-u7Hc>e&zT~lEI literal 0 HcmV?d00001 diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/org/apache/tuscany/expertise/restfull/RestfulExpertiseLocator.class b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/classes/org/apache/tuscany/expertise/restfull/RestfulExpertiseLocator.class new file mode 100644 index 0000000000000000000000000000000000000000..67f5ca9cc79ca2fd8f98915182207867cb02ec51 GIT binary patch literal 3947 zcmbVOX?qjb6@ITRX=Hf_pa6*>B}yS+ER<;oF~kxI!8So4Y$9V52uT^qV{529Qf5Zf zPM35^+N4|3C2dLDbg$DbCT(gkY12LJ(=Yv$&;1kq-1faQBY6|xr;i@Z-OoMeJ?}a9 z{Nq2@-vMwx{;r@+;84|`)byHODjS+xcS^c7qZ!jR!*)%_&}_qTC+d}oR`5H6jg@@0 zq`OsHK}cZxMg5XKtvQB$sbaWV*>!8$F@8q;2?Y^>&CB-$O9C5s%G4`khV7VDYcw|? zAdU;H>#tglt6T1vUa1@51ONPY>H78e?iWye-5i15{Mt14RW2BlrsLW(X@Ran-Ez$- zW6X5SV#RpGvZ}7`@^%XC_Jme-$8@SS!_tU{rZ+bbg$ctptdc=7k&J1XZdRbZd(W6a zsJ}XH#L$jSDmGxF!1}yt8AJ7{qG6xbd5=I`f>s&RX)wpZWXLU>y!hcYT5|(GP@nL4 z^-;qWD0JtSW4+QJ1>@;Dy_vq{Hm62RjI^{aHaJ}}Y92@m-nYu-fjgU<6x=OvyHrCn zt6FZjxe$ZEJu2Rh9Rjya8g8J=Dcvm#q}QtX9#3_xqFa;Nh-;hHWIBp_3Bl;;qp5>2 z?8Y7i-3<*aa&okgA23SvkgcKzNqTSG8wwosFI^^VwfGh{#*l)h;68HLGjxeIDn0;m zwZo|w$vLV={&(kYAmafQ`|%((suaXXQgBdU*R7oCdr3tfNP_jmbhz%; z>Mn6H^eKURyZw6?<1=v9(rxJu`sI)c73(_jFdk8GSYZGE6JIKhpr7Va4?pmnBQwpU zA+WOr+5s+g*Q{uH25DN7WKhLXJSw2ph+jh#gMKANS{dWJZ&BW!F=z}SkK zu3^j9NMOq{f98VubSF%FNWn!qd{Ja$RYe61l#pdiGktDqNbur$xOmYhxoHJefgLxE z2j3P2PYc}P-LWJe9I2ZXrk*I6=r?AHSNfn=xS1Y`FNS`vI zc#ghI96IFd_!$+SmCI4L>MJ16yr|-HGOE;ORFSYUHGVvZ{!6#?6V*o@T;K8Q^=aw_6q%Oty|_#!=* zR{%4$Mip>ih48foY$tw#*A>iCh2_C{gGXP*Po)dx)5{9WC8qM}l~R7L;unpj0D#8Q z8!G1H(mI|B9_-OVPCEHb6~Dr-Nr@7L>87lpwk`E?e_6LjWHOZ{ll0tg=vqylysF|F z7MP7$<=L)t#*{B#%Y1Q;u^`0P&jS8@BB z?6hGszj8CsjV=7D{s!EEJ2?uWi`TSao42bCcVW9H=n7ZDoI9SphD3blHS8Knh32uh zFVq!!7dyJx-}f4}_3T|huRzaR$aIAkkZr?N49sH7lKBN36LNM@o2}Fb*hhmNpyChm z#$NsoB8Rl6;eP+-Ktt+)JWhIAAIA`eJtz+26dof`8}Sed?1ebXf`T*B5(&z7jIh^+ z)6yQ%&pCzTxnz8F9%qvAC;6rF9~5{EFSEnc+83I|v^0ZM{R6C_J z9?!%-&JX*ako`~dGmqyfhBGht0wS~6-4zK0r24|1gs$*4e4aw$FEvldJzo}h^}p{W z%H;ayB{2TMQoQ!{)3lg+;&xO78JXq#LaF{MU!nuAVF+d{+F-6m#XZsS4 z;T6vR04MM|A$x;xNtgS8&NTs@qs`y-0G*?(?-8UVF5>$<*G^e?dVq%UL!R`>B6t1B zgPnyv&q=2Ji+d%YXL}a#V}U%Ip9!2~^Gkstf07*O4ed?N + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/logging.properties b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/logging.properties new file mode 100644 index 0000000000..4a78b7f353 --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/logging.properties @@ -0,0 +1,28 @@ +# 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: +# +# +# +# +# + +# 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 diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/web.xml b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/web.xml new file mode 100644 index 0000000000..ddfd262176 --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + + + + + tuscany + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + + tuscany + /* + + + + + index.html + + + diff --git a/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/index.html b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/index.html new file mode 100644 index 0000000000..9c151de2c0 --- /dev/null +++ b/sandbox/lresende/sca/samples/expertise-rest-appengine-webapp/war/index.html @@ -0,0 +1,10 @@ + + + + +Insert title here + + +Tuscany Restfull Application + + \ No newline at end of file