From 8da933c3c90c27644e9b2a5bcce608882627ff95 Mon Sep 17 00:00:00 2001 From: Zhaohui Feng Date: Thu, 30 Dec 2010 16:59:35 +0000 Subject: [PATCH 001/157] Change json serialization to not marshal null values git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1053939 13f79535-47bb-0310-9956-ffa450edef68 --- modules/databinding-json/META-INF/MANIFEST.MF | 1 + .../tuscany/sca/databinding/json/JSON2JavaBean.java | 2 +- .../tuscany/sca/databinding/json/JavaBean2JSON.java | 4 ++-- .../sca/databinding/json/jackson/JacksonHelper.java | 2 ++ .../sca/databinding/json/JavaBean2JSONTestCase.java | 9 +++++++++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/databinding-json/META-INF/MANIFEST.MF b/modules/databinding-json/META-INF/MANIFEST.MF index 2882a31966..940ecccd8a 100644 --- a/modules/databinding-json/META-INF/MANIFEST.MF +++ b/modules/databinding-json/META-INF/MANIFEST.MF @@ -21,6 +21,7 @@ Import-Package: javax.xml.namespace, org.apache.tuscany.sca.interfacedef.util;version="2.0.0", org.codehaus.jackson, org.codehaus.jackson.map, + org.codehaus.jackson.map.annotate, org.codehaus.jackson.map.deser, org.codehaus.jackson.map.introspect, org.codehaus.jackson.map.ser, diff --git a/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/JSON2JavaBean.java b/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/JSON2JavaBean.java index a9edc66ae8..5cf48645b8 100644 --- a/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/JSON2JavaBean.java +++ b/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/JSON2JavaBean.java @@ -41,7 +41,7 @@ public JSON2JavaBean() { throw new TransformationException(e); } serializer.setMarshallClassHints(true); - serializer.setMarshallNullAttributes(true); + serializer.setMarshallNullAttributes(false); } public Object transform(Object source, TransformationContext context) { diff --git a/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/JavaBean2JSON.java b/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/JavaBean2JSON.java index 17ed06298e..0c0683b16c 100644 --- a/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/JavaBean2JSON.java +++ b/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/JavaBean2JSON.java @@ -19,10 +19,10 @@ package org.apache.tuscany.sca.databinding.json; +import org.apache.tuscany.sca.databinding.BaseTransformer; import org.apache.tuscany.sca.databinding.PullTransformer; import org.apache.tuscany.sca.databinding.TransformationContext; import org.apache.tuscany.sca.databinding.TransformationException; -import org.apache.tuscany.sca.databinding.BaseTransformer; import org.apache.tuscany.sca.databinding.javabeans.JavaBeansDataBinding; import org.jabsorb.JSONSerializer; import org.jabsorb.serializer.SerializerState; @@ -38,7 +38,7 @@ public JavaBean2JSON() { throw new TransformationException(e); } serializer.setMarshallClassHints(true); - serializer.setMarshallNullAttributes(true); + serializer.setMarshallNullAttributes(false); } @Override diff --git a/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java b/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java index 00ddc2601d..459462fa97 100644 --- a/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java +++ b/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java @@ -38,6 +38,7 @@ import org.codehaus.jackson.map.DeserializationConfig; import org.codehaus.jackson.map.MappingJsonFactory; import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.map.annotate.JsonSerialize; import org.codehaus.jackson.map.deser.CustomDeserializerFactory; import org.codehaus.jackson.map.deser.StdDeserializerProvider; import org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector; @@ -100,6 +101,7 @@ public static ObjectMapper createObjectMapper(Class cls) { // [rfeng] To avoid complaints about javaClass mapper.getDeserializationConfig().set(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, Boolean.FALSE); mapper.getSerializationConfig().setAnnotationIntrospector(pair); + mapper.getSerializationConfig().setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL); return mapper; } diff --git a/modules/databinding-json/src/test/java/org/apache/tuscany/sca/databinding/json/JavaBean2JSONTestCase.java b/modules/databinding-json/src/test/java/org/apache/tuscany/sca/databinding/json/JavaBean2JSONTestCase.java index 3b36f5be74..9ec9f21d7e 100644 --- a/modules/databinding-json/src/test/java/org/apache/tuscany/sca/databinding/json/JavaBean2JSONTestCase.java +++ b/modules/databinding-json/src/test/java/org/apache/tuscany/sca/databinding/json/JavaBean2JSONTestCase.java @@ -42,6 +42,7 @@ public static class MyBean { private String friends[]; private List books; private YourBean you; + private String note; public String getName() { return name; @@ -91,6 +92,14 @@ public void setYou(YourBean you) { this.you = you; } + public String getNote() { + return note; + } + + public void setNote(String note) { + this.note = note; + } + } public static class YourBean { From b924c0a1edb774086ed1b4fee0992fa9818157d5 Mon Sep 17 00:00:00 2001 From: Zhaohui Feng Date: Thu, 30 Dec 2010 16:59:41 +0000 Subject: [PATCH 002/157] Add a method remove duplicate service declsrations git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1053940 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/extensibility/ServiceDiscovery.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java b/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java index f99f682e07..973664f382 100644 --- a/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java +++ b/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java @@ -26,6 +26,7 @@ import java.util.Comparator; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.logging.Level; @@ -285,4 +286,21 @@ public void setAttribute(String serviceType, String attribute, String value) { public Map getAttributes(String serviceType) { return serviceAttributes.get(serviceType); } + + /** + * Remove the duplicate service declarations. The duplication happens when we have the same jar from more than one entries on the classpath + * @param declarations + * @return + */ + public static Collection removeDuplicateDeclarations(Collection declarations) { + // Use LinkedHashMap to maintain the insertion order + Map map = new LinkedHashMap(); + for (ServiceDeclaration sd : declarations) { + ServiceDeclaration existed = map.put(sd.getClassName(), sd); + if (existed != null) { + logger.warning("Duplicate service declaration is ignored: " + existed + " <-> " + sd); + } + } + return map.values(); + } } From 39997f62d6c492149b09e3fe043600c8eb19ffc6 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Fri, 31 Dec 2010 09:34:12 +0000 Subject: [PATCH 003/157] Update release notes for beta2 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1054073 13f79535-47bb-0310-9956-ffa450edef68 --- RELEASE_NOTES | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index a8a09b288a..784dc27804 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -1,5 +1,5 @@ -Apache Tuscany SCA 2.0-Beta1 June 2010 Release Notes -===================================================== +Apache Tuscany SCA 2.0-Beta2 January 2010 Release Notes +======================================================= Apache Tuscany provides a runtime based on the Service Component Architecture. SCA is a set of specifications aimed at simplifying SOA @@ -9,7 +9,7 @@ of Open Composite Services Architecture (Open CSA) - http://www.oasis-opencsa.or Overview -------- -The Apache Tuscany SCA 2.0-Beta1 release includes implementations of the +The Apache Tuscany SCA 2.0-Beta2 release includes implementations of the main SCA specifications and recent updates from Open CSA drafts including: * SCA Assembly Model V1.1 @@ -39,7 +39,7 @@ yet defined by SCA specifications, including: The Tuscany SCA Runtime can be configured as a single node SCA domain. -For this Beta1 release the remote Domain support is disabled pending +For this Beta2 release the remote Domain support is disabled pending some up-coming changes in the way that domains are addressed and accessed. This means that the scaclient-* samples don't work and cross JVM applications that rely on binding-sca won't work. From 5f09a6c64e1bc8b346660c7bb860c5a967e018f3 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Fri, 31 Dec 2010 09:34:38 +0000 Subject: [PATCH 004/157] Update changes file for beta2 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1054074 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index ad494239ad..c3194699e2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,11 @@ +Changes With Apache Tuscany SCA 2.0-Beta2 January 2010 +====================================================== + +Highlights include: + + + + Changes With Apache Tuscany SCA 2.0-Beta1 November 2010 ======================================================= From f8bced79288102daa9017755f12cd4730e0deb05 Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Sat, 1 Jan 2011 23:22:10 +0000 Subject: [PATCH 005/157] Partialy reverting changes from 1033523 to avoid issues with applications using rest binding git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1054312 13f79535-47bb-0310-9956-ffa450edef68 --- modules/binding-rest-runtime/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/binding-rest-runtime/pom.xml b/modules/binding-rest-runtime/pom.xml index ce88df7efc..9601c4ef05 100644 --- a/modules/binding-rest-runtime/pom.xml +++ b/modules/binding-rest-runtime/pom.xml @@ -34,7 +34,6 @@ org.apache.tuscany.sca tuscany-binding-rest 2.0-SNAPSHOT - provided @@ -158,6 +157,7 @@ 1.6.1 runtime + org.slf4j slf4j-jdk14 From 7fb83f297e6179a6c0b06d999de1a4059a9dae97 Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Sat, 1 Jan 2011 23:22:16 +0000 Subject: [PATCH 006/157] Enhance error message to display class name to which error applies git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1054313 13f79535-47bb-0310-9956-ffa450edef68 --- .../impl/HeuristicPojoProcessor.java | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java b/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java index 31cee72aa4..19d3992781 100644 --- a/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java +++ b/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java @@ -6,15 +6,15 @@ * 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. + * under the License. */ package org.apache.tuscany.sca.implementation.java.introspect.impl; @@ -74,7 +74,7 @@ * property injection sites. If that service can be exactly mapped to an * interface implemented by the class then the service interface will be defined * in terms of that interface. - * + * * @version $Rev$ $Date$ */ public class HeuristicPojoProcessor extends BaseJavaClassVisitor { @@ -83,10 +83,10 @@ public HeuristicPojoProcessor(AssemblyFactory assemblyFactory, JavaInterfaceFact super(assemblyFactory); this.javaInterfaceFactory = javaFactory; } - + public HeuristicPojoProcessor(ExtensionPointRegistry registry) { super(registry); - } + } @Override public void visitEnd(Class clazz, JavaImplementation type) throws IntrospectionException { @@ -96,13 +96,13 @@ public void visitEnd(Class clazz, JavaImplementation type) throws Introsp /** * The following is quoted from Java Specification 1.2.1.3. Introspecting services offered by a Java implementation * In the cases described below, the services offered by a Java implementation class may be determined - * through introspection, eliding the need to specify them using @Service. The following algorithm is used + * through introspection, eliding the need to specify them using @Service. The following algorithm is used * to determine how services are introspected from an implementation class: - * - * If the interfaces of the SCA services are not specified with the @Service annotation on the - * implementation class, it is assumed that all implemented interfaces that have been annotated - * as @Remotable are the service interfaces provided by the component. If none of the implemented - * interfaces is remotable, then by default the implementation offers a single service whose type + * + * If the interfaces of the SCA services are not specified with the @Service annotation on the + * implementation class, it is assumed that all implemented interfaces that have been annotated + * as @Remotable are the service interfaces provided by the component. If none of the implemented + * interfaces is remotable, then by default the implementation offers a single service whose type * is the implementation class. */ Set> interfaces = getAllInterfaces(clazz); @@ -146,12 +146,12 @@ private void addService(JavaImplementation type, Class clazz) throws Introspe throw new IntrospectionException(e); } } - + private static boolean isAnnotatedWithSCA(AnnotatedElement element) { for (Annotation a : element.getAnnotations()) { // JCI_8023 - // policy annotations can be added to reference fields that - // don't have @Reference annotations so we need to allow + // policy annotations can be added to reference fields that + // don't have @Reference annotations so we need to allow // for the fields to be detected as references if (isSCAPolicyAnnotation(a)){ continue; @@ -165,7 +165,7 @@ private static boolean isAnnotatedWithSCA(AnnotatedElement element) { private static boolean isSCAAnnotation(Annotation a) { return a.annotationType().getName().startsWith("org.oasisopen.sca.annotation."); } - + private static boolean isSCAPolicyAnnotation(Annotation a) { if (a.annotationType().getName().startsWith("org.oasisopen.sca.annotation.PolicySets") ){ return true; @@ -223,7 +223,7 @@ private void calcPropRefs(Set methods, } Class param = method.getParameterTypes()[0]; Type paramType = method.getGenericParameterTypes()[0]; - + String name = toPropertyName(method.getName()); setters.add(name); // avoid duplicate property or ref names @@ -271,7 +271,7 @@ private void calcPropRefs(Set methods, /** * Determines the constructor to use based on the component type's * references and properties - * + * * @param type the component type * @param clazz the implementation class corresponding to the component type * @throws NoConstructorException if no suitable constructor is found @@ -299,7 +299,7 @@ private void evaluateConstructor(JavaImplementation type, Class clazz) th // no definition, heuristically determine constructor Constructor[] constructors = clazz.getConstructors(); if (constructors.length == 0) { - throw new NoConstructorException("[JCI50001] No public constructor for class"); + throw new NoConstructorException("[JCI50001] No public constructor for class :" + type.getName()); } else if (constructors.length == 1) { // Only one constructor, take it constructor = constructors[0]; @@ -310,7 +310,7 @@ private void evaluateConstructor(JavaImplementation type, Class clazz) th selected = ctor; for (Constructor ctor2 : constructors) { if (selected != ctor2 && allArgsAnnotated(ctor2)) { - throw new InvalidConstructorException("[JCI50005] Multiple annotated constructors"); + throw new InvalidConstructorException("[JCI50005] Multiple annotated constructors for class :" + type.getName()); } } } @@ -370,7 +370,7 @@ private void evaluateConstructor(JavaImplementation type, Class clazz) th } } } - + private boolean allArgsAnnotated(Constructor ctor) { if (ctor.getParameterTypes().length < 1) { return false; @@ -437,7 +437,7 @@ private boolean calcPropRefUniqueness(Collection props, Collect /** * Unambiguously finds the reference or property associated with the given * type - * + * * @return the name of the reference or property if found, null if not * @throws AmbiguousConstructorException if the constructor parameter cannot * be resolved to a property or reference @@ -491,7 +491,7 @@ private boolean findReferenceOrProperty(JavaParameterImpl parameter, /** * Creates a mapped property. - * + * * @param name the property name * @param paramType the property type */ @@ -529,7 +529,7 @@ private org.apache.tuscany.sca.assembly.Reference createReference(String name, C reference.setMultiplicity(Multiplicity.ONE_N); } else { reference.setMultiplicity(Multiplicity.ONE_ONE); - } // end if + } // end if } catch (InvalidInterfaceException e1) { throw new IntrospectionException(e1); } // end try @@ -542,9 +542,9 @@ private org.apache.tuscany.sca.assembly.Reference createReference(String name, C } return reference; } - + /** - * Reports if a parameter type is a form of java.util.Collection + * Reports if a parameter type is a form of java.util.Collection * @param paramType * @return true if paramType is a form of java.util.Collection, false otherwise */ @@ -552,7 +552,7 @@ private boolean isCollectionType( Class paramType ) { if( Collection.class.isAssignableFrom(paramType) ) return true; return false; } - + /** * Reports if a parameter type is an array * @param paramType @@ -603,8 +603,8 @@ private void processCallback(Class interfaze, Contract contract) throws Inval /** * Utility methods */ - - + + /** * Verify if the method is a public setter * @param method @@ -644,7 +644,7 @@ private static boolean areUnique(Class[] collection) { *
    *
  1. If its type is simple, then it is a property. *
  2. If its type is complex, then if the type is an interface marked by - * + * * @Remotable, then it is a reference; otherwise, it is a property. *
  3. Otherwise, if the type associated with the member is an * array or a java.util.Collection, the basetype is the element @@ -688,7 +688,7 @@ private static boolean isInServiceInterface(Method operation, List Date: Sat, 1 Jan 2011 23:22:20 +0000 Subject: [PATCH 007/157] Calculating ETag using util class from HTTP-common git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1054314 13f79535-47bb-0310-9956-ffa450edef68 --- .../META-INF/MANIFEST.MF | 1 + modules/binding-jsonrpc-runtime/pom.xml | 45 ++++++----- .../provider/JSONRPCServiceServlet.java | 79 ++++++++----------- 3 files changed, 58 insertions(+), 67 deletions(-) diff --git a/modules/binding-jsonrpc-runtime/META-INF/MANIFEST.MF b/modules/binding-jsonrpc-runtime/META-INF/MANIFEST.MF index cb951b84a2..8f550a8fc6 100644 --- a/modules/binding-jsonrpc-runtime/META-INF/MANIFEST.MF +++ b/modules/binding-jsonrpc-runtime/META-INF/MANIFEST.MF @@ -17,6 +17,7 @@ Import-Package: javax.security.auth.login, org.apache.http.util, org.apache.tuscany.sca.assembly;version="2.0.0", org.apache.tuscany.sca.binding.jsonrpc;version="2.0.0", + org.apache.tuscany.sca.common.http;version="2.0.0", org.apache.tuscany.sca.core;version="2.0.0", org.apache.tuscany.sca.databinding.javabeans;version="2.0.0", org.apache.tuscany.sca.databinding.json;version="2.0.0", diff --git a/modules/binding-jsonrpc-runtime/pom.xml b/modules/binding-jsonrpc-runtime/pom.xml index b585c3b0b8..ba7b49e7b7 100644 --- a/modules/binding-jsonrpc-runtime/pom.xml +++ b/modules/binding-jsonrpc-runtime/pom.xml @@ -7,15 +7,15 @@ * 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. + * under the License. --> 4.0.0 @@ -41,7 +41,7 @@ tuscany-core-spi 2.0-SNAPSHOT - + org.apache.tuscany.sca tuscany-core @@ -53,38 +53,44 @@ tuscany-databinding 2.0-SNAPSHOT - + org.apache.tuscany.sca tuscany-databinding-json 2.0-SNAPSHOT - + org.apache.tuscany.sca tuscany-host-http 2.0-SNAPSHOT - + + + org.apache.tuscany.sca + tuscany-common-http + 2.0-SNAPSHOT + + org.apache.httpcomponents httpclient 4.0.3 - + org.apache.httpcomponents httpcore 4.0.1 - - + + org.apache.tuscany.sca tuscany-host-jetty 2.0-SNAPSHOT test - - + + org.jabsorb jabsorb @@ -98,20 +104,21 @@ 1.6.1 runtime + org.slf4j slf4j-jdk14 1.6.1 runtime - + javax.servlet servlet-api - 2.5 + 2.5 provided - + commons-logging commons-logging @@ -126,7 +133,7 @@ servlet-api - + @@ -136,14 +143,14 @@ 2.0-SNAPSHOT test - + org.apache.tuscany.sca tuscany-implementation-java-runtime 2.0-SNAPSHOT test - - + + junit junit diff --git a/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java b/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java index 7ecfa83893..b4f7d7040b 100644 --- a/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java +++ b/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java @@ -6,15 +6,15 @@ * 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. + * under the License. */ package org.apache.tuscany.sca.binding.jsonrpc.provider; @@ -24,9 +24,7 @@ import java.io.InputStreamReader; import java.io.OutputStream; import java.io.UnsupportedEncodingException; -import java.math.BigInteger; import java.net.URLDecoder; -import java.security.MessageDigest; import java.util.Date; import java.util.List; @@ -37,6 +35,7 @@ import org.apache.commons.codec.binary.Base64; import org.apache.tuscany.sca.assembly.Binding; +import org.apache.tuscany.sca.common.http.HTTPUtil; import org.apache.tuscany.sca.databinding.json.JSONDataBinding; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.Message; @@ -52,7 +51,7 @@ /** * Servlet that handles JSON-RPC requests invoking SCA services. - * + * * There is an instance of this Servlet for each * * @version $Rev$ $Date$ @@ -61,14 +60,14 @@ public class JSONRPCServiceServlet extends JSONRPCServlet { private static final long serialVersionUID = 1L; transient MessageFactory messageFactory; - + transient Binding binding; transient String serviceName; transient Object serviceInstance; transient RuntimeEndpoint endpoint; transient Class serviceInterface; - public JSONRPCServiceServlet(MessageFactory messageFactory, + public JSONRPCServiceServlet(MessageFactory messageFactory, RuntimeEndpoint endpoint, Class serviceInterface, Object serviceInstance) { @@ -95,7 +94,7 @@ public void service(HttpServletRequest request, HttpServletResponse response) th } else { try { handleServiceRequest(request, response); - + } catch(RuntimeException re) { if (re.getCause() instanceof javax.security.auth.login.LoginException) { response.setHeader("WWW-Authenticate", "BASIC realm=\"" + "ldap-realm" + "\""); @@ -122,7 +121,7 @@ private void handleServiceRequest(HttpServletRequest request, HttpServletRespons if (charset == null) { charset = "UTF-8"; } - + CharArrayWriter data = new CharArrayWriter(); if (request.getMethod().equals("GET")) { // if using GET Support (see http://groups.google.com/group/json-rpc/web/json-rpc-over-http) @@ -144,9 +143,9 @@ private void handleServiceRequest(HttpServletRequest request, HttpServletRespons // JavaScript exceptions. throw new RuntimeException("Unable to parse request", e); } - + } else { - // default POST style + // default POST style BufferedReader in = new BufferedReader(new InputStreamReader(request.getInputStream(), charset)); // Read the request into charArray @@ -156,7 +155,7 @@ private void handleServiceRequest(HttpServletRequest request, HttpServletRespons data.write(buf, 0, ret); } } - + JSONObject jsonReq = null; String method = null; //parse the JSON payload @@ -170,7 +169,7 @@ private void handleServiceRequest(HttpServletRequest request, HttpServletRespons throw new RuntimeException("Unable to parse request", e); } - // check if it's a system request + // check if it's a system request // or a method invocation byte[] bout; try { @@ -190,17 +189,17 @@ private void handleServiceRequest(HttpServletRequest request, HttpServletRespons // needed to support naughty browsers such as Konqueror and Safari // which do not honour the charset set in the response response.setContentType("text/plain;charset=utf-8"); - + //set Cache-Control to no-cache to avoid intermediary //proxy/reverse-proxy caches and always hit the server //that would identify if the value was current or not response.setHeader("Cache-Control", "no-cache"); response.setHeader("Expires", new Date(0).toGMTString()); - + //handle etag if using GET if( request.getMethod().equals("GET")) { - String eTag = calculateETag(bout); - + String eTag = HTTPUtil.calculateHashETag(bout); + // Test request for predicates. String predicate = request.getHeader( "If-Match" ); if (( predicate != null ) && ( !predicate.equals(eTag) )) { @@ -214,10 +213,10 @@ private void handleServiceRequest(HttpServletRequest request, HttpServletRespons response.sendError(HttpServletResponse.SC_NOT_MODIFIED); return; } - + response.addHeader("ETag", eTag); } - + OutputStream out = response.getOutputStream(); out.write(bout); out.flush(); @@ -238,11 +237,11 @@ protected void handleSMDRequest(HttpServletRequest request, HttpServletResponse out.flush(); out.close(); } - + protected byte[] handleJSONRPCSystemInvocation(HttpServletRequest request, HttpServletResponse response, String requestData) throws IOException, UnsupportedEncodingException, JSONException { /* - * Create a new bridge for every request to avoid all the problems with + * Create a new bridge for every request to avoid all the problems with * JSON-RPC-Java storing the bridge in the session */ HttpSession session = request.getSession(); @@ -250,7 +249,7 @@ protected byte[] handleJSONRPCSystemInvocation(HttpServletRequest request, HttpS JSONRPCBridge jsonrpcBridge = new JSONRPCBridge(); jsonrpcBridge.registerObject("Service", serviceInstance, serviceInterface); session.setAttribute("JSONRPCBridge", jsonrpcBridge); - + org.json.JSONObject jsonReq = null; JSONRPCResult jsonResp = null; jsonReq = new org.json.JSONObject(requestData); @@ -265,7 +264,7 @@ protected byte[] handleJSONRPCSystemInvocation(HttpServletRequest request, HttpS return jsonResp.toString().getBytes("UTF-8"); } - + protected byte[] handleJSONRPCMethodInvocation(HttpServletRequest request, HttpServletResponse response, JSONObject jsonReq) throws IOException, UnsupportedEncodingException { @@ -278,7 +277,7 @@ protected byte[] handleJSONRPCMethodInvocation(HttpServletRequest request, HttpS if ((method != null) && (method.indexOf('.') < 0)) { jsonReq.putOpt("method", "Service" + "." + method); } - + // Extract the arguments JSONArray array = jsonReq.getJSONArray("params"); args = new Object[array.length()]; @@ -294,7 +293,7 @@ protected byte[] handleJSONRPCMethodInvocation(HttpServletRequest request, HttpS // invoke the request Operation jsonOperation = findOperation(method); Object result = null; - + // Invoke the get operation on the service implementation Message requestMessage = messageFactory.createMessage(); @@ -337,7 +336,7 @@ protected byte[] handleJSONRPCMethodInvocation(HttpServletRequest request, HttpS return jsonResponse.toString().getBytes("UTF-8"); } catch (Exception e) { throw new ServiceRuntimeException("Unable to create JSON response", e); - } + } } else { // regular operation returning some value @@ -356,7 +355,7 @@ protected byte[] handleJSONRPCMethodInvocation(HttpServletRequest request, HttpS return jsonResponse.toString().getBytes("UTF-8"); } catch (Exception e) { throw new ServiceRuntimeException("Unable to create JSON response", e); - } + } } } } else { @@ -365,7 +364,7 @@ protected byte[] handleJSONRPCMethodInvocation(HttpServletRequest request, HttpS JSONRPCResult errorResult = new JSONRPCResult(JSONRPCResult.CODE_REMOTE_EXCEPTION, id, exception ); return errorResult.toString().getBytes("UTF-8"); } - + } /** @@ -378,12 +377,12 @@ private Operation findOperation(String method) { if (method.contains(".")) { method = method.substring(method.lastIndexOf(".") + 1); } - - List operations = endpoint.getComponentServiceInterfaceContract().getInterface().getOperations(); + + List operations = endpoint.getComponentServiceInterfaceContract().getInterface().getOperations(); //endpoint.getComponentTypeServiceInterfaceContract().getInterface().getOperations(); //componentService.getBindingProvider(binding).getBindingInterfaceContract().getInterface().getOperations(); - + Operation result = null; for (Operation o : operations) { if (o.isDynamic()) @@ -395,21 +394,5 @@ private Operation findOperation(String method) { } return result; - } - - private String calculateETag(byte[] content) { - String eTag = "invalid"; - try { - MessageDigest messageDigest = MessageDigest.getInstance("MD5"); - byte[] digest = messageDigest.digest(content); - BigInteger number = new BigInteger(1, digest); - StringBuffer sb = new StringBuffer('0'); - sb.append(number.toString(16)); - eTag = sb.toString(); - } catch(Exception e) { - //ignore, we will return random etag - eTag = Integer.toString((new java.util.Random()).nextInt(Integer.MAX_VALUE)); - } - return eTag; } } From d68366d8d386d7469e62bc5c1f89fe3fda61493d Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Sat, 1 Jan 2011 23:22:25 +0000 Subject: [PATCH 008/157] Adding java doc git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1054316 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/common/http/HTTPUtil.java | 43 +++++++++++-------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtil.java b/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtil.java index f810970869..a3dede88ec 100644 --- a/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtil.java +++ b/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtil.java @@ -6,15 +6,15 @@ * 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. + * under the License. */ package org.apache.tuscany.sca.common.http; @@ -25,17 +25,17 @@ import javax.servlet.http.HttpServletRequest; /** - * + * * @tuscany.spi.extension.asclient * */ public class HTTPUtil { /** - * Calculate the relative request path taking in consideration if + * Calculate the relative request path taking in consideration if * the application is running in a embedded webContatiner or from * within a web application server host environment - * + * * @param request The http request * @return the relative path */ @@ -44,37 +44,42 @@ public static String getRequestPath(HttpServletRequest request) { String contextPath = request.getContextPath(); String servletPath = request.getServletPath(); String requestURI = request.getRequestURI(); - + int contextPathLength = contextPath.length(); int servletPathLenght = servletPath.contains(contextPath) ? servletPath.length() - contextPath.length() : servletPath.length(); - + String requestPath = requestURI.substring(contextPathLength + servletPathLenght); - + return requestPath; } - + /** - * Calculate the context root for an application taking in consideration if + * Calculate the context root for an application taking in consideration if * the application is running in a embedded webContatiner or from - * within a web application server host environment. - * + * within a web application server host environment. + * * In the case of webContainer the contextRoot will always be a empty string. - * + * * @param request The http request * @return the contextRoot - */ + */ public static String getContextRoot(HttpServletRequest request) { // Get the request path String contextPath = request.getContextPath(); String requestURI = request.getRequestURI(); - + int contextPathLength = contextPath.length(); - + String contextRoot = requestURI.substring(0, contextPathLength); - + return contextRoot; } - + + /** + * Calculate the ETag using MD5 Hash Algorithm + * @param content the content to hash + * @return + */ public static String calculateHashETag(byte[] content) { String eTag = "invalid"; try { From 158b2e7dd7cad7541edc293a894521b0cbfb0be0 Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Sat, 1 Jan 2011 23:22:37 +0000 Subject: [PATCH 009/157] Minor renaming: HTTPUtil -> HTTPUtils git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1054317 13f79535-47bb-0310-9956-ffa450edef68 --- .../atom/provider/AtomBindingListenerServlet.java | 10 +++++----- .../jsonrpc/provider/JSONRPCServiceServlet.java | 4 ++-- .../provider/JAXRSOperationSelectorInterceptor.java | 4 ++-- .../rpc/provider/RPCOperationSelectorInterceptor.java | 6 +++--- .../sca/common/http/{HTTPUtil.java => HTTPUtils.java} | 2 +- .../sca/web/javascript/dojo/DojoResourceServlet.java | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) rename modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/{HTTPUtil.java => HTTPUtils.java} (99%) diff --git a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java index d5ae26e01b..7779203a3a 100644 --- a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java +++ b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java @@ -52,7 +52,7 @@ import org.apache.abdera.writer.WriterFactory; import org.apache.commons.codec.binary.Base64; import org.apache.tuscany.sca.common.http.HTTPCacheContext; -import org.apache.tuscany.sca.common.http.HTTPUtil; +import org.apache.tuscany.sca.common.http.HTTPUtils; import org.apache.tuscany.sca.data.collection.Entry; import org.apache.tuscany.sca.databinding.Mediator; import org.apache.tuscany.sca.interfacedef.DataType; @@ -172,7 +172,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t //int servletPathLength = request.getContextPath().length() + request.getServletPath().length(); //String path = URLDecoder.decode(request.getRequestURI().substring(servletPathLength), "UTF-8"); - String path = URLDecoder.decode(HTTPUtil.getRequestPath(request), "UTF-8"); + String path = URLDecoder.decode(HTTPUtils.getRequestPath(request), "UTF-8"); logger.fine("get " + request.getRequestURI()); @@ -554,7 +554,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) } // Get the request path - String path = URLDecoder.decode(HTTPUtil.getRequestPath(request), "UTF-8"); + String path = URLDecoder.decode(HTTPUtils.getRequestPath(request), "UTF-8"); if (path == null || path.length() == 0 || path.equals("/")) { org.apache.abdera.model.Entry createdFeedEntry = null; @@ -679,7 +679,7 @@ protected void doPut(HttpServletRequest request, HttpServletResponse response) t } // Get the request path - String path = URLDecoder.decode(HTTPUtil.getRequestPath(request), "UTF-8"); + String path = URLDecoder.decode(HTTPUtils.getRequestPath(request), "UTF-8"); if (path != null && path.startsWith("/")) { String id = path.substring(1); @@ -766,7 +766,7 @@ protected void doDelete(HttpServletRequest request, HttpServletResponse response } // Get the request path - String path = URLDecoder.decode(HTTPUtil.getRequestPath(request), "UTF-8"); + String path = URLDecoder.decode(HTTPUtils.getRequestPath(request), "UTF-8"); String id; if (path != null && path.startsWith("/")) { diff --git a/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java b/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java index b4f7d7040b..0a68fcca86 100644 --- a/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java +++ b/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCServiceServlet.java @@ -35,7 +35,7 @@ import org.apache.commons.codec.binary.Base64; import org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.common.http.HTTPUtil; +import org.apache.tuscany.sca.common.http.HTTPUtils; import org.apache.tuscany.sca.databinding.json.JSONDataBinding; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.Message; @@ -198,7 +198,7 @@ private void handleServiceRequest(HttpServletRequest request, HttpServletRespons //handle etag if using GET if( request.getMethod().equals("GET")) { - String eTag = HTTPUtil.calculateHashETag(bout); + String eTag = HTTPUtils.calculateHashETag(bout); // Test request for predicates. String predicate = request.getHeader( "If-Match" ); diff --git a/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/provider/JAXRSOperationSelectorInterceptor.java b/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/provider/JAXRSOperationSelectorInterceptor.java index 928b80a044..f66ecfdbb5 100644 --- a/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/provider/JAXRSOperationSelectorInterceptor.java +++ b/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/jaxrs/provider/JAXRSOperationSelectorInterceptor.java @@ -37,7 +37,7 @@ import javax.ws.rs.Path; import org.apache.tuscany.sca.common.http.HTTPContext; -import org.apache.tuscany.sca.common.http.HTTPUtil; +import org.apache.tuscany.sca.common.http.HTTPUtils; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.interfacedef.Operation; @@ -89,7 +89,7 @@ public Message invoke(Message msg) { return getNext().invoke(msg); } - String path = URLDecoder.decode(HTTPUtil.getRequestPath(bindingContext.getHttpRequest()), "UTF-8"); + String path = URLDecoder.decode(HTTPUtils.getRequestPath(bindingContext.getHttpRequest()), "UTF-8"); if (path.startsWith("/")) { path = path.substring(1); diff --git a/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/provider/RPCOperationSelectorInterceptor.java b/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/provider/RPCOperationSelectorInterceptor.java index 0df6e5e0fb..53be473416 100644 --- a/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/provider/RPCOperationSelectorInterceptor.java +++ b/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/operationselector/rpc/provider/RPCOperationSelectorInterceptor.java @@ -31,7 +31,7 @@ import javax.ws.rs.QueryParam; import org.apache.tuscany.sca.common.http.HTTPContext; -import org.apache.tuscany.sca.common.http.HTTPUtil; +import org.apache.tuscany.sca.common.http.HTTPUtils; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.databinding.SimpleTypeMapper; @@ -91,7 +91,7 @@ public Message invoke(Message msg) { throw new RuntimeException("RPC Invocation only allowed over HTTP GET operations"); } - String path = URLDecoder.decode(HTTPUtil.getRequestPath(bindingContext.getHttpRequest()), "UTF-8"); + String path = URLDecoder.decode(HTTPUtils.getRequestPath(bindingContext.getHttpRequest()), "UTF-8"); if (path.startsWith("/")) { path = path.substring(1); @@ -155,7 +155,7 @@ public Message invoke(Message msg) { bindingContext.getHttpResponse().setHeader("Expires", new Date(0).toGMTString()); - String eTag = HTTPUtil.calculateHashETag(responseMessage.getBody().toString().getBytes("UTF-8")); + String eTag = HTTPUtils.calculateHashETag(responseMessage.getBody().toString().getBytes("UTF-8")); // Test request for predicates. String predicate = bindingContext.getHttpRequest().getHeader( "If-Match" ); diff --git a/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtil.java b/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java similarity index 99% rename from modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtil.java rename to modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java index a3dede88ec..90ac849712 100644 --- a/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtil.java +++ b/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java @@ -29,7 +29,7 @@ * @tuscany.spi.extension.asclient * */ -public class HTTPUtil { +public class HTTPUtils { /** * Calculate the relative request path taking in consideration if diff --git a/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoResourceServlet.java b/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoResourceServlet.java index dad72be5f2..eacf4a6224 100644 --- a/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoResourceServlet.java +++ b/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoResourceServlet.java @@ -30,7 +30,7 @@ import org.apache.tuscany.sca.common.http.HTTPConstants; import org.apache.tuscany.sca.common.http.HTTPContentTypeMapper; -import org.apache.tuscany.sca.common.http.HTTPUtil; +import org.apache.tuscany.sca.common.http.HTTPUtils; /** @@ -47,7 +47,7 @@ public DojoResourceServlet() { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { - String contextRoot = URLDecoder.decode(HTTPUtil.getContextRoot(request), HTTPConstants.CHARACTER_ENCODING_UTF8); + String contextRoot = URLDecoder.decode(HTTPUtils.getContextRoot(request), HTTPConstants.CHARACTER_ENCODING_UTF8); String path = URLDecoder.decode(request.getRequestURI(), HTTPConstants.CHARACTER_ENCODING_UTF8); if( path.startsWith(contextRoot + "/dojo") ) { From abf3e5da063ba01e6ba9e07e1bde8fc5ef5c0698 Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Sat, 1 Jan 2011 23:22:42 +0000 Subject: [PATCH 010/157] Minor formatting git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1054318 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/common/http/HTTPUtils.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java b/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java index 90ac849712..cbc2564bc4 100644 --- a/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java +++ b/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java @@ -81,18 +81,18 @@ public static String getContextRoot(HttpServletRequest request) { * @return */ public static String calculateHashETag(byte[] content) { - String eTag = "invalid"; - try { - MessageDigest messageDigest = MessageDigest.getInstance("MD5"); - byte[] digest = messageDigest.digest(content); - BigInteger number = new BigInteger(1, digest); - StringBuffer sb = new StringBuffer('0'); - sb.append(number.toString(16)); - eTag = sb.toString(); - } catch(Exception e) { - //ignore, we will return random etag - eTag = Integer.toString((new java.util.Random()).nextInt(Integer.MAX_VALUE)); - } - return eTag; + String eTag = "invalid"; + try { + MessageDigest messageDigest = MessageDigest.getInstance("MD5"); + byte[] digest = messageDigest.digest(content); + BigInteger number = new BigInteger(1, digest); + StringBuffer sb = new StringBuffer('0'); + sb.append(number.toString(16)); + eTag = sb.toString(); + } catch(Exception e) { + //ignore, we will return random etag + eTag = Integer.toString((new java.util.Random()).nextInt(Integer.MAX_VALUE)); + } + return eTag; } } From c94d071c2121d2525976aec15ceac06c8316fa77 Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Sat, 1 Jan 2011 23:20:42 +0000 Subject: [PATCH 011/157] TUSCANY-3812 - Fixing ETag and Cache headers to avoid refresh issues in IE git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1054319 13f79535-47bb-0310-9956-ffa450edef68 --- .../atom/provider/AtomBindingInvoker.java | 15 ++- .../provider/AtomBindingListenerServlet.java | 124 ++++++++++-------- .../atom/utils/AtomBindingHttpUtils.java | 56 ++++++++ .../tuscany/sca/common/http/HTTPUtils.java | 12 ++ 4 files changed, 144 insertions(+), 63 deletions(-) create mode 100644 modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/utils/AtomBindingHttpUtils.java diff --git a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingInvoker.java b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingInvoker.java index c1de646f54..e569276b08 100644 --- a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingInvoker.java +++ b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingInvoker.java @@ -6,15 +6,15 @@ * 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. + * under the License. */ package org.apache.tuscany.sca.binding.atom.provider; @@ -50,7 +50,7 @@ /** * Invoker for the Atom binding. - * + * * @version $Rev$ $Date$ */ class AtomBindingInvoker implements Invoker { @@ -205,7 +205,7 @@ public Message invoke(Message msg) { // Write the Atom entry StringWriter writer = new StringWriter(); feedEntry.writeTo(writer); - // postMethod.setHeader("Content-type", "application/atom+xml; charset=utf-8"); + // postMethod.setHeader("Content-type", "application/atom+xml; charset=utf-8"); - TUSCANY-3734 postMethod.setHeader("Content-type", "application/atom+xml;type=entry"); postMethod.setEntity(new StringEntity(writer.toString())); @@ -228,7 +228,7 @@ public Message invoke(Message msg) { } else { - // Returns the id of the created entry + // Returns the id of the created entry msg.setBody(createdEntry.getId().toString()); } @@ -304,7 +304,8 @@ public Message invoke(Message msg) { // Write the Atom entry StringWriter writer = new StringWriter(); feedEntry.writeTo(writer); - putMethod.setHeader("Content-type", "application/atom+xml; charset=utf-8"); + //putMethod.setHeader("Content-type", "application/atom+xml; charset=utf-8"); - TUSCANY-3734 + putMethod.setHeader("Content-type", "application/atom+xml;type=entry"); putMethod.setEntity(new StringEntity(writer.toString())); response = httpClient.execute(putMethod); diff --git a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java index 7779203a3a..e8f1edc44a 100644 --- a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java +++ b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java @@ -6,15 +6,15 @@ * 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. + * under the License. */ package org.apache.tuscany.sca.binding.atom.provider; @@ -50,7 +50,7 @@ import org.apache.abdera.parser.ParseException; import org.apache.abdera.parser.Parser; import org.apache.abdera.writer.WriterFactory; -import org.apache.commons.codec.binary.Base64; +import org.apache.tuscany.sca.binding.atom.utils.AtomBindingHttpUtils; import org.apache.tuscany.sca.common.http.HTTPCacheContext; import org.apache.tuscany.sca.common.http.HTTPUtils; import org.apache.tuscany.sca.data.collection.Entry; @@ -77,9 +77,9 @@ class AtomBindingListenerServlet extends HttpServlet { private static final Factory abderaFactory = Abdera.getNewFactory(); private static final Parser abderaParser = Abdera.getNewParser(); private static final String ETAG = "ETag"; - private static final String LASTMODIFIED = "Last-Modified"; - private static final String LOCATION = "Location"; - private static final String CONTENTLOCATION = "Content-Location"; + private static final String LASTMODIFIED = "Last-Modified"; + private static final String LOCATION = "Location"; + private static final String CONTENTLOCATION = "Content-Location"; private static final SimpleDateFormat dateFormat = new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss Z" ); // RFC 822 date time private Invocable wire; @@ -102,7 +102,7 @@ class AtomBindingListenerServlet extends HttpServlet { /** * Constructs a new binding listener. - * + * * @param wire * @param messageFactory * @param feedType @@ -149,7 +149,7 @@ class AtomBindingListenerServlet extends HttpServlet { if (itemClass == org.apache.abdera.model.Entry.class) { supportsFeedEntries = true; } - //We assume that the item type is the same for both input and + //We assume that the item type is the same for both input and //ouput for all operations on the interface itemClassType = getOperation.getOutputType().getLogical().get(0); } @@ -161,10 +161,10 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t // No authentication required for a get request // Test for any cache info in the request - HTTPCacheContext cacheContext = null; - try { + HTTPCacheContext cacheContext = null; + try { cacheContext = HTTPCacheContext.createCacheContextFromRequest( request ); - } catch ( java.text.ParseException e ) { + } catch ( java.text.ParseException e ) { } // System.out.println( "AtomBindingListener.doGet cache context=" + cacheContext ); @@ -173,7 +173,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t //String path = URLDecoder.decode(request.getRequestURI().substring(servletPathLength), "UTF-8"); String path = URLDecoder.decode(HTTPUtils.getRequestPath(request), "UTF-8"); - + logger.fine("get " + request.getRequestURI()); // Handle an Atom request @@ -193,7 +193,8 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t */ // Return the Atom service document - response.setContentType("application/atomsvc+xml; charset=utf-8"); + response.setDateHeader("Date", System.currentTimeMillis()); + response.setContentType("application/atomsvc+xml"); String href = request.getRequestURL().toString(); href = href.substring(0, href.length() - "/atomsvc".length()); @@ -230,17 +231,17 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t collection.addAccepts("application/json;type=entry"); List categories = feed.getCategories(); if ( categories != null ) { - collection.addCategories(categories, false, null); + collection.addCategories(categories, false, null); } else { collection.addCategories().setFixed(false); } } else { collection.setTitle("entries"); - // collection.addAccepts("application/atom+xml;type=feed"); - collection.addAccepts("application/atom+xml; type=entry"); + + collection.addAccepts("application/atom+xml;type=entry"); collection.addAccepts("application/json;type=entry"); - collection.addCategories().setFixed(false); + collection.addCategories().setFixed(false); } workspace.addCollection(collection); service.addWorkspace(workspace); @@ -258,8 +259,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t Feed feed = getFeed( request ); if (feed != null) { String feedETag = null; - if (feed.getId() != null) - feedETag = "\"" + feed.getId().toString() + "\""; + feedETag = HTTPUtils.calculateHashETag(feed.toString().getBytes("utf-8")); Date feedUpdated = feed.getUpdated(); // Test request for predicates. String predicate = request.getHeader( "If-Match" ); @@ -275,28 +275,28 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t return; } if ( feedUpdated != null ) { - predicate = request.getHeader( "If-Unmodified-Since" ); + predicate = request.getHeader( "If-Unmodified-Since" ); if ( predicate != null ) { try { - Date predicateDate = dateFormat.parse( predicate ); + Date predicateDate = dateFormat.parse( predicate ); if ( predicateDate.compareTo( exactSeconds(feedUpdated) ) < 0 ) { // Match, should short circuit response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED); return; - } + } } catch ( java.text.ParseException e ) { // Ignore and move on } } - predicate = request.getHeader( "If-Modified-Since" ); + predicate = request.getHeader( "If-Modified-Since" ); if ( predicate != null ) { try { - Date predicateDate = dateFormat.parse( predicate ); + Date predicateDate = dateFormat.parse( predicate ); if ( predicateDate.compareTo( exactSeconds(feedUpdated) ) >= 0 ) { // Match, should short circuit response.sendError(HttpServletResponse.SC_NOT_MODIFIED); return; - } + } } catch ( java.text.ParseException e ) { // Ignore and move on } @@ -311,9 +311,12 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t response.addHeader(LASTMODIFIED, dateFormat.format( feedUpdated )); } + //default http header for response + AtomBindingHttpUtils.prepareHTTPResponse(request, response); + // Content negotiation String acceptType = request.getHeader( "Accept" ); - String preferredType = getContentPreference( acceptType ); + String preferredType = getContentPreference( acceptType ); if (( preferredType != null ) && ((preferredType.indexOf( "json") > -1) || (preferredType.indexOf( "JSON") > -1 ))) { // JSON response body response.setContentType("application/json;type=feed"); @@ -325,7 +328,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t feed.writeTo(json, response.getWriter()); } catch (Exception e) { throw new ServletException(e); - } + } } else { // Write the Atom feed @@ -360,23 +363,22 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t } if (supportsFeedEntries) { - // The service implementation returns a feed entry + // The service implementation returns a feed entry feedEntry = responseMessage.getBody(); } else { // The service implementation only returns a data item, create an entry // from it - Entry entry = new Entry(id, responseMessage.getBody()); + Entry entry = new Entry(id, responseMessage.getBody()); feedEntry = feedEntry(entry, itemClassType, itemXMLType, mediator, abderaFactory); } // Write the Atom entry if (feedEntry != null) { String entryETag = null; - if (feedEntry.getId() != null) - entryETag = feedEntry.getId().toString(); + entryETag = HTTPUtils.calculateHashETag(feedEntry.toString().getBytes("utf-8")); Date entryUpdated = feedEntry.getUpdated(); if ( entryUpdated != null ) response.addHeader(LASTMODIFIED, dateFormat.format( entryUpdated )); - // TODO Check If-Modified-Since If-Unmodified-Since predicates against LASTMODIFIED. + // TODO Check If-Modified-Since If-Unmodified-Since predicates against LASTMODIFIED. // If true return 304 and null body. Link link = feedEntry.getSelfLink(); @@ -403,28 +405,28 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t return; } if ( entryUpdated != null ) { - predicate = request.getHeader( "If-Unmodified-Since" ); + predicate = request.getHeader( "If-Unmodified-Since" ); if ( predicate != null ) { try { - Date predicateDate = dateFormat.parse( predicate ); + Date predicateDate = dateFormat.parse( predicate ); if ( predicateDate.compareTo( entryUpdated ) < 0 ) { // Match, should short circuit response.sendError(HttpServletResponse.SC_NOT_MODIFIED); return; - } + } } catch ( java.text.ParseException e ) { // Ignore and move on } } - predicate = request.getHeader( "If-Modified-Since" ); + predicate = request.getHeader( "If-Modified-Since" ); if ( predicate != null ) { try { - Date predicateDate = dateFormat.parse( predicate ); + Date predicateDate = dateFormat.parse( predicate ); if ( predicateDate.compareTo( entryUpdated ) > 0 ) { // Match, should short circuit response.sendError(HttpServletResponse.SC_NOT_MODIFIED); return; - } + } } catch ( java.text.ParseException e ) { // Ignore and move on } @@ -439,9 +441,12 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t response.addHeader(LASTMODIFIED, dateFormat.format( entryUpdated )); } + //default http header for response + AtomBindingHttpUtils.prepareHTTPResponse(request, response); + // Content negotiation String acceptType = request.getHeader( "Accept" ); - String preferredType = getContentPreference( acceptType ); + String preferredType = getContentPreference( acceptType ); if (( preferredType != null ) && ((preferredType.indexOf( "json") > -1) || (preferredType.indexOf( "JSON") > -1 ))) { // JSON response body response.setContentType("application/json;type=entry"); @@ -452,9 +457,9 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t feedEntry.writeTo(json, response.getWriter()); } catch (Exception e) { throw new ServletException(e); - } + } } else { - // XML response body + // XML response body response.setContentType("application/atom+xml;type=entry"); try { feedEntry.writeTo(getWriter(response)); @@ -486,7 +491,7 @@ protected Feed getFeed( HttpServletRequest request ) throws ServletException { if (responseMessage.isFault()) { throw new ServletException((Throwable)responseMessage.getBody()); } - return (Feed)responseMessage.getBody(); + return (Feed)responseMessage.getBody(); } else { // The service implementation does not support feed entries, @@ -624,10 +629,11 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) // A new entry for non-media was created successfully. if (createdFeedEntry != null) { + // Set location of the created entry in the Location header IRI feedId = createdFeedEntry.getId(); if ( feedId != null ) { - response.addHeader(ETAG, "\"" + feedId.toString() + "\"" ); + response.addHeader(ETAG, "\"" + HTTPUtils.calculateHashETag(createdFeedEntry.toString().getBytes("utf-8")) + "\"" ); } Date entryUpdated = createdFeedEntry.getUpdated(); if ( entryUpdated != null ) { @@ -636,7 +642,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) Link link = createdFeedEntry.getSelfLink(); if (link != null) { response.addHeader(LOCATION, link.getHref().toString()); - } + } Link editLink = createdFeedEntry.getEditLink(); if (editLink != null) { response.addHeader(LOCATION, editLink.getHref().toString()); @@ -646,6 +652,9 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) response.addHeader(CONTENTLOCATION, editMediaLink.getHref().toString()); } + //default http header for response + AtomBindingHttpUtils.prepareHTTPResponse(request, response); + // Write the created Atom entry response.setStatus(HttpServletResponse.SC_CREATED); response.setContentType("application/atom+xml;type=entry"); @@ -788,20 +797,22 @@ protected void doDelete(HttpServletRequest request, HttpServletResponse response } } } - + /** * Process the authorization header - * + * * @param request * @return * @throws ServletException */ private String processAuthorizationHeader(HttpServletRequest request) throws ServletException { - // FIXME temporarily disabling this as it doesn't work with all browsers - if (true) + // FIXME temporarily disabling this as it doesn't work with all browsers + if (true) { return "admin"; + } + /* try { String authorization = request.getHeader("Authorization"); if (authorization != null) { @@ -827,12 +838,13 @@ private String processAuthorizationHeader(HttpServletRequest request) throws Ser } catch (Exception e) { throw new ServletException(e); } + */ return null; } /** * Authenticate a user. - * + * * @param user * @param password * @return @@ -844,7 +856,7 @@ private boolean authenticate(String user, String password) { /** * Reject an unauthorized request. - * + * * @param response */ private void unauthorized(HttpServletResponse response) throws IOException { @@ -859,11 +871,11 @@ private void unauthorized(HttpServletResponse response) throws IOException { */ private static String getContentPreference( String acceptType ) { if (( acceptType == null ) || ( acceptType.length() < 1 )) { - return "application/atom+xml"; + return "application/atom+xml"; } StringTokenizer st = new StringTokenizer( acceptType, "," ); if ( st.hasMoreTokens() ) { - return st.nextToken(); + return st.nextToken(); } return "application/atom+xml"; } @@ -874,7 +886,7 @@ private static String getContentPreference( String acceptType ) { * @param properties */ private static void addPropertiesToHeader( HttpServletResponse response, String properties ) { - if ( properties == null ) return; + if ( properties == null ) return; StringTokenizer props = new StringTokenizer( properties, ","); while( props.hasMoreTokens()) { String prop = props.nextToken(); @@ -886,7 +898,7 @@ private static void addPropertiesToHeader( HttpServletResponse response, String if ( keyVal.hasMoreTokens() ) val = keyVal.nextToken(); if (( key != null ) && ( val != null )) { - response.addHeader(key, val); + response.addHeader(key, val); } } } @@ -896,7 +908,7 @@ private static void addPropertiesToHeader( HttpServletResponse response, String * @param date with millisecond precision * @return date rounded down to nearest second */ - private Date exactSeconds(Date date) { + private static Date exactSeconds(Date date) { return new Date(date.getTime() / 1000 * 1000); } diff --git a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/utils/AtomBindingHttpUtils.java b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/utils/AtomBindingHttpUtils.java new file mode 100644 index 0000000000..684dc044d1 --- /dev/null +++ b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/utils/AtomBindingHttpUtils.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.binding.atom.utils; + +import java.util.Date; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.tuscany.sca.common.http.HTTPUtils; + +public class AtomBindingHttpUtils { + /** + * Utility method to set common http headers and other stuff in a + * default http response. Applications / Extensions can then override and + * tweak as they see fit. + * + * @param response + */ + public static void prepareHTTPResponse(HttpServletRequest request, HttpServletResponse response) { + + // common http default response values + HTTPUtils.prepareHTTPResponse(response); + + //set Cache-Control to no-cache to avoid intermediary + //proxy/reverse-proxy caches and always hit the server + //that would identify if the value was current or not + response.setHeader("Cache-Control", "no-cache"); + response.setHeader("Expires", new Date(0).toGMTString()); + + } + + private static boolean isIE(HttpServletRequest request) { + String userAgent = request.getHeader("user-agent"); + + return (userAgent.indexOf("MSIE") > -1); + } + +} diff --git a/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java b/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java index cbc2564bc4..6ab6216522 100644 --- a/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java +++ b/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPUtils.java @@ -23,6 +23,7 @@ import java.security.MessageDigest; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; /** * @@ -31,6 +32,17 @@ */ public class HTTPUtils { + /** + * Utility method to set common http headers and other stuff in a + * default http response. Applications / Extensions can then override and + * tweak as they see fit. + * + * @param response + */ + public static void prepareHTTPResponse(HttpServletResponse response) { + response.setDateHeader("Date", System.currentTimeMillis()); + } + /** * Calculate the relative request path taking in consideration if * the application is running in a embedded webContatiner or from From 277b0da86f377f2d3f3b119220247cf2d38fc6b8 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Tue, 4 Jan 2011 15:17:31 +0000 Subject: [PATCH 012/157] Update to support being run with mvn exec:java git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1055077 13f79535-47bb-0310-9956-ffa450edef68 --- samples/applications/store/pom.xml | 18 ++++++++++++++++++ .../src/test/java/store/StoreTestCase.java | 10 +++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/samples/applications/store/pom.xml b/samples/applications/store/pom.xml index 94778a4833..057df05a61 100644 --- a/samples/applications/store/pom.xml +++ b/samples/applications/store/pom.xml @@ -108,6 +108,24 @@ ${artifactId} + + + org.codehaus.mojo + exec-maven-plugin + 1.1.1 + + + + java + + + + + test + store.StoreTestCase + + + diff --git a/samples/applications/store/src/test/java/store/StoreTestCase.java b/samples/applications/store/src/test/java/store/StoreTestCase.java index 883aaa76f6..7fa866d1c6 100644 --- a/samples/applications/store/src/test/java/store/StoreTestCase.java +++ b/samples/applications/store/src/test/java/store/StoreTestCase.java @@ -52,6 +52,12 @@ public class StoreTestCase { private static Node nodeStore; + public static void main(String[] args) throws Exception { + setUp(); + testWaitForInput(); + tearDown(); + } + @BeforeClass public static void setUp() throws Exception { String storeLocation = ContributionLocationHelper.getContributionLocation("store.composite"); @@ -66,9 +72,7 @@ public static void tearDown() throws Exception { nodeStore.stop(); } - @Test - @Ignore - public void testWaitForInput() { + public static void testWaitForInput() { try { System.out.println("press enter to continue)"); System.in.read(); From 12e3ac9859254e8e55e4a976b9504a1e5696b979 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Fri, 7 Jan 2011 12:48:28 +0000 Subject: [PATCH 013/157] Fix to the processing of @Callback annotation on Field or Method, to enable Tuscany to comply with OASIS Java CAA testcase 10035, as described in TUSCANY-3813. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1056294 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/introspect/impl/ServiceProcessor.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java b/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java index 70a7d489cd..6ad2140304 100644 --- a/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java +++ b/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java @@ -37,6 +37,7 @@ import org.apache.tuscany.sca.implementation.java.IntrospectionException; import org.apache.tuscany.sca.implementation.java.JavaElementImpl; import org.apache.tuscany.sca.implementation.java.JavaImplementation; +import org.apache.tuscany.sca.implementation.java.JavaScopeImpl; import org.apache.tuscany.sca.implementation.java.introspect.BaseJavaClassVisitor; import org.apache.tuscany.sca.implementation.java.introspect.JavaIntrospectionHelper; import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; @@ -52,6 +53,9 @@ * the component type with corresponding {@link Service}s. Also processes * related {@link org.oasisopen.sca.annotation.Callback} annotations. * + * This Visitor MUST follow the ScopeProcessor in the sequence of visitors, since processing of + * the Callback annotations depends on knowing the Scope of the implementation + * * @version $Rev$ $Date$ */ public class ServiceProcessor extends BaseJavaClassVisitor { @@ -149,6 +153,9 @@ public void visitMethod(Method method, JavaImplementation type) throws Introspec if (annotation == null) { return; } + if( type.getJavaScope() == JavaScopeImpl.COMPOSITE ) { + throw new IllegalCallbackReferenceException("[JCA90057] @Callback on field or method cannot be used for a class with @Scope(COMPOSITE): " + type.getName() + "." + method.getName()); + } if (!(annotation.value() == null || annotation.value() == Void.class)) { throw new IllegalCallbackReferenceException("[JCA90046] @Callback on field of method must not have any parameters: " + type.getName() + "." + method.getName()); @@ -171,6 +178,9 @@ public void visitField(Field field, JavaImplementation type) throws Introspectio if (annotation == null) { return; } + if( type.getJavaScope() == JavaScopeImpl.COMPOSITE ) { + throw new IllegalCallbackReferenceException("[JCA90057] @Callback on field or method cannot be used for a class with @Scope(COMPOSITE): " + type.getName() + "." + field.getName()); + } if (!(annotation.value() == null || annotation.value() == Void.class)) { throw new IllegalCallbackReferenceException("[JCA90046] @Callback on field of method must not have any parameters: " + type.getName() + "." + field.getName()); } From 095c7a03b5aee3468d38d092cb0aaf2a66d2c1a6 Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Sat, 8 Jan 2011 20:18:48 +0000 Subject: [PATCH 014/157] Minor formatting git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1056788 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/common/http/HTTPCacheContext.java | 117 ++++++++++-------- 1 file changed, 68 insertions(+), 49 deletions(-) diff --git a/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPCacheContext.java b/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPCacheContext.java index 248ea6eeb8..08faf6a14b 100644 --- a/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPCacheContext.java +++ b/modules/common-http/src/main/java/org/apache/tuscany/sca/common/http/HTTPCacheContext.java @@ -6,15 +6,15 @@ * 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. + * under the License. */ package org.apache.tuscany.sca.common.http; @@ -26,7 +26,7 @@ /** * A class to store cache settings for Atom and HTTP requests and responses. - * + * * Predicates are statements that work in conjunction with * ETags and LastModified dates to determine if a precondition * or postcondition is satisfied. @@ -34,7 +34,7 @@ * http://tools.ietf.org/html/rfc2616 * Example predicates in HTTP include If-Match, If-None-Match, * If-Modified-Since, If-Unmodified-Since, If-Range. - * + * * @version $Rev$ $Date$ */ public class HTTPCacheContext { @@ -50,42 +50,7 @@ public class HTTPCacheContext { public boolean ifNoneMatch; public boolean ifRange; - /** - * Gets the cache context information (ETag, LastModified, predicates) from the Http request. - * @param request - * @return - */ - public static HTTPCacheContext createCacheContextFromRequest( HttpServletRequest request ) throws java.text.ParseException { - HTTPCacheContext context = new HTTPCacheContext(); - String eTag = request.getHeader( "If-Match" ); - if ( eTag != null ) { - context.setETag( eTag ); - context.setIfMatch( true ); - } - eTag = request.getHeader( "If-None-Match" ); - if ( eTag != null ) { - context.setETag( eTag ); - context.setIfNoneMatch( true ); - } - String lastModifiedString = request.getHeader( "If-Modified-Since" ); - if ( lastModifiedString != null ) { - context.setLastModified( lastModifiedString ); - context.setIfModifiedSince( true ); - } - lastModifiedString = request.getHeader( "If-Unmodified-Since" ); - if ( lastModifiedString != null ) { - context.setLastModified( lastModifiedString ); - context.setIfUnmodifiedSince( true ); - } - lastModifiedString = request.getHeader( "If-Range" ); - if ( lastModifiedString != null ) { - context.setLastModified( lastModifiedString ); - context.setIfRange( true ); - } - return context; - } - /** * Enabled is true whenever ETag, LastModified, or predicate is set. * @return the enabled @@ -93,14 +58,14 @@ public static HTTPCacheContext createCacheContextFromRequest( HttpServletRequest public boolean isEnabled() { return enabled; } - + /** * @param enabled the enabled to set */ public void setEnabled(boolean enabled) { this.enabled = enabled; } - + /** * An ETag is a unique ID for an item. It changes when * a field in the item or the update date changes. @@ -111,6 +76,7 @@ public void setEnabled(boolean enabled) { public String getETag() { return eTag; } + /** * @param tag the eTag to set */ @@ -118,8 +84,9 @@ public void setETag(String tag) { eTag = tag; enabled = true; } + /** - * The LastModified date is the time the item was last + * The LastModified date is the time the item was last * changed. See HTTP specification for how ETags work: * http://tools.ietf.org/html/rfc2616 * @return the lastModified @@ -127,8 +94,9 @@ public void setETag(String tag) { public String getLastModified() { return lastModified; } + /** - * The LastModified date is the time the item was last + * The LastModified date is the time the item was last * changed. See HTTP specification for how ETags work: * http://tools.ietf.org/html/rfc2616 * @return the lastModified @@ -136,6 +104,7 @@ public String getLastModified() { public Date getLastModifiedAsDate() { return lastModifiedDate; } + /** * @param lastModified the lastModified to set */ @@ -161,69 +130,119 @@ public void setLastModified(Date updated) { public boolean isIfModifiedSince() { return ifModifiedSince; } + /** * @param ifModifedSince the ifModifedSince to set */ public void setIfModifiedSince(boolean ifModifiedSince) { this.ifModifiedSince = ifModifiedSince; - if ( ifModifiedSince ) + if ( ifModifiedSince ) { enabled = true; + } } + /** * @return the ifUnModifiedSince */ public boolean isIfUnmodifiedSince() { return ifUnmodifiedSince; } + /** * @param ifUnModifiedSince the ifUnModifiedSince to set */ public void setIfUnmodifiedSince(boolean ifUnmodifiedSince) { this.ifUnmodifiedSince = ifUnmodifiedSince; - if ( ifUnmodifiedSince ) + if ( ifUnmodifiedSince ) { enabled = true; + } } + /** * @return the ifMatch */ public boolean isIfMatch() { return ifMatch; } + /** * @param ifMatch the ifMatch to set */ public void setIfMatch(boolean ifMatch) { this.ifMatch = ifMatch; - if ( ifMatch ) + if ( ifMatch ) { enabled = true; + } } + /** * @return the ifNoneMatch */ public boolean isIfNoneMatch() { return ifNoneMatch; } + /** * @param ifNoneMatch the ifNoneMatch to set */ public void setIfNoneMatch(boolean ifNoneMatch) { this.ifNoneMatch = ifNoneMatch; - if ( ifNoneMatch ) + if ( ifNoneMatch ) { enabled = true; + } } + /** * @return the ifRange */ public boolean isIfRange() { return ifRange; } + /** * @param ifRange the ifRange to set */ public void setIfRange(boolean ifRange) { this.ifRange = ifRange; - if ( ifRange ) + if ( ifRange ) { enabled = true; + } + } + + /** + * Gets the cache context information (ETag, LastModified, predicates) from the Http request. + * @param request + * @return + */ + public static HTTPCacheContext createCacheContextFromRequest( HttpServletRequest request ) throws java.text.ParseException { + HTTPCacheContext context = new HTTPCacheContext(); + + String eTag = request.getHeader( "If-Match" ); + if ( eTag != null ) { + context.setETag( eTag ); + context.setIfMatch( true ); + } + eTag = request.getHeader( "If-None-Match" ); + if ( eTag != null ) { + context.setETag( eTag ); + context.setIfNoneMatch( true ); + } + String lastModifiedString = request.getHeader( "If-Modified-Since" ); + if ( lastModifiedString != null ) { + context.setLastModified( lastModifiedString ); + context.setIfModifiedSince( true ); + } + lastModifiedString = request.getHeader( "If-Unmodified-Since" ); + if ( lastModifiedString != null ) { + context.setLastModified( lastModifiedString ); + context.setIfUnmodifiedSince( true ); + } + lastModifiedString = request.getHeader( "If-Range" ); + if ( lastModifiedString != null ) { + context.setLastModified( lastModifiedString ); + context.setIfRange( true ); + } + return context; } public String toString() { From dbce69d714dca38657740fb332654aad3ab5a7d2 Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Sat, 8 Jan 2011 20:18:56 +0000 Subject: [PATCH 015/157] TUSCANY-3814 - Fixing http headers to avoid hanging IE6 when consuming tuscany atom feeds git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1056789 13f79535-47bb-0310-9956-ffa450edef68 --- .../atom/provider/AtomBindingInvoker.java | 4 +- .../provider/AtomBindingListenerServlet.java | 25 +++---- .../atom/utils/AtomBindingHttpUtils.java | 4 +- .../binding/atom/ContentNegotiationTest.java | 28 +++---- .../atom/ProviderEntryEntityTagsTestCase.java | 60 +++++++-------- .../atom/ProviderFeedEntityTagsTestCase.java | 74 +++++++++---------- 6 files changed, 95 insertions(+), 100 deletions(-) diff --git a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingInvoker.java b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingInvoker.java index e569276b08..4af8c3ca14 100644 --- a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingInvoker.java +++ b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingInvoker.java @@ -206,7 +206,7 @@ public Message invoke(Message msg) { StringWriter writer = new StringWriter(); feedEntry.writeTo(writer); // postMethod.setHeader("Content-type", "application/atom+xml; charset=utf-8"); - TUSCANY-3734 - postMethod.setHeader("Content-type", "application/atom+xml;type=entry"); + postMethod.setHeader("Content-type", "application/atom+xml"); postMethod.setEntity(new StringEntity(writer.toString())); response = httpClient.execute(postMethod); @@ -305,7 +305,7 @@ public Message invoke(Message msg) { StringWriter writer = new StringWriter(); feedEntry.writeTo(writer); //putMethod.setHeader("Content-type", "application/atom+xml; charset=utf-8"); - TUSCANY-3734 - putMethod.setHeader("Content-type", "application/atom+xml;type=entry"); + putMethod.setHeader("Content-type", "application/atom+xml"); putMethod.setEntity(new StringEntity(writer.toString())); response = httpClient.execute(putMethod); diff --git a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java index e8f1edc44a..b5b8763f3c 100644 --- a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java +++ b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java @@ -169,9 +169,6 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t // System.out.println( "AtomBindingListener.doGet cache context=" + cacheContext ); // Get the request path - //int servletPathLength = request.getContextPath().length() + request.getServletPath().length(); - //String path = URLDecoder.decode(request.getRequestURI().substring(servletPathLength), "UTF-8"); - String path = URLDecoder.decode(HTTPUtils.getRequestPath(request), "UTF-8"); logger.fine("get " + request.getRequestURI()); @@ -185,7 +182,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t resource entries - application/atom+xml;type=entry + application/atom+xml @@ -225,10 +222,8 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t } else { collection.setTitle("entries"); } - collection.addAccepts("application/atom+xml;type=feed"); - collection.addAccepts("application/json;type=feed"); - collection.addAccepts("application/atom+xml;type=entry"); - collection.addAccepts("application/json;type=entry"); + collection.addAccepts("application/atom+xml"); + collection.addAccepts("application/json"); List categories = feed.getCategories(); if ( categories != null ) { collection.addCategories(categories, false, null); @@ -239,8 +234,8 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t } else { collection.setTitle("entries"); - collection.addAccepts("application/atom+xml;type=entry"); - collection.addAccepts("application/json;type=entry"); + collection.addAccepts("application/atom+xml"); + collection.addAccepts("application/json"); collection.addCategories().setFixed(false); } workspace.addCollection(collection); @@ -319,7 +314,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t String preferredType = getContentPreference( acceptType ); if (( preferredType != null ) && ((preferredType.indexOf( "json") > -1) || (preferredType.indexOf( "JSON") > -1 ))) { // JSON response body - response.setContentType("application/json;type=feed"); + response.setContentType("application/json"); try { Abdera abdera = new Abdera(); @@ -332,7 +327,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t } else { // Write the Atom feed - response.setContentType("application/atom+xml;type=feed"); + response.setContentType("application/atom+xml"); try { feed.getDocument().writeTo(response.getOutputStream()); } catch (IOException ioe) { @@ -449,7 +444,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t String preferredType = getContentPreference( acceptType ); if (( preferredType != null ) && ((preferredType.indexOf( "json") > -1) || (preferredType.indexOf( "JSON") > -1 ))) { // JSON response body - response.setContentType("application/json;type=entry"); + response.setContentType("application/json"); try { Abdera abdera = new Abdera(); WriterFactory wf = abdera.getWriterFactory(); @@ -460,7 +455,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t } } else { // XML response body - response.setContentType("application/atom+xml;type=entry"); + response.setContentType("application/atom+xml"); try { feedEntry.writeTo(getWriter(response)); } catch (IOException ioe) { @@ -657,7 +652,7 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) // Write the created Atom entry response.setStatus(HttpServletResponse.SC_CREATED); - response.setContentType("application/atom+xml;type=entry"); + response.setContentType("application/atom+xml"); try { createdFeedEntry.writeTo(getWriter(response)); } catch (ParseException pe) { diff --git a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/utils/AtomBindingHttpUtils.java b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/utils/AtomBindingHttpUtils.java index 684dc044d1..f6f914c71c 100644 --- a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/utils/AtomBindingHttpUtils.java +++ b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/utils/AtomBindingHttpUtils.java @@ -42,8 +42,8 @@ public static void prepareHTTPResponse(HttpServletRequest request, HttpServletRe //set Cache-Control to no-cache to avoid intermediary //proxy/reverse-proxy caches and always hit the server //that would identify if the value was current or not - response.setHeader("Cache-Control", "no-cache"); - response.setHeader("Expires", new Date(0).toGMTString()); + //response.setHeader("Cache-Control", "no-cache"); + //response.setHeader("Expires", new Date(0).toGMTString()); } diff --git a/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ContentNegotiationTest.java b/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ContentNegotiationTest.java index 0b999ae1c9..e9ebf046a6 100644 --- a/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ContentNegotiationTest.java +++ b/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ContentNegotiationTest.java @@ -6,15 +6,15 @@ * 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. + * under the License. */ package org.apache.tuscany.sca.binding.atom; @@ -49,7 +49,7 @@ * Tests use of content negotiation for Atom binding in Tuscany. * Uses the SCA provided Provider composite to act as a server. * Uses the Abdera provided Client to act as a client. - * + * * @version $Rev$ $Date$ */ public class ContentNegotiationTest { @@ -60,7 +60,7 @@ public class ContentNegotiationTest { protected static CustomerClient testService; protected static Abdera abdera; protected static AbderaClient client; - protected static Parser abderaParser; + protected static Parser abderaParser; protected static String lastId; @BeforeClass @@ -111,7 +111,7 @@ public void testPost() throws Exception { entry.setContentElement(content); RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml; type=entry"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); // AtomTestCaseUtils.printRequestHeaders( "Post request headers", " ", opts ); IRI colUri = new IRI(providerURI).resolve("customer"); @@ -144,7 +144,7 @@ public void testXMLEntryGet() throws Exception { Assert.assertEquals(200, res.getStatus()); String returnedContentType = res.getContentType().toString().trim(); // Assert.assertEquals(contentType, returnedContentType ); - res.release(); + res.release(); } @Test @@ -157,7 +157,7 @@ public void testJSONEntryGet() throws Exception { ClientResponse res = client.get(colUri.toString() + "/" + lastId, opts); try { Assert.assertEquals(200, res.getStatus()); - // Abdera 0.4 throws exception on getContentType with application/json. + // Abdera 0.4 throws exception on getContentType with application/json. // System.out.println( "ContentNegotiationTest.testJSONEntryGet contentType=" + res.getContentType()); String contentType = res.getHeader( "Content-Type"); Assert.assertTrue( -1 < contentType.indexOf( "application/json" )); @@ -173,12 +173,12 @@ public void testJSONEntryGet() throws Exception { // AtomTestCaseUtils.printResponseHeaders( "JSON Entry response headers:", " ", res ); // System.out.println( "ContentNegotiationTest.testJSONEntryGet JSON entry body=" + responseBody ); } finally { - res.release(); + res.release(); } } @Test - public void testXMLFeedGet() throws Exception { + public void testXMLFeedGet() throws Exception { //System.out.println(">>>ContentNegotiationTest.testXMLFeedGet"); RequestOptions opts = new RequestOptions(); opts.setHeader( "Accept", "application/atom+xml" ); @@ -207,10 +207,10 @@ public void testXMLFeedGet() throws Exception { } finally { res.release(); } - } + } @Test - public void testJSONFeedGet() throws Exception { + public void testJSONFeedGet() throws Exception { //System.out.println(">>>ContentNegotiationTest.testJSONFeedGet"); RequestOptions opts = new RequestOptions(); opts.setHeader( "Accept", "application/json" ); @@ -221,7 +221,7 @@ public void testJSONFeedGet() throws Exception { try { // Assert feed provided since no predicates Assert.assertEquals(200, res.getStatus()); - // Abdera 0.4 throws exception on getContentType with application/json. + // Abdera 0.4 throws exception on getContentType with application/json. // System.out.println( "ContentNegotiationTest.testJSONEntryGet contentType=" + res.getContentType()); String contentType = res.getHeader( "Content-Type"); Assert.assertTrue( -1 < contentType.indexOf( "application/json" )); @@ -243,7 +243,7 @@ public void testJSONFeedGet() throws Exception { } protected String readResponse( Reader responseReader ) { - if ( responseReader == null ) return ""; + if ( responseReader == null ) return ""; StringBuffer sb = new StringBuffer(1024); try { int charValue = 0; diff --git a/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderEntryEntityTagsTestCase.java b/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderEntryEntityTagsTestCase.java index 6dbb15f6b9..c39bee65f6 100644 --- a/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderEntryEntityTagsTestCase.java +++ b/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderEntryEntityTagsTestCase.java @@ -6,15 +6,15 @@ * 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. + * under the License. */ package org.apache.tuscany.sca.binding.atom; @@ -44,10 +44,10 @@ /** * Tests use of server provided entry entity tags for Atom binding in Tuscany. * Tests conditional gets (e.g. get if-none-match) or conditional posts (post if-match) - * using entity tags or last modified header entries. + * using entity tags or last modified header entries. * Uses the SCA provided Provider composite to act as a server. * Uses the Abdera provided Client to act as a client. - * + * * @version $Rev$ $Date$ */ public class ProviderEntryEntityTagsTestCase { @@ -58,7 +58,7 @@ public class ProviderEntryEntityTagsTestCase { protected static CustomerClient testService; protected static Abdera abdera; protected static AbderaClient client; - protected static Parser abderaParser; + protected static Parser abderaParser; protected static String eTag; protected static Date lastModified; protected static final SimpleDateFormat dateFormat = new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss Z" ); // RFC 822 date time @@ -94,10 +94,10 @@ public void testPrelim() throws Exception { public void testEmptyCachePost() throws Exception { // Pseudo-code // 1) Example HTTP POST request (new entry put, new etag response) - // User client post request + // User client post request // POST /myblog/entries HTTP/1.1 // Slug: First Post - // + // // // // Atom-Powered Robots Run Amok @@ -116,7 +116,7 @@ public void testEmptyCachePost() throws Exception { // Content-Location: http://example.org/edit/first-post.atom // ETag: "e180ee84f0671b1" // Last-Modified: Fri, 25 Jul 2008 14:36:44 -0500 - // + // // // // Atom-Powered Robots Run Amok @@ -124,7 +124,7 @@ public void testEmptyCachePost() throws Exception { // 2007-02-123T17:09:02Z // Captain Lansing // It's something moving... solid metal - // + // // Testing of entry creation Factory factory = abdera.getFactory(); @@ -143,7 +143,7 @@ public void testEmptyCachePost() throws Exception { entry.setContentElement(content); RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml; type=entry"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); // AtomTestCaseUtils.printRequestHeaders( "Post request headers", " ", opts ); IRI colUri = new IRI(providerURI).resolve("customer"); @@ -155,7 +155,7 @@ public void testEmptyCachePost() throws Exception { // Assert response header Location: http://example.org/edit/first-post.atom // Assert response header Content-Location: http://example.org/edit/first-post.atom // Assert response header ETag: "e180ee84f0671b1" - // Assert response header Last-Modified: Fri, 25 Jul 2008 14:36:44 -0500 + // Assert response header Last-Modified: Fri, 25 Jul 2008 14:36:44 -0500 // Assert collection size is 1. Assert.assertEquals(201, res.getStatus()); Assert.assertEquals(contentType, res.getContentType().toString().trim()); @@ -163,7 +163,7 @@ public void testEmptyCachePost() throws Exception { // Assert.assertEquals( "", res.getContentLocation().toString() ); // Save eTag for subsequent tests; eTag = res.getHeader( "ETag" ); - Assert.assertNotNull( eTag ); + Assert.assertNotNull( eTag ); lastModified = res.getLastModified(); Assert.assertNotNull(lastModified); } @@ -174,7 +174,7 @@ public void testDirtyCachePut() throws Exception { // User client PUT request // PUT /edit/first-post.atom HTTP/1.1 // > If-Match: "e180ee84f0671b1" - // + // // // // Atom-Powered Robots Run Amok @@ -200,7 +200,7 @@ public void testDirtyCachePut() throws Exception { entry.setContentElement(content); RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml; type=entry"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-None-Match", eTag); @@ -230,7 +230,7 @@ public void testETagMissGet() throws Exception { // > If-None-Match: "e180ee84f0671b1" RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml; type=entry"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-None-Match", "123456"); opts.setHeader( "Pragma", "no-cache"); // turn off client caching @@ -261,7 +261,7 @@ public void testETagMissGet() throws Exception { Assert.assertEquals(contentType, res.getContentType().toString().trim()); // Assert.assertNotNull( res.getLocation().toString() ); // Assert.assertEquals( "", res.getContentLocation().toString() ); - Assert.assertNotNull( res.getHeader( "ETag" ) ); + Assert.assertNotNull( res.getHeader( "ETag" ) ); lastModified = res.getLastModified(); Assert.assertNotNull(lastModified); res.release(); @@ -275,10 +275,10 @@ public void testETagHitGet() throws Exception { // > If-None-Match: "e180ee84f0671b1" RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml; type=entry"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-None-Match", eTag); - opts.setHeader( "Pragma", "no-cache"); // turn off client caching + opts.setHeader( "Pragma", "no-cache"); // turn off client caching IRI colUri = new IRI(providerURI).resolve("customer"); // res = client.post(colUri.toString() + "?test=foo", entry, opts); @@ -294,7 +294,7 @@ public void testETagHitGet() throws Exception { // Assert header ETag: "e180ee84f0671b1" // Assert header Last-Modified: Fri, 25 Jul 2008 14:36:44 -0500 // Assert.assertEquals(304, res.getStatus()); - res.release(); + res.release(); } @@ -305,7 +305,7 @@ public void testUpToDateGet() throws Exception { // GET /edit/first-post.atom HTTP/1.1 // > If-Modified-Since: Sat, 29 Oct 2025 19:43:31 GMT RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml; type=entry"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-Modified-Since", "Sat, 29 Oct 2025 19:43:31 GMT"); // "EEE, dd MMM yyyy HH:mm:ss Z // RFC 822 Date opts.setHeader( "Pragma", "no-cache"); // turn off client caching @@ -325,7 +325,7 @@ public void testUpToDateGet() throws Exception { // Assert response status code is 304 Not Modified. Assert.assertEquals(304, res.getStatus()); - res.release(); + res.release(); } @Test @@ -335,7 +335,7 @@ public void testOutOfDateGet() throws Exception { // GET /edit/first-post.atom HTTP/1.1 // > If-Modified-Since: Sat, 29 Oct 1844 19:43:31 GMT RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml; type=entry"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-Modified-Since", "Sat, 29 Oct 1844 19:43:31 GMT"); // "EEE, dd MMM yyyy HH:mm:ss Z // RFC 822 Date opts.setHeader( "Pragma", "no-cache"); // turn off client caching @@ -355,12 +355,12 @@ public void testOutOfDateGet() throws Exception { // Assert response status code is 200 OK. // Assert header ETag: "e180ee84f0671b1" - // Assert header Last-Modified: Greater than If-Mod + // Assert header Last-Modified: Greater than If-Mod Assert.assertEquals(200, res.getStatus()); Assert.assertEquals(contentType, res.getContentType().toString().trim()); // Assert.assertNotNull( res.getLocation().toString() ); // Assert.assertEquals( "", res.getContentLocation().toString() ); - Assert.assertNotNull( res.getHeader( "ETag" ) ); + Assert.assertNotNull( res.getHeader( "ETag" ) ); lastModified = res.getLastModified(); Assert.assertNotNull(lastModified); res.release(); @@ -373,7 +373,7 @@ public void testUpToDateUnModGet() throws Exception { // GET /edit/first-post.atom HTTP/1.1 // > If-Unmodified-Since: Sat, 29 Oct 2025 19:43:31 GMT RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml; type=entry"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-Unmodified-Since", "Sat, 29 Oct 2050 19:43:31 GMT" ); opts.setHeader( "Pragma", "no-cache"); // turn off client caching @@ -396,9 +396,9 @@ public void testUpToDateUnModGet() throws Exception { // Assert header Location: http://example.org/edit/first-post.atom // Assert header Content-Location: http://example.org/edit/first-post.atom // Assert header ETag: "e180ee84f0671b1" - // Assert header Last-Modified: Less than If-Unmod + // Assert header Last-Modified: Less than If-Unmod Assert.assertEquals(200, res.getStatus()); - res.release(); + res.release(); } @Test @@ -409,7 +409,7 @@ public void testOutOfDateUnModGet() throws Exception { // Host: example.org // > If-Unmodified-Since: Sat, 29 Oct 1844 19:43:31 GMT RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml; type=entry"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-Unmodified-Since", "Sat, 29 Oct 1844 19:43:31 GMT" ); opts.setHeader( "Pragma", "no-cache"); // turn off client caching @@ -427,6 +427,6 @@ public void testOutOfDateUnModGet() throws Exception { // Assert response status code is 304 Not Modified. Assert.assertEquals(304, res.getStatus()); - res.release(); + res.release(); } } diff --git a/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java b/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java index ddec9d4034..ad5a179562 100644 --- a/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java +++ b/modules/binding-atom-runtime/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java @@ -6,15 +6,15 @@ * 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. + * under the License. */ package org.apache.tuscany.sca.binding.atom; @@ -50,10 +50,10 @@ /** * Tests use of server provided feed entity tags for Atom binding in Tuscany. * Tests conditional gets (e.g. get if-none-match) or conditional posts (post if-match) - * using entity tags and last modified entries in headers. + * using entity tags and last modified entries in headers. * Uses the SCA provided Provider composite to act as a server. * Uses the Abdera provided Client to act as a client. - * + * * @version $Rev$ $Date$ */ public class ProviderFeedEntityTagsTestCase { @@ -64,7 +64,7 @@ public class ProviderFeedEntityTagsTestCase { protected static CustomerClient testService; protected static Abdera abdera; protected static AbderaClient client; - protected static Parser abderaParser; + protected static Parser abderaParser; protected static String eTag; protected static Date lastModified; protected static final SimpleDateFormat dateFormat = new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss Z" ); // RFC 822 date time @@ -97,7 +97,7 @@ public void testPrelim() throws Exception { } @Test - public void testFeedBasics() throws Exception { + public void testFeedBasics() throws Exception { // System.out.println(">>>ProviderFeedEntityTagsTestCase.testFeedBasics"); // Normal feed request ClientResponse res = client.get(providerURI); @@ -126,14 +126,14 @@ public void testFeedBasics() throws Exception { } finally { res.release(); } - } + } @Test - public void testUnmodifiedGetIfMatch() throws Exception { + public void testUnmodifiedGetIfMatch() throws Exception { //System.out.println(">>>ProviderFeedEntityTagsTestCase.testFeedUnmodifiedGetIfMatch"); // Feed request with predicates RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-Match", eTag); @@ -154,14 +154,14 @@ public void testUnmodifiedGetIfMatch() throws Exception { } finally { res.release(); } - } + } @Test - public void testUnmodifiedGetIfNoneMatch() throws Exception { + public void testUnmodifiedGetIfNoneMatch() throws Exception { //System.out.println(">>>ProviderFeedEntityTagsTestCase.testFeedUnmodifiedGetIfNoneMatch"); // Feed request with predicates RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-None-Match", eTag); @@ -173,14 +173,14 @@ public void testUnmodifiedGetIfNoneMatch() throws Exception { } finally { res.release(); } - } + } @Test - public void testUnmodifiedGetIfUnModified() throws Exception { + public void testUnmodifiedGetIfUnModified() throws Exception { //System.out.println(">>>ProviderFeedEntityTagsTestCase.testFeedUnmodifiedGetIfUnModified"); // Feed request with predicates RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-Unmodified-Since", dateFormat.format( new Date() )); @@ -193,14 +193,14 @@ public void testUnmodifiedGetIfUnModified() throws Exception { } finally { res.release(); } - } + } @Test - public void testUnmodifiedGetIfModified() throws Exception { + public void testUnmodifiedGetIfModified() throws Exception { //System.out.println(">>>ProviderFeedEntityTagsTestCase.testFeedUnmodifiedGetIfModified"); // Feed request with predicates RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-Modified-Since", dateFormat.format( new Date( 0 ) )); @@ -214,14 +214,14 @@ public void testUnmodifiedGetIfModified() throws Exception { String thisETag = res.getHeader("ETag"); Assert.assertNotNull( thisETag ); Date thisLastModified = res.getLastModified(); - Assert.assertNotNull( thisLastModified ); + Assert.assertNotNull( thisLastModified ); } finally { res.release(); } - } + } @Test - public void testModifiedGetIfNoneMatch() throws Exception { + public void testModifiedGetIfNoneMatch() throws Exception { //System.out.println(">>>ProviderFeedEntityTagsTestCase.testFeedModifiedGetIfNoneMatch"); // Post some new content to the feed. Factory factory = abdera.getFactory(); @@ -236,14 +236,14 @@ public void testModifiedGetIfNoneMatch() throws Exception { entry.setContentElement(content); RequestOptions opts = new RequestOptions(); - String contentType = "application/atom+xml; type=entry"; + String contentType = "application/atom+xml"; opts.setContentType(contentType); IRI colUri = new IRI(providerURI).resolve("customer"); ClientResponse res = client.post(colUri.toString(), entry, opts); // Feed request with predicates opts = new RequestOptions(); - contentType = "application/atom+xml"; + contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-None-Match", eTag); @@ -258,14 +258,14 @@ public void testModifiedGetIfNoneMatch() throws Exception { } finally { res.release(); } - } + } @Test - public void testModifiedGetIfMatch() throws Exception { + public void testModifiedGetIfMatch() throws Exception { //System.out.println(">>>ProviderFeedEntityTagsTestCase.testFeedModifiedGetIfMatch"); // Feed request with predicates RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-Match", eTag); @@ -287,36 +287,36 @@ public void testModifiedGetIfMatch() throws Exception { } finally { res.release(); } - } + } @Test - public void testModifiedGetIfUnModified() throws Exception { + public void testModifiedGetIfUnModified() throws Exception { //System.out.println(">>>ProviderFeedEntityTagsTestCase.testFeedModifiedGetIfUnModified"); // Feed request with predicates RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-Unmodified-Since", dateFormat.format( previousSecond(lastModified) )); ClientResponse res = client.get(providerURI, opts); Assert.assertNotNull(res); try { - // Should return 412 - Feed not provided since feed is modified since. + // Should return 412 - Feed not provided since feed is modified since. Assert.assertEquals(412, res.getStatus()); } finally { res.release(); } - } + } @Test - public void testModifiedGetIfModified() throws Exception { + public void testModifiedGetIfModified() throws Exception { //System.out.println(">>>ProviderFeedEntityTagsTestCase.testFeedModifiedGetIfModified"); // Feed request with predicates RequestOptions opts = new RequestOptions(); - final String contentType = "application/atom+xml"; + final String contentType = "application/atom+xml"; opts.setContentType(contentType); opts.setHeader( "If-Modified-Since", dateFormat.format( new Date() )); - + ClientResponse res = client.get(providerURI, opts); Assert.assertNotNull(res); try { @@ -341,11 +341,11 @@ public void testModifiedGetIfModified() throws Exception { String thisETag = res.getHeader("ETag"); Assert.assertNotNull( thisETag ); Date thisLastModified = res.getLastModified(); - Assert.assertNotNull( thisLastModified ); + Assert.assertNotNull( thisLastModified ); } finally { res.release(); } - } + } public static void printFeed( String title, String indent, Feed feed ) { From afed2b4cff6387d94758d8401a82f1bec6c569bd Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Sat, 8 Jan 2011 20:19:03 +0000 Subject: [PATCH 016/157] TUSCANY-3812 - Fixing feed id to avoid generating different md5 hash which is breaking caching git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1056790 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/binding/atom/provider/AtomBindingListenerServlet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java index b5b8763f3c..861ff5d182 100644 --- a/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java +++ b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java @@ -520,7 +520,7 @@ protected Feed getFeed( HttpServletRequest request ) throws ServletException { } // All feeds must provide Id and updated elements. // However, some do not, so provide some program protection. - feed.setId( "Feed" + feed.hashCode()); + feed.setId(request.getRequestURI()); Date responseLastModified = new Date( 0 ); // Add entries to the feed From c21ec5a45305735e8e0e59ef97c8aad1bbf8bd5d Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Mon, 10 Jan 2011 08:34:54 +0000 Subject: [PATCH 017/157] Bump up copyright year in the NOTICE files git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057117 13f79535-47bb-0310-9956-ffa450edef68 --- NOTICE | 2 +- .../src/main/resources/NOTICE | 2 +- .../src/main/resources/NOTICE | 2 +- .../src/main/resources/NOTICE | 2 +- .../src/main/resources/NOTICE | 2 +- distribution/all/src/main/release/bin/NOTICE | 2 +- distribution/tomcat/tomcat-hook/NOTICE | 2 +- .../tomcat/tomcat-war/src/main/webapp/NOTICE | 2 +- maven/maven-tuscany-plugin/NOTICE | 2 +- modules/assembly-xml/NOTICE | 2 +- modules/assembly-xsd/NOTICE | 2 +- modules/assembly/NOTICE | 2 +- .../src/main/resources/NOTICE | 2 +- .../base-runtime/src/main/resources/NOTICE | 2 +- modules/binding-atom-js-dojo/NOTICE | 2 +- modules/binding-comet-runtime/NOTICE | 2 +- modules/binding-comet/NOTICE | 2 +- modules/binding-corba-runtime/NOTICE | 2 +- modules/binding-corba/NOTICE | 2 +- modules/binding-ejb-runtime/NOTICE | 12 ++++----- modules/binding-ejb/NOTICE | 2 +- modules/binding-jsonp-runtime/NOTICE | 2 +- modules/binding-jsonp/NOTICE | 2 +- modules/binding-jsonrpc-js-dojo/NOTICE | 2 +- modules/binding-local-runtime/NOTICE | 2 +- modules/binding-rest-js-dojo/NOTICE | 2 +- modules/binding-rmi-runtime/NOTICE | 2 +- modules/binding-rmi/NOTICE | 2 +- modules/binding-sca-runtime/NOTICE | 2 +- modules/binding-sca-runtime2/NOTICE | 2 +- modules/binding-ws-runtime-axis2/NOTICE | 2 +- modules/binding-ws-runtime-jaxws-ri/NOTICE | 2 +- modules/binding-ws-runtime-jaxws/NOTICE | 2 +- modules/binding-ws-wsdlgen/NOTICE | 12 ++++----- modules/binding-ws/NOTICE | 2 +- modules/contribution-osgi/NOTICE | 12 ++++----- modules/contribution/NOTICE | 2 +- modules/core-databinding/NOTICE | 2 +- .../src/main/resources/NOTICE | 2 +- modules/core-spi/NOTICE | 2 +- modules/core/NOTICE | 2 +- modules/data-api/NOTICE | 2 +- modules/databinding-axiom/NOTICE | 2 +- modules/databinding-jaxb-axiom/NOTICE | 2 +- modules/databinding-jaxb/NOTICE | 2 +- modules/databinding-sdo-axiom/NOTICE | 12 ++++----- modules/databinding-sdo/NOTICE | 2 +- modules/databinding/NOTICE | 2 +- modules/deployment/NOTICE | 2 +- modules/domain-node/NOTICE | 2 +- modules/extensibility-equinox/NOTICE | 2 +- modules/extensibility/NOTICE | 2 +- modules/host-corba-jee/NOTICE | 2 +- modules/host-corba-jse-tns/NOTICE | 2 +- modules/host-corba-jse/NOTICE | 2 +- modules/host-corba/NOTICE | 2 +- modules/host-http/NOTICE | 2 +- modules/host-jetty/NOTICE | 2 +- modules/host-rmi/NOTICE | 2 +- modules/host-webapp/NOTICE | 2 +- modules/implementation-java-runtime/NOTICE | 2 +- modules/implementation-java/NOTICE | 2 +- modules/implementation-jaxrs-runtime/NOTICE | 2 +- modules/implementation-osgi-runtime/NOTICE | 2 +- modules/implementation-osgi/NOTICE | 2 +- modules/implementation-python-runtime/NOTICE | 26 +++++++++---------- modules/implementation-python/NOTICE | 2 +- modules/implementation-script-runtime/NOTICE | 24 ++++++++--------- modules/implementation-script/NOTICE | 2 +- modules/implementation-web-client/NOTICE | 2 +- modules/implementation-web-runtime/NOTICE | 2 +- .../implementation-widget-runtime-dojo/NOTICE | 2 +- modules/implementation-widget-runtime/NOTICE | 12 ++++----- modules/implementation-widget/NOTICE | 2 +- modules/interface-java-jaxrs/NOTICE | 2 +- modules/interface-java-jaxws/NOTICE | 12 ++++----- modules/interface-java/NOTICE | 2 +- modules/interface-wsdl/NOTICE | 2 +- modules/launcher/NOTICE | 2 +- modules/monitor/NOTICE | 2 +- modules/node-api/NOTICE | 2 +- modules/node-impl-osgi/NOTICE | 2 +- modules/node-impl/NOTICE | 2 +- modules/node-launcher-equinox/NOTICE | 2 +- modules/node-launcher/NOTICE | 2 +- .../src/main/resources/NOTICE | 2 +- modules/policy-logging/NOTICE | 2 +- modules/policy-security/NOTICE | 2 +- modules/policy-transaction/NOTICE | 2 +- modules/policy-wspolicy/NOTICE | 2 +- modules/sca-api/NOTICE | 2 +- modules/sca-client-impl/NOTICE | 2 +- modules/web-javascript-dojo/NOTICE | 2 +- modules/web-javascript/NOTICE | 2 +- modules/xsd/NOTICE | 2 +- .../NOTICE | 2 +- .../dosgi-dynamic-calculator/NOTICE | 2 +- .../dosgi-calculator-operations/NOTICE | 2 +- .../dosgi-calculator/NOTICE | 2 +- unreleased/modules/binding-rss-runtime/NOTICE | 2 +- unreleased/modules/binding-rss/NOTICE | 2 +- 101 files changed, 154 insertions(+), 154 deletions(-) diff --git a/NOTICE b/NOTICE index 65bf34a9ba..5ccf2bdc94 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Apache Tuscany -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/distribution/aggregations/base-runtime-aggregation/src/main/resources/NOTICE b/distribution/aggregations/base-runtime-aggregation/src/main/resources/NOTICE index 1bfb4e16c3..85c82bd9ce 100644 --- a/distribution/aggregations/base-runtime-aggregation/src/main/resources/NOTICE +++ b/distribution/aggregations/base-runtime-aggregation/src/main/resources/NOTICE @@ -1,5 +1,5 @@ Apache Tuscany Base Jar -Copyright (c) 2010 The Apache Software Foundation +Copyright (c) 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/distribution/aggregations/base-runtime-nodep/src/main/resources/NOTICE b/distribution/aggregations/base-runtime-nodep/src/main/resources/NOTICE index 1bfb4e16c3..85c82bd9ce 100644 --- a/distribution/aggregations/base-runtime-nodep/src/main/resources/NOTICE +++ b/distribution/aggregations/base-runtime-nodep/src/main/resources/NOTICE @@ -1,5 +1,5 @@ Apache Tuscany Base Jar -Copyright (c) 2010 The Apache Software Foundation +Copyright (c) 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/distribution/aggregations/binding-rmi-runtime-aggregation/src/main/resources/NOTICE b/distribution/aggregations/binding-rmi-runtime-aggregation/src/main/resources/NOTICE index 1bfb4e16c3..85c82bd9ce 100644 --- a/distribution/aggregations/binding-rmi-runtime-aggregation/src/main/resources/NOTICE +++ b/distribution/aggregations/binding-rmi-runtime-aggregation/src/main/resources/NOTICE @@ -1,5 +1,5 @@ Apache Tuscany Base Jar -Copyright (c) 2010 The Apache Software Foundation +Copyright (c) 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/distribution/aggregations/binding-ws-runtime-axis2-aggregation/src/main/resources/NOTICE b/distribution/aggregations/binding-ws-runtime-axis2-aggregation/src/main/resources/NOTICE index 1bfb4e16c3..85c82bd9ce 100644 --- a/distribution/aggregations/binding-ws-runtime-axis2-aggregation/src/main/resources/NOTICE +++ b/distribution/aggregations/binding-ws-runtime-axis2-aggregation/src/main/resources/NOTICE @@ -1,5 +1,5 @@ Apache Tuscany Base Jar -Copyright (c) 2010 The Apache Software Foundation +Copyright (c) 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/distribution/all/src/main/release/bin/NOTICE b/distribution/all/src/main/release/bin/NOTICE index 65bf34a9ba..5ccf2bdc94 100644 --- a/distribution/all/src/main/release/bin/NOTICE +++ b/distribution/all/src/main/release/bin/NOTICE @@ -1,5 +1,5 @@ Apache Tuscany -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/distribution/tomcat/tomcat-hook/NOTICE b/distribution/tomcat/tomcat-hook/NOTICE index 0d2bd8fb3e..798a5569c9 100644 --- a/distribution/tomcat/tomcat-hook/NOTICE +++ b/distribution/tomcat/tomcat-hook/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/distribution/tomcat/tomcat-war/src/main/webapp/NOTICE b/distribution/tomcat/tomcat-war/src/main/webapp/NOTICE index cdc221ee60..62e8bed22e 100644 --- a/distribution/tomcat/tomcat-war/src/main/webapp/NOTICE +++ b/distribution/tomcat/tomcat-war/src/main/webapp/NOTICE @@ -1,5 +1,5 @@ Apache Tuscany -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/maven/maven-tuscany-plugin/NOTICE b/maven/maven-tuscany-plugin/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/maven/maven-tuscany-plugin/NOTICE +++ b/maven/maven-tuscany-plugin/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/assembly-xml/NOTICE b/modules/assembly-xml/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/assembly-xml/NOTICE +++ b/modules/assembly-xml/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/assembly-xsd/NOTICE b/modules/assembly-xsd/NOTICE index c5118ba0fd..8d5d0a4770 100644 --- a/modules/assembly-xsd/NOTICE +++ b/modules/assembly-xsd/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/assembly/NOTICE b/modules/assembly/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/assembly/NOTICE +++ b/modules/assembly/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/base-runtime-pom/src/main/resources/NOTICE b/modules/base-runtime-pom/src/main/resources/NOTICE index 1bfb4e16c3..85c82bd9ce 100644 --- a/modules/base-runtime-pom/src/main/resources/NOTICE +++ b/modules/base-runtime-pom/src/main/resources/NOTICE @@ -1,5 +1,5 @@ Apache Tuscany Base Jar -Copyright (c) 2010 The Apache Software Foundation +Copyright (c) 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/base-runtime/src/main/resources/NOTICE b/modules/base-runtime/src/main/resources/NOTICE index 1bfb4e16c3..85c82bd9ce 100644 --- a/modules/base-runtime/src/main/resources/NOTICE +++ b/modules/base-runtime/src/main/resources/NOTICE @@ -1,5 +1,5 @@ Apache Tuscany Base Jar -Copyright (c) 2010 The Apache Software Foundation +Copyright (c) 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-atom-js-dojo/NOTICE b/modules/binding-atom-js-dojo/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/binding-atom-js-dojo/NOTICE +++ b/modules/binding-atom-js-dojo/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-comet-runtime/NOTICE b/modules/binding-comet-runtime/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/binding-comet-runtime/NOTICE +++ b/modules/binding-comet-runtime/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-comet/NOTICE b/modules/binding-comet/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/binding-comet/NOTICE +++ b/modules/binding-comet/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-corba-runtime/NOTICE b/modules/binding-corba-runtime/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/binding-corba-runtime/NOTICE +++ b/modules/binding-corba-runtime/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-corba/NOTICE b/modules/binding-corba/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/binding-corba/NOTICE +++ b/modules/binding-corba/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-ejb-runtime/NOTICE b/modules/binding-ejb-runtime/NOTICE index ad2ba40961..f6ce2542c3 100644 --- a/modules/binding-ejb-runtime/NOTICE +++ b/modules/binding-ejb-runtime/NOTICE @@ -1,6 +1,6 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - +${pom.name} +Copyright (c) 2005 - 2011 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/modules/binding-ejb/NOTICE b/modules/binding-ejb/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/binding-ejb/NOTICE +++ b/modules/binding-ejb/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-jsonp-runtime/NOTICE b/modules/binding-jsonp-runtime/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/binding-jsonp-runtime/NOTICE +++ b/modules/binding-jsonp-runtime/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-jsonp/NOTICE b/modules/binding-jsonp/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/binding-jsonp/NOTICE +++ b/modules/binding-jsonp/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-jsonrpc-js-dojo/NOTICE b/modules/binding-jsonrpc-js-dojo/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/binding-jsonrpc-js-dojo/NOTICE +++ b/modules/binding-jsonrpc-js-dojo/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-local-runtime/NOTICE b/modules/binding-local-runtime/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/binding-local-runtime/NOTICE +++ b/modules/binding-local-runtime/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-rest-js-dojo/NOTICE b/modules/binding-rest-js-dojo/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/binding-rest-js-dojo/NOTICE +++ b/modules/binding-rest-js-dojo/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-rmi-runtime/NOTICE b/modules/binding-rmi-runtime/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/binding-rmi-runtime/NOTICE +++ b/modules/binding-rmi-runtime/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-rmi/NOTICE b/modules/binding-rmi/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/binding-rmi/NOTICE +++ b/modules/binding-rmi/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-sca-runtime/NOTICE b/modules/binding-sca-runtime/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/binding-sca-runtime/NOTICE +++ b/modules/binding-sca-runtime/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-sca-runtime2/NOTICE b/modules/binding-sca-runtime2/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/binding-sca-runtime2/NOTICE +++ b/modules/binding-sca-runtime2/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-ws-runtime-axis2/NOTICE b/modules/binding-ws-runtime-axis2/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/binding-ws-runtime-axis2/NOTICE +++ b/modules/binding-ws-runtime-axis2/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-ws-runtime-jaxws-ri/NOTICE b/modules/binding-ws-runtime-jaxws-ri/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/binding-ws-runtime-jaxws-ri/NOTICE +++ b/modules/binding-ws-runtime-jaxws-ri/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-ws-runtime-jaxws/NOTICE b/modules/binding-ws-runtime-jaxws/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/binding-ws-runtime-jaxws/NOTICE +++ b/modules/binding-ws-runtime-jaxws/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/binding-ws-wsdlgen/NOTICE b/modules/binding-ws-wsdlgen/NOTICE index ad2ba40961..f6ce2542c3 100644 --- a/modules/binding-ws-wsdlgen/NOTICE +++ b/modules/binding-ws-wsdlgen/NOTICE @@ -1,6 +1,6 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - +${pom.name} +Copyright (c) 2005 - 2011 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/modules/binding-ws/NOTICE b/modules/binding-ws/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/binding-ws/NOTICE +++ b/modules/binding-ws/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/contribution-osgi/NOTICE b/modules/contribution-osgi/NOTICE index 9ddba06a32..d69e595698 100644 --- a/modules/contribution-osgi/NOTICE +++ b/modules/contribution-osgi/NOTICE @@ -1,6 +1,6 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - +${pom.name} +Copyright (c) 2005 - 2011 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/modules/contribution/NOTICE b/modules/contribution/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/contribution/NOTICE +++ b/modules/contribution/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/core-databinding/NOTICE b/modules/core-databinding/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/core-databinding/NOTICE +++ b/modules/core-databinding/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/core-runtime-pom/src/main/resources/NOTICE b/modules/core-runtime-pom/src/main/resources/NOTICE index 1bfb4e16c3..85c82bd9ce 100644 --- a/modules/core-runtime-pom/src/main/resources/NOTICE +++ b/modules/core-runtime-pom/src/main/resources/NOTICE @@ -1,5 +1,5 @@ Apache Tuscany Base Jar -Copyright (c) 2010 The Apache Software Foundation +Copyright (c) 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/core-spi/NOTICE b/modules/core-spi/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/core-spi/NOTICE +++ b/modules/core-spi/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/core/NOTICE b/modules/core/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/core/NOTICE +++ b/modules/core/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/data-api/NOTICE b/modules/data-api/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/data-api/NOTICE +++ b/modules/data-api/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/databinding-axiom/NOTICE b/modules/databinding-axiom/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/databinding-axiom/NOTICE +++ b/modules/databinding-axiom/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/databinding-jaxb-axiom/NOTICE b/modules/databinding-jaxb-axiom/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/databinding-jaxb-axiom/NOTICE +++ b/modules/databinding-jaxb-axiom/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/databinding-jaxb/NOTICE b/modules/databinding-jaxb/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/databinding-jaxb/NOTICE +++ b/modules/databinding-jaxb/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/databinding-sdo-axiom/NOTICE b/modules/databinding-sdo-axiom/NOTICE index ad2ba40961..f6ce2542c3 100644 --- a/modules/databinding-sdo-axiom/NOTICE +++ b/modules/databinding-sdo-axiom/NOTICE @@ -1,6 +1,6 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - +${pom.name} +Copyright (c) 2005 - 2011 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/modules/databinding-sdo/NOTICE b/modules/databinding-sdo/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/databinding-sdo/NOTICE +++ b/modules/databinding-sdo/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/databinding/NOTICE b/modules/databinding/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/databinding/NOTICE +++ b/modules/databinding/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/deployment/NOTICE b/modules/deployment/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/deployment/NOTICE +++ b/modules/deployment/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/domain-node/NOTICE b/modules/domain-node/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/domain-node/NOTICE +++ b/modules/domain-node/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/extensibility-equinox/NOTICE b/modules/extensibility-equinox/NOTICE index a67cd7c175..b31bdacc32 100644 --- a/modules/extensibility-equinox/NOTICE +++ b/modules/extensibility-equinox/NOTICE @@ -1,4 +1,4 @@ -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/extensibility/NOTICE b/modules/extensibility/NOTICE index 1fda3f942e..36110a553e 100644 --- a/modules/extensibility/NOTICE +++ b/modules/extensibility/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/host-corba-jee/NOTICE b/modules/host-corba-jee/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/host-corba-jee/NOTICE +++ b/modules/host-corba-jee/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/host-corba-jse-tns/NOTICE b/modules/host-corba-jse-tns/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/host-corba-jse-tns/NOTICE +++ b/modules/host-corba-jse-tns/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/host-corba-jse/NOTICE b/modules/host-corba-jse/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/host-corba-jse/NOTICE +++ b/modules/host-corba-jse/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/host-corba/NOTICE b/modules/host-corba/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/host-corba/NOTICE +++ b/modules/host-corba/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/host-http/NOTICE b/modules/host-http/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/host-http/NOTICE +++ b/modules/host-http/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/host-jetty/NOTICE b/modules/host-jetty/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/host-jetty/NOTICE +++ b/modules/host-jetty/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/host-rmi/NOTICE b/modules/host-rmi/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/host-rmi/NOTICE +++ b/modules/host-rmi/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/host-webapp/NOTICE b/modules/host-webapp/NOTICE index 84e148eeef..b3958d09ee 100644 --- a/modules/host-webapp/NOTICE +++ b/modules/host-webapp/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/implementation-java-runtime/NOTICE b/modules/implementation-java-runtime/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/implementation-java-runtime/NOTICE +++ b/modules/implementation-java-runtime/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/implementation-java/NOTICE b/modules/implementation-java/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/implementation-java/NOTICE +++ b/modules/implementation-java/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/implementation-jaxrs-runtime/NOTICE b/modules/implementation-jaxrs-runtime/NOTICE index 5dba7efd2c..75259a6082 100644 --- a/modules/implementation-jaxrs-runtime/NOTICE +++ b/modules/implementation-jaxrs-runtime/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/implementation-osgi-runtime/NOTICE b/modules/implementation-osgi-runtime/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/implementation-osgi-runtime/NOTICE +++ b/modules/implementation-osgi-runtime/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/implementation-osgi/NOTICE b/modules/implementation-osgi/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/implementation-osgi/NOTICE +++ b/modules/implementation-osgi/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/implementation-python-runtime/NOTICE b/modules/implementation-python-runtime/NOTICE index aaa8297e5e..ba46f2018e 100644 --- a/modules/implementation-python-runtime/NOTICE +++ b/modules/implementation-python-runtime/NOTICE @@ -1,13 +1,13 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - -This product also includes software under the BSD license -(see the LICENSE file contained in this distribution), with -the following copyright: - -Copyright (c) Django Software Foundation and individual contributors. -All rights reserved. - +${pom.name} +Copyright (c) 2005 - 2011 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + +This product also includes software under the BSD license +(see the LICENSE file contained in this distribution), with +the following copyright: + +Copyright (c) Django Software Foundation and individual contributors. +All rights reserved. + diff --git a/modules/implementation-python/NOTICE b/modules/implementation-python/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/implementation-python/NOTICE +++ b/modules/implementation-python/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/implementation-script-runtime/NOTICE b/modules/implementation-script-runtime/NOTICE index c1b42b04ed..8bc7b24b6f 100644 --- a/modules/implementation-script-runtime/NOTICE +++ b/modules/implementation-script-runtime/NOTICE @@ -1,12 +1,12 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - -This product also includes software under the BSD license -(see the LICENSE file contained in this distribution), with -the following copyright: - -Copyright (c) 2006, Sun Microsystems, Inc. -All rights reserved. +${pom.name} +Copyright (c) 2005 - 2011 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + +This product also includes software under the BSD license +(see the LICENSE file contained in this distribution), with +the following copyright: + +Copyright (c) 2006, Sun Microsystems, Inc. +All rights reserved. diff --git a/modules/implementation-script/NOTICE b/modules/implementation-script/NOTICE index c1b42b04ed..04ea44ce23 100644 --- a/modules/implementation-script/NOTICE +++ b/modules/implementation-script/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/implementation-web-client/NOTICE b/modules/implementation-web-client/NOTICE index 5dba7efd2c..75259a6082 100644 --- a/modules/implementation-web-client/NOTICE +++ b/modules/implementation-web-client/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/implementation-web-runtime/NOTICE b/modules/implementation-web-runtime/NOTICE index 954815cf00..3d1a250cb3 100644 --- a/modules/implementation-web-runtime/NOTICE +++ b/modules/implementation-web-runtime/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/implementation-widget-runtime-dojo/NOTICE b/modules/implementation-widget-runtime-dojo/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/implementation-widget-runtime-dojo/NOTICE +++ b/modules/implementation-widget-runtime-dojo/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/implementation-widget-runtime/NOTICE b/modules/implementation-widget-runtime/NOTICE index ad2ba40961..f6ce2542c3 100644 --- a/modules/implementation-widget-runtime/NOTICE +++ b/modules/implementation-widget-runtime/NOTICE @@ -1,6 +1,6 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - +${pom.name} +Copyright (c) 2005 - 2011 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/modules/implementation-widget/NOTICE b/modules/implementation-widget/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/implementation-widget/NOTICE +++ b/modules/implementation-widget/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/interface-java-jaxrs/NOTICE b/modules/interface-java-jaxrs/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/interface-java-jaxrs/NOTICE +++ b/modules/interface-java-jaxrs/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/interface-java-jaxws/NOTICE b/modules/interface-java-jaxws/NOTICE index ad2ba40961..f6ce2542c3 100644 --- a/modules/interface-java-jaxws/NOTICE +++ b/modules/interface-java-jaxws/NOTICE @@ -1,6 +1,6 @@ -${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - +${pom.name} +Copyright (c) 2005 - 2011 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/modules/interface-java/NOTICE b/modules/interface-java/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/interface-java/NOTICE +++ b/modules/interface-java/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/interface-wsdl/NOTICE b/modules/interface-wsdl/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/interface-wsdl/NOTICE +++ b/modules/interface-wsdl/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/launcher/NOTICE b/modules/launcher/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/launcher/NOTICE +++ b/modules/launcher/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/monitor/NOTICE b/modules/monitor/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/monitor/NOTICE +++ b/modules/monitor/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/node-api/NOTICE b/modules/node-api/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/node-api/NOTICE +++ b/modules/node-api/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/node-impl-osgi/NOTICE b/modules/node-impl-osgi/NOTICE index 8c74c2267e..3f80b33f05 100644 --- a/modules/node-impl-osgi/NOTICE +++ b/modules/node-impl-osgi/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/node-impl/NOTICE b/modules/node-impl/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/node-impl/NOTICE +++ b/modules/node-impl/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/node-launcher-equinox/NOTICE b/modules/node-launcher-equinox/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/node-launcher-equinox/NOTICE +++ b/modules/node-launcher-equinox/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/node-launcher/NOTICE b/modules/node-launcher/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/node-launcher/NOTICE +++ b/modules/node-launcher/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/osgi-runtime-pom/src/main/resources/NOTICE b/modules/osgi-runtime-pom/src/main/resources/NOTICE index 1bfb4e16c3..85c82bd9ce 100644 --- a/modules/osgi-runtime-pom/src/main/resources/NOTICE +++ b/modules/osgi-runtime-pom/src/main/resources/NOTICE @@ -1,5 +1,5 @@ Apache Tuscany Base Jar -Copyright (c) 2010 The Apache Software Foundation +Copyright (c) 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/policy-logging/NOTICE b/modules/policy-logging/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/policy-logging/NOTICE +++ b/modules/policy-logging/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/policy-security/NOTICE b/modules/policy-security/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/policy-security/NOTICE +++ b/modules/policy-security/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/policy-transaction/NOTICE b/modules/policy-transaction/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/policy-transaction/NOTICE +++ b/modules/policy-transaction/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/policy-wspolicy/NOTICE b/modules/policy-wspolicy/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/policy-wspolicy/NOTICE +++ b/modules/policy-wspolicy/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/sca-api/NOTICE b/modules/sca-api/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/sca-api/NOTICE +++ b/modules/sca-api/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/sca-client-impl/NOTICE b/modules/sca-client-impl/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/modules/sca-client-impl/NOTICE +++ b/modules/sca-client-impl/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/web-javascript-dojo/NOTICE b/modules/web-javascript-dojo/NOTICE index 55cb8b86a8..c5ac051c15 100644 --- a/modules/web-javascript-dojo/NOTICE +++ b/modules/web-javascript-dojo/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/web-javascript/NOTICE b/modules/web-javascript/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/web-javascript/NOTICE +++ b/modules/web-javascript/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/modules/xsd/NOTICE b/modules/xsd/NOTICE index ad2ba40961..d69e595698 100644 --- a/modules/xsd/NOTICE +++ b/modules/xsd/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/NOTICE b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/NOTICE +++ b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator/NOTICE b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator/NOTICE +++ b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/samples/learning-more/implementation-osgi/dosgi-calculator-operations/NOTICE b/samples/learning-more/implementation-osgi/dosgi-calculator-operations/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/samples/learning-more/implementation-osgi/dosgi-calculator-operations/NOTICE +++ b/samples/learning-more/implementation-osgi/dosgi-calculator-operations/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/samples/learning-more/implementation-osgi/dosgi-calculator/NOTICE b/samples/learning-more/implementation-osgi/dosgi-calculator/NOTICE index 9ddba06a32..f6ce2542c3 100644 --- a/samples/learning-more/implementation-osgi/dosgi-calculator/NOTICE +++ b/samples/learning-more/implementation-osgi/dosgi-calculator/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/unreleased/modules/binding-rss-runtime/NOTICE b/unreleased/modules/binding-rss-runtime/NOTICE index ad2ba40961..d69e595698 100644 --- a/unreleased/modules/binding-rss-runtime/NOTICE +++ b/unreleased/modules/binding-rss-runtime/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). diff --git a/unreleased/modules/binding-rss/NOTICE b/unreleased/modules/binding-rss/NOTICE index ad2ba40961..d69e595698 100644 --- a/unreleased/modules/binding-rss/NOTICE +++ b/unreleased/modules/binding-rss/NOTICE @@ -1,5 +1,5 @@ ${pom.name} -Copyright (c) 2005 - 2010 The Apache Software Foundation +Copyright (c) 2005 - 2011 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). From 30fe57fbe451d41f4ec54b7914dbe3e389d73a1e Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Mon, 10 Jan 2011 08:41:58 +0000 Subject: [PATCH 018/157] Updates to CHANGES file git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057119 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index c3194699e2..f49c2e5e5e 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes With Apache Tuscany SCA 2.0-Beta2 January 2010 ====================================================== Highlights include: +- Addition of an interactive Shell to work with SCA domains, contributions, and services +- More reorganization of modules to support base-runtime and extension runtime jars +- Tidying and simplification of the Web Services binding dependencies From 894bd00fae8ab15e3ae721681b19fea2d1616963 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Mon, 10 Jan 2011 15:08:32 +0000 Subject: [PATCH 019/157] Add a simple test case to look a implementations that use doc/lit (bare) interfaces. There was a conversation on the ML about whether databinding is clever enough to translate between bare and wrapped as the data passes from implementation to binding as it's send through a reference. At the moment the test gives me index out of bounds. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057230 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/sample/api/WSDLReference.java | 1 + .../java/sample/impl/SampleWSDLProxy.java | 10 +++ .../UpperSampleAsyncReferenceBareImpl.java | 77 +++++++++++++++++++ .../UpperSampleAsyncServiceWrappedImpl.java | 45 +++++++++++ .../impl/SampleNativeAsyncBareTestCase.java | 66 ++++++++++++++++ .../src/test/resources/Upper-async-bare.wsdl | 54 +++++++++++++ .../test/resources/Upper-async-wrapped.wsdl | 66 ++++++++++++++++ .../src/test/resources/Upper-async.wsdl | 2 +- .../resources/testnativeasyncbare.composite | 36 +++++++++ 9 files changed, 356 insertions(+), 1 deletion(-) create mode 100644 samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncReferenceBareImpl.java create mode 100644 samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncServiceWrappedImpl.java create mode 100644 samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/SampleNativeAsyncBareTestCase.java create mode 100644 samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async-bare.wsdl create mode 100644 samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async-wrapped.wsdl create mode 100644 samples/extending-tuscany/implementation-sample/src/test/resources/testnativeasyncbare.composite diff --git a/samples/extending-tuscany/implementation-sample/src/main/java/sample/api/WSDLReference.java b/samples/extending-tuscany/implementation-sample/src/main/java/sample/api/WSDLReference.java index bc0d5cc5d8..a25df3e895 100644 --- a/samples/extending-tuscany/implementation-sample/src/main/java/sample/api/WSDLReference.java +++ b/samples/extending-tuscany/implementation-sample/src/main/java/sample/api/WSDLReference.java @@ -24,6 +24,7 @@ public interface WSDLReference { Element call(String op, Element e); + public Element callBare(String op, Element... e); void callAsync(String op, Element e); } diff --git a/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLProxy.java b/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLProxy.java index 176dac6b15..5b42bce28f 100644 --- a/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLProxy.java +++ b/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLProxy.java @@ -67,6 +67,16 @@ public Element call(String op, Element e) { } } + @Override + public Element callBare(String op, Element... e) { + try { + // Invoke the named operation on the endpoint reference + return (Element)repr.invoke(ops.get(op), e); + } catch(InvocationTargetException ex) { + throw new RuntimeException(ex); + } + } + @Override public void callAsync(String op, Element e) { // Asynchronously invoke the named operation on the endpoint reference diff --git a/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncReferenceBareImpl.java b/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncReferenceBareImpl.java new file mode 100644 index 0000000000..ff1da8f8bf --- /dev/null +++ b/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncReferenceBareImpl.java @@ -0,0 +1,77 @@ +/* + * 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 sample; + +import static java.lang.System.out; +import static sample.Xutil.elem; +import static sample.Xutil.text; +import static sample.Xutil.xdom; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +import org.w3c.dom.Element; + +import sample.Xutil.NodeBuilder; +import sample.api.Java; +import sample.api.WSDL; +import sample.api.WSDLReference; + +/** + * Sample component implementation that uses Java interfaces. + * + * @version $Rev$ $Date$ + */ +@Java(Upper.class) +public class UpperSampleAsyncReferenceBareImpl { + + @WSDL("http://sample/upper-async-bare#UpperBare") + WSDLReference upper; + + Element response; + CountDownLatch latch = new CountDownLatch( 1 ); + + public String upper(String s) { + out.println("UpperSampleAsyncReferenceImpl.upper(" + s + ")"); + + // I'm passing in the non-wrapped version of the parameter + // here to test what happens with different WSDL styles + // at the implementation and binding + final Element arg0 = xdom("http://sample/upper-async", "arg0", text("arg0_" + s)); + final Element arg1 = xdom("http://sample/upper-async", "arg1", text("arg1_" + s)); + + // TODO - intended to do an async call here but using the the sync version + // while I look at databinding. + Element response = upper.callBare("upper", arg0, arg1); + + return response.getTextContent(); + } + + /** + * In this implementation the convention is that the + * async callback arrives at an operation named + * operationName + Callback + */ + public void upperCallback(Element response) { + out.println("UpperSampleAsyncReferenceImpl.upperCallback(" + response.getTextContent() + ")"); + this.response = response; + latch.countDown(); + } +} diff --git a/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncServiceWrappedImpl.java b/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncServiceWrappedImpl.java new file mode 100644 index 0000000000..bd7dcd5eae --- /dev/null +++ b/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncServiceWrappedImpl.java @@ -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 sample; + +import static java.lang.System.out; +import static sample.Xutil.elem; +import static sample.Xutil.text; +import static sample.Xutil.xdom; + +import org.w3c.dom.Element; + +import sample.api.WSDL; + +/** + * Sample component implementation that uses Java interfaces. + * + * @version $Rev$ $Date$ + */ +@WSDL("http://sample/upper-async-wrapped#UpperWrapped") +public class UpperSampleAsyncServiceWrappedImpl { + + public Element call(String op, Element e) { + String input = e.getTextContent(); + out.println("UpperSampleAsyncServiceImpl.upper(" + input + ")"); + String output = input.toUpperCase(); + return xdom("http://sample/upper-async", "upperResponse", elem("result", text(output))); + } +} diff --git a/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/SampleNativeAsyncBareTestCase.java b/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/SampleNativeAsyncBareTestCase.java new file mode 100644 index 0000000000..d40fdbf6b3 --- /dev/null +++ b/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/SampleNativeAsyncBareTestCase.java @@ -0,0 +1,66 @@ +/* + * 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 sample.impl; + +import static org.junit.Assert.assertEquals; + +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +import sample.Upper; + +/** + * Test how to run an SCA contribution containing a test composite on a + * Tuscany runtime node. + * + * @version $Rev$ $Date$ + */ +public class SampleNativeAsyncBareTestCase { + static Node node; + + @BeforeClass + public static void setUp() throws Exception { + final NodeFactory nf = NodeFactory.newInstance(); + String here = SampleNativeAsyncBareTestCase.class.getProtectionDomain().getCodeSource().getLocation().toString(); + // Create the node using the pattern "name of composite file to start" / Contribution to use + node = nf.createNode("testnativeasyncbare.composite", new Contribution("test", here)); + node.start(); + } + + @AfterClass + public static void tearDown() throws Exception { + node.stop(); + } + + @Test + @Ignore + public void testReference() { + System.out.println("SampleNaiveAsyncBareTestCase.testReference"); + Upper upper = node.getService(Upper.class, "SampleNativeAsyncReference"); + final String r = upper.upper("async"); + System.out.println(r); + assertEquals("ASYNC", r); + } +} diff --git a/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async-bare.wsdl b/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async-bare.wsdl new file mode 100644 index 0000000000..54061067e5 --- /dev/null +++ b/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async-bare.wsdl @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async-wrapped.wsdl b/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async-wrapped.wsdl new file mode 100644 index 0000000000..adce1542e6 --- /dev/null +++ b/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async-wrapped.wsdl @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async.wsdl b/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async.wsdl index d8d9065ca8..a16fb5db3d 100644 --- a/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async.wsdl +++ b/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async.wsdl @@ -22,7 +22,7 @@ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" - name="Upper"> + name="UpperAsync"> + + + + + + + + + + + + + + + From e163fbd5aa44ddb330a221687b62721f4b37a893 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Tue, 11 Jan 2011 00:16:24 +0000 Subject: [PATCH 020/157] Make sure the binding uri is reset when the service is stopped git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057420 13f79535-47bb-0310-9956-ffa450edef68 --- .../binding/sca/provider/RuntimeSCAServiceBindingProvider.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java index fd04cf02e3..559ee59bc1 100644 --- a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java +++ b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java @@ -95,6 +95,7 @@ public void start() { } public void stop() { + endpoint.getBinding().setURI(null); if (distributedProvider != null) { distributedProvider.stop(); } From 63173d5108fdde7f0bff519631925676a4b36213 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Tue, 11 Jan 2011 00:42:26 +0000 Subject: [PATCH 021/157] Clear the endpoints when the service is stopped git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057430 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java index db345826d1..da28cab2a2 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java @@ -477,6 +477,7 @@ public void stop(CompositeContext compositeContext, Component component) { RuntimeEndpoint ep = (RuntimeEndpoint) endpoint; stop(ep); } + service.getEndpoints().clear(); } for (ComponentReference reference : component.getReferences()) { if (logger.isLoggable(Level.FINE)) { From 5274441a313dbef0e97f90f3aa40efd663aaaf75 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Tue, 11 Jan 2011 10:06:15 +0000 Subject: [PATCH 022/157] Disabled Callback SeparateThread iTest due to problem described in TUSCANY-3816 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057555 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/itest/pom.xml b/testing/itest/pom.xml index c7ca8a848a..7a8b2d44e2 100644 --- a/testing/itest/pom.xml +++ b/testing/itest/pom.xml @@ -45,7 +45,9 @@ callback-basic callback-complex-type callback-multiple-wires + callback-two-composites callback-two-nodes component-type From b8c81ab8eb36c9fe79be073d3f1ebedbda80b5f6 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Tue, 11 Jan 2011 14:11:55 +0000 Subject: [PATCH 023/157] Add capability to support Bindings that support Async invocations natively - as under TUSCANY-3801 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057645 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/assembly/impl/EndpointImpl.java | 4 +-- .../assembly/impl/EndpointReferenceImpl.java | 29 +++++++++++++++---- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java b/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java index f4a8429f13..a101bcd3aa 100644 --- a/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java +++ b/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java @@ -281,11 +281,11 @@ private static String[] parseStructuralURI(String structuralURI) { } public boolean isAsyncInvocation() { - if (service.getName().endsWith("_asyncCallback")){ + if( service != null && service.getName().endsWith("_asyncCallback")){ // this is a response service at the reference component so don't create a // response reference. return false; - } + } // end if for(Intent intent : getRequiredIntents()){ if (intent.getName().getLocalPart().equals("asyncInvocation")){ diff --git a/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReferenceImpl.java b/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReferenceImpl.java index 96af9373cd..ebcc1e3e63 100644 --- a/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReferenceImpl.java +++ b/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReferenceImpl.java @@ -231,18 +231,35 @@ public void setStatus(Status status) { this.status = status; } + /** + * Indicates whether this EndpointReference is connected to a target service which is asynchronous. + * This can be marked in one of 3 ways: + * - the EndpointReference has the "asyncInvocation" intent set + * - the EndpointReference has a name ending with "_asyncCallback" + * - there is a target Endpoint configured that itself is marked as async invocation + * @return - true if the service is asynchronous invocation, false otherwise + */ public boolean isAsyncInvocation() { - if (reference.getName().endsWith("_asyncCallback")){ + if (reference != null && reference.getName().endsWith("_asyncCallback")){ // this is a response reference at the service component so don't create a // response service. The response service will be at the reference component return false; - } + } // end if + // Check if the EndpointReference is explicitly marked with the asyncInvocation intent for(Intent intent : getRequiredIntents()){ if (intent.getName().getLocalPart().equals("asyncInvocation")){ return true; - } - } + } // end if + } // end for + + // Check if the target Endpoint is marked as asyncInvocation + if( targetEndpoint != null ) { + if (targetEndpoint.isAsyncInvocation()) { + return true; + } // end if + } // end if return false; - } -} + } // end method isAsyncInvocation + +} // end class EndpointReferenceImpl From 66876d3fcbcc8906de51dd4a5f0e4f96577a7916 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Tue, 11 Jan 2011 14:12:47 +0000 Subject: [PATCH 024/157] Add capability to support Bindings that support Async invocations natively - as under TUSCANY-3801 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057647 13f79535-47bb-0310-9956-ffa450edef68 --- .../ws/axis2/provider/Axis2EngineIntegration.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2EngineIntegration.java b/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2EngineIntegration.java index 9827f62abb..8fc5befc78 100644 --- a/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2EngineIntegration.java +++ b/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2EngineIntegration.java @@ -232,7 +232,18 @@ public static AxisService createWSDLAxisService(String endpointURL, QName serviceQName = wsBinding.getService().getQName(); Definition def = getDefinition(definition, serviceQName); - final WSDLToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(def, serviceQName, port.getName()); + ClassLoader oldTCCL = axis2Config.classLoaderContext.setContextClassLoader(); + final WSDLToAxisServiceBuilder builder; + try { + builder = new WSDL11ToAxisServiceBuilder(def, serviceQName, port.getName()); + } finally { + if (oldTCCL != null) { + Thread.currentThread().setContextClassLoader(oldTCCL); + } + } + //final WSDLToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(def, serviceQName, port.getName()); + + builder.setServerSide(true); // [rfeng] Add a custom resolver to work around WSCOMMONS-228 // TODO - 228 is resolved, is this still required From 7476da40c7fdf8883a593cc327f89c4152077c80 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Tue, 11 Jan 2011 14:14:06 +0000 Subject: [PATCH 025/157] Add capability to support Bindings that support Async invocations natively - as under TUSCANY-3801 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057648 13f79535-47bb-0310-9956-ffa450edef68 --- .../assembly/impl/RuntimeEndpointImpl.java | 57 ++++-- .../impl/RuntimeEndpointReferenceImpl.java | 22 +-- .../core/invocation/AsyncResponseHandler.java | 17 +- .../core/invocation/AsyncResponseInvoker.java | 57 +++++- .../core/invocation/AsyncResponseService.java | 50 ++++++ .../invocation/JDKAsyncResponseInvoker.java | 15 ++ .../sca/core/invocation/RuntimeInvoker.java | 19 +- .../impl/AsyncInvocationFutureImpl.java | 37 ++-- .../impl/AsyncJDKInvocationHandler.java | 163 +++++++++++++----- .../impl/AsyncResponseHandlerImpl.java | 6 +- .../invocation/impl/InvocationChainImpl.java | 97 ++++++++--- .../invocation/impl/JDKInvocationHandler.java | 2 +- .../core/invocation/impl/JDKProxyFactory.java | 2 + 13 files changed, 409 insertions(+), 135 deletions(-) create mode 100644 modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseService.java create mode 100644 modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKAsyncResponseInvoker.java diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java index 6339b96a1b..5c21041413 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java @@ -60,7 +60,7 @@ import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory; -import org.apache.tuscany.sca.core.invocation.AsyncResponseHandler; +import org.apache.tuscany.sca.core.invocation.AsyncResponseService; import org.apache.tuscany.sca.core.invocation.ExtensibleWireProcessor; import org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor; import org.apache.tuscany.sca.core.invocation.RuntimeInvoker; @@ -86,6 +86,7 @@ import org.apache.tuscany.sca.provider.EndpointProvider; import org.apache.tuscany.sca.provider.ImplementationAsyncProvider; import org.apache.tuscany.sca.provider.ImplementationProvider; +import org.apache.tuscany.sca.provider.OptimisingBindingProvider; import org.apache.tuscany.sca.provider.PolicyProvider; import org.apache.tuscany.sca.provider.PolicyProviderFactory; import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint; @@ -391,13 +392,20 @@ private void initInvocationChains() { ((InterceptorAsync)invoker).setPrevious(asyncResponseInvoker); } else { //TODO - throw error once the old async code is removed - } - } + } // end if + } // end for } else { // TODO - throw error once the old async code is removed - } - } - } + } // end if + } // end if + + ServiceBindingProvider provider = getBindingProvider(); + if ((provider != null) && (provider instanceof OptimisingBindingProvider)) { + //TODO - remove this comment once optimisation codepath is tested + ((OptimisingBindingProvider)provider).optimiseBinding( this ); + } // end if + + } // end method initInvocationChains /** * Creates the async callback for the supplied Endpoint and Operation, if it does not already exist @@ -406,6 +414,9 @@ private void initInvocationChains() { * @param operation - the Operation */ private void createAsyncServerCallback( RuntimeEndpoint endpoint, Operation operation ) { + // No need to create a callback if the Binding supports async natively... + if( hasNativeAsyncBinding(endpoint) ) return; + // Check to see if the callback already exists if( asyncCallbackExists( endpoint ) ) return; @@ -416,6 +427,20 @@ private void createAsyncServerCallback( RuntimeEndpoint endpoint, Operation oper } // end method createAsyncServerCallback /** + * Indicates if a given endpoint has a Binding that supports native async invocation + * @param endpoint - the endpoint + * @return - true if the endpoint has a binding that supports native async, false otherwise + */ + private boolean hasNativeAsyncBinding(RuntimeEndpoint endpoint) { + ServiceBindingProvider provider = endpoint.getBindingProvider(); + if( provider instanceof EndpointAsyncProvider ) { + EndpointAsyncProvider asyncProvider = (EndpointAsyncProvider) provider; + if( asyncProvider.supportsNativeAsync() ) return true; + } // end if + return false; + } // end method hasNativeAsyncBinding + + /** * Creates the Endpoint object for the async callback * @param endpoint - the endpoint which has the async server operations * @return the EndpointReference object representing the callback @@ -433,7 +458,7 @@ private RuntimeEndpointReference createAsyncEPR( RuntimeEndpoint endpoint ){ JavaInterfaceFactory javaInterfaceFactory = (JavaInterfaceFactory)modelFactories.getFactory(JavaInterfaceFactory.class); JavaInterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract(); try { - interfaceContract.setInterface(javaInterfaceFactory.createJavaInterface(AsyncResponseHandler.class)); + interfaceContract.setInterface(javaInterfaceFactory.createJavaInterface(AsyncResponseService.class)); } catch (InvalidInterfaceException e1) { // Nothing to do here - will not happen } // end try @@ -605,10 +630,9 @@ private void initServiceBindingInvocationChains() { Interceptor interceptor = p.createBindingInterceptor(); if (interceptor != null) { bindingInvocationChain.addInterceptor(interceptor); - } - } - - } + } // end if + } // end for + } // end if // This is strategically placed before the RuntimeInvoker is added to the end of the // binding chain as the RuntimeInvoker doesn't need to take part in the response @@ -625,7 +649,7 @@ private void initServiceBindingInvocationChains() { // TODO - raise an error. Not doing that while // we have the old async mechanism in play } - } + } // end for // fix up the binding chain response path to point back to the // binding provided async response handler @@ -640,15 +664,16 @@ private void initServiceBindingInvocationChains() { } } else { //TODO - throw error once the old async code is removed - } - } + } // end if + } // end if // Add the runtime invoker to the end of the binding chain. // It mediates between the binding chain and selects the // correct invocation chain based on the operation that's // been selected - bindingInvocationChain.addInvoker(invoker); - } + bindingInvocationChain.addInvoker(invoker); + + } // end method initServiceBindingInvocationChains /** * Add the interceptor for a binding diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java index 89d0e444af..f86f90c6e6 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java @@ -48,7 +48,7 @@ import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory; -import org.apache.tuscany.sca.core.invocation.AsyncResponseHandler; +import org.apache.tuscany.sca.core.invocation.AsyncResponseService; import org.apache.tuscany.sca.core.invocation.ExtensibleWireProcessor; import org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor; import org.apache.tuscany.sca.core.invocation.RuntimeInvoker; @@ -348,10 +348,12 @@ private void initInvocationChains() { wireProcessor.process(this); if (isAsyncInvocation()){ - // fix up all of the operation chain response paths - // to point back to the implementation provided + // Fix up all of the operation chain response paths to point back to the implementation provided // async response handler - ImplementationProvider implementationProvider = ((RuntimeComponent)getComponent()).getImplementationProvider(); + //ImplementationProvider implementationProvider = ((RuntimeComponent)getComponent()).getImplementationProvider(); + RuntimeComponentReference theReference = (RuntimeComponentReference)this.getReference(); + RuntimeComponent theComponent = theReference.getComponent(); + ImplementationProvider implementationProvider = theComponent.getImplementationProvider(); if (implementationProvider instanceof ImplementationAsyncProvider){ for (InvocationChain chain : getInvocationChains()){ InvokerAsyncResponse asyncResponseInvoker = ((ImplementationAsyncProvider)implementationProvider).createAsyncResponseInvoker(chain.getSourceOperation()); @@ -359,11 +361,11 @@ private void initInvocationChains() { ((InterceptorAsync)chain.getHeadInvoker()).setPrevious(asyncResponseInvoker); } else { //TODO - throw error once the old async code is removed - } - } - } - } - } + } // end if + } // end for + } // end if + } // end if + } // end method initInvocationChains /** * Check that endpoint reference has compatible interface at the component and binding ends. @@ -688,7 +690,7 @@ public void createAsyncCallbackEndpoint(){ (JavaInterfaceFactory)modelFactories.getFactory(JavaInterfaceFactory.class); JavaInterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract(); try { - interfaceContract.setInterface(javaInterfaceFactory.createJavaInterface(AsyncResponseHandler.class)); + interfaceContract.setInterface(javaInterfaceFactory.createJavaInterface(AsyncResponseService.class)); } catch (InvalidInterfaceException e1) { // Nothing to do here - will not happen } // end try diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseHandler.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseHandler.java index d8eac8a166..306a141433 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseHandler.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseHandler.java @@ -27,19 +27,28 @@ * * @param - the type of the non-fault response */ -@Remotable() -public interface AsyncResponseHandler { +public interface AsyncResponseHandler extends AsyncResponseService { /** - * Async process completed with a Fault. Must only be invoked once + * Async process completed with a wrapped Fault. Must only be invoked once + * * @param e - the wrapper containing the Fault to send * @throws IllegalStateException if either the setResponse method or the setFault method have been called previously */ @OneWay - public void setFault(AsyncFaultWrapper e); + public void setWrappedFault(AsyncFaultWrapper w); + + /** + * Async process completed with a Fault. Must only be invoked once. + * @param e - the Fault to send + * @throws IllegalStateException if either the setResponse method or the setFault method have been called previously + */ + @OneWay + public void setFault( Throwable e ); /** * Async process completed with a response message. Must only be invoked once + * * @throws IllegalStateException if either the setResponse method or the setFault method have been called previously * @param res - the response message, which is of type V */ diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java index 0a28bed480..652f67f5e1 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java @@ -20,12 +20,21 @@ package org.apache.tuscany.sca.core.invocation; import java.io.Serializable; +import java.util.Iterator; +import java.util.List; +import org.apache.tuscany.sca.context.CompositeContext; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; +import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; import org.apache.tuscany.sca.invocation.Message; +import org.apache.tuscany.sca.invocation.MessageFactory; import org.apache.tuscany.sca.provider.EndpointAsyncProvider; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; +import org.oasisopen.sca.ComponentContext; /** * A class that wraps the mechanics for sending async responses @@ -42,19 +51,25 @@ public class AsyncResponseInvoker implements InvokerAsyncResponse, Serializab */ private static final long serialVersionUID = -7992598227671386588L; - RuntimeEndpoint requestEndpoint; - RuntimeEndpointReference responseEndpointReference; - T responseTargetAddress; - String relatesToMsgID; + private RuntimeEndpoint requestEndpoint; + private RuntimeEndpointReference responseEndpointReference; + private T responseTargetAddress; + private String relatesToMsgID; + private String operationName; + private MessageFactory messageFactory; + private String bindingType = ""; public AsyncResponseInvoker(RuntimeEndpoint requestEndpoint, RuntimeEndpointReference responseEndpointReference, - T responseTargetAddress, String relatesToMsgID) { + T responseTargetAddress, String relatesToMsgID, + String operationName, MessageFactory messageFactory) { super(); this.requestEndpoint = requestEndpoint; this.responseEndpointReference = responseEndpointReference; this.responseTargetAddress = responseTargetAddress; this.relatesToMsgID = relatesToMsgID; + this.operationName = operationName; + this.messageFactory = messageFactory; } // end constructor /** @@ -95,10 +110,34 @@ public void setRelatesToMsgID(String relatesToMsgID) { * @param args the response data */ public void invokeAsyncResponse(Object args) { - // TODO - how to get at the code that translates from args to msg? - // turn args into a message - Message responseMessage = null; - invokeAsyncResponse(responseMessage); + Message msg = messageFactory.createMessage(); + + msg.setOperation(getOperation()); + if( args instanceof Throwable ) { + msg.setFaultBody(args); + } else { + msg.setBody(args); + } // end if + + invokeAsyncResponse(msg); + } // end method invokeAsyncResponse(Object) + + private Operation getOperation() { + List ops = requestEndpoint.getService().getInterfaceContract().getInterface().getOperations(); + for (Operation op : ops) { + if( operationName.equals(op.getName()) ) return op; + } // end for + return null; + } // end getOperation + + public void setBindingType(String bindingType) { + this.bindingType = bindingType; + } // end method setBindingType + + public String getBindingType() { + return bindingType; + } // end method getBindingType + } // end class diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseService.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseService.java new file mode 100644 index 0000000000..62d7f74505 --- /dev/null +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseService.java @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.core.invocation; + +import org.oasisopen.sca.annotation.OneWay; +import org.oasisopen.sca.annotation.Remotable; + +/** + * An interface which describes the client response service interface for a non-native binding + * performing an asynchronous invocation of a service + * + * @param - the type of the non-fault response + */ +@Remotable() +public interface AsyncResponseService { + + /** + * Async process completed with a wrapped Fault. Must only be invoked once + * @param e - the wrapper containing the Fault to send + * @throws IllegalStateException if either the setResponse method or the setFault method have been called previously + */ + @OneWay + public void setWrappedFault(AsyncFaultWrapper w); + + /** + * Async process completed with a response message. Must only be invoked once + * @throws IllegalStateException if either the setResponse method or the setFault method have been called previously + * @param res - the response message, which is of type V + */ + @OneWay + public void setResponse(V res); + +} diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKAsyncResponseInvoker.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKAsyncResponseInvoker.java new file mode 100644 index 0000000000..3dc40e8d67 --- /dev/null +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKAsyncResponseInvoker.java @@ -0,0 +1,15 @@ +package org.apache.tuscany.sca.core.invocation; + +import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; + +public interface JDKAsyncResponseInvoker extends InvokerAsyncResponse { + + /** + * Registers an Async response, which provides an ID which identifies a given response + * and an object which can handle the response + * @param id - the ID + * @param responseHandler - the response handler object + */ + public void registerAsyncResponse( String id, Object responseHandler ); + +} // end interface JDKAsyncResponseInvoker diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java index 34c00dbb94..62593ba895 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java @@ -178,7 +178,10 @@ public void invokeAsync(Message msg) { // temporary fix to swallow the dummy exception that's // thrown back to get past the response chain processing. if (!(ex instanceof AsyncResponseException)){ - throw new ServiceRuntimeException(ex); + // send the exception in through the + // async response processing path + msg.setFaultBody(ex); + invokeAsyncResponse(msg); } } } finally { @@ -197,15 +200,11 @@ public void invokeAsync(Message msg) { public void invokeAsyncResponse(Message msg) { InvocationChain chain = invocable.getInvocationChain(msg.getOperation()); Invoker tailInvoker = chain.getTailInvoker(); - try { - ((InvokerAsyncResponse)tailInvoker).invokeAsyncResponse(msg); - } catch (Throwable ex) { - throw new ServiceRuntimeException(ex); - } + ((InvokerAsyncResponse)tailInvoker).invokeAsyncResponse(msg); } // end method invokeAsyncResponse - @Override - public void invokeAsyncRequest(Message msg) throws Throwable { - invokeAsync(msg); - } // end method invokeAsyncRequest + @Override + public void invokeAsyncRequest(Message msg) throws Throwable { + invokeAsync(msg); + } // end method invokeAsyncRequest } diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncInvocationFutureImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncInvocationFutureImpl.java index 8db469b25e..213fd536e9 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncInvocationFutureImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncInvocationFutureImpl.java @@ -145,11 +145,30 @@ public boolean isDone() { } // end method isDone /** - * Async process completed with a Fault. Must only be invoked once + * Async process completed with a Fault. Must only be invoked once. * @param e - the Fault to send * @throws IllegalStateException if either the setResponse method or the setFault method have been called previously */ - public void setFault(AsyncFaultWrapper w) { + public void setFault( Throwable e ) { + lock.lock(); + try { + if( notSetYet() ) { + fault = e; + isDone.signalAll(); + } else { + throw new IllegalStateException("setResponse() or setFault() has been called previously"); + } // end if + } finally { + lock.unlock(); + } // end try + } // end method setFault( Throwable ) + + /** + * Async process completed with a wrapped Fault. Must only be invoked once. + * @param w - the wrapped Fault to send + * @throws IllegalStateException if either the setResponse method or the setFault method have been called previously + */ + public void setWrappedFault(AsyncFaultWrapper w) { ClassLoader tccl = Thread.currentThread().getContextClassLoader(); Throwable e; @@ -162,19 +181,9 @@ public void setFault(AsyncFaultWrapper w) { } // end try if( e == null ) throw new IllegalArgumentException("AsyncFaultWrapper did not return an Exception"); - lock.lock(); - try { - if( notSetYet() ) { - fault = e; - isDone.signalAll(); - } else { - throw new IllegalStateException("setResponse() or setFault() has been called previously"); - } // end if - } finally { - lock.unlock(); - } // end try + setFault( e ); - } // end method setFault + } // end method setFault( AsyncFaultWrapper ) /** * Async process completed with a response message. Must only be invoked once diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java index be65a51c1b..a36ee8d2f8 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java @@ -29,6 +29,7 @@ import java.security.PrivilegedAction; import java.util.Arrays; import java.util.List; +import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; @@ -53,6 +54,7 @@ import org.apache.tuscany.sca.assembly.builder.BuilderExtensionPoint; import org.apache.tuscany.sca.assembly.xml.Constants; import org.apache.tuscany.sca.context.CompositeContext; +import org.apache.tuscany.sca.context.ThreadMessageContext; import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.contribution.processor.ProcessorContext; import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; @@ -65,15 +67,24 @@ import org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper; import org.apache.tuscany.sca.core.invocation.AsyncResponseException; import org.apache.tuscany.sca.core.invocation.AsyncResponseHandler; +import org.apache.tuscany.sca.core.invocation.AsyncResponseService; +import org.apache.tuscany.sca.core.invocation.JDKAsyncResponseInvoker; import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; +import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract; import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; import org.apache.tuscany.sca.interfacedef.util.FaultException; import org.apache.tuscany.sca.interfacedef.util.WrapperInfo; +import org.apache.tuscany.sca.invocation.InterceptorAsync; import org.apache.tuscany.sca.invocation.InvocationChain; +import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; +import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.invocation.MessageFactory; import org.apache.tuscany.sca.policy.Intent; +import org.apache.tuscany.sca.provider.EndpointReferenceAsyncProvider; import org.apache.tuscany.sca.provider.PolicyProvider; +import org.apache.tuscany.sca.provider.ReferenceBindingProvider; import org.apache.tuscany.sca.provider.ServiceBindingProvider; import org.apache.tuscany.sca.runtime.Invocable; import org.apache.tuscany.sca.runtime.RuntimeComponent; @@ -104,13 +115,13 @@ public class AsyncJDKInvocationHandler extends JDKInvocationHandler { private static int invocationCount = 10; // # of threads to use private static long maxWaitTime = 30; // Max wait time for completion = 30sec - + // Run the async service invocations using a ThreadPoolExecutor private ExecutorService theExecutor; public AsyncJDKInvocationHandler(ExtensionPointRegistry registry, MessageFactory messageFactory, - ServiceReference callableReference) { + ServiceReference callableReference ) { super(messageFactory, callableReference); initExecutorService(registry); } @@ -118,7 +129,7 @@ public AsyncJDKInvocationHandler(ExtensionPointRegistry registry, public AsyncJDKInvocationHandler(ExtensionPointRegistry registry, MessageFactory messageFactory, Class businessInterface, - Invocable source) { + Invocable source ) { super(messageFactory, businessInterface, source); initExecutorService(registry); } @@ -128,18 +139,7 @@ private final void initExecutorService(ExtensionPointRegistry registry) { WorkScheduler scheduler = utilities.getUtility(WorkScheduler.class); theExecutor = scheduler.getExecutorService(); - /* - synchronized (AsyncJDKInvocationHandler.class) { - theExecutor = utilities.getUtility(ExecutorService.class); - if (theExecutor == null) { - theExecutor = - new ThreadPoolExecutor(invocationCount, invocationCount, maxWaitTime, TimeUnit.SECONDS, - new ArrayBlockingQueue(invocationCount)); - utilities.addUtility(ExecutorService.class, theExecutor); - } - } - */ - } + } // end method initExecutorService /** * Perform the invocation of the operation @@ -202,13 +202,13 @@ protected Response doInvokeAsyncPoll(Object proxy, Method asyncMethod, Object[] try { invokeAsync(proxy, method, args, future, asyncMethod); } catch (Exception e) { - future.setFault(new AsyncFaultWrapper(e)); + future.setWrappedFault(new AsyncFaultWrapper(e)); } catch (Throwable t) { Exception e = new ServiceRuntimeException("Received Throwable: " + t.getClass().getName() + " when invoking: " + asyncMethod.getName(), t); - future.setFault(new AsyncFaultWrapper(e)); + future.setWrappedFault(new AsyncFaultWrapper(e)); } // end try return future; } // end method doInvokeAsyncPoll @@ -279,10 +279,10 @@ public Response call() { * @throws Throwable - if an exception is thrown during the invocation */ @SuppressWarnings("unchecked") - private void invokeAsync(Object proxy, + private void invokeAsync(Object proxy, Method method, Object[] args, - AsyncInvocationFutureImpl future, + AsyncInvocationFutureImpl future, Method asyncMethod) throws Throwable { if (source == null) { throw new ServiceRuntimeException("No runtime source is available"); @@ -306,12 +306,22 @@ private void invokeAsync(Object proxy, RuntimeEndpoint theEndpoint = getAsyncCallback(source); boolean isAsyncService = false; if (theEndpoint != null) { - // ... the service is asynchronous ... + // ... the service is asynchronous but binding does not support async natively ... attachFuture(theEndpoint, future); - isAsyncService = true; - } else { - // ... the service is synchronous ... } // end if + + if( isAsyncInvocation((RuntimeEndpointReference)source ) ) { + isAsyncService = true; + // Get hold of the JavaAsyncResponseHandler from the chain dealing with the async response + Invoker theInvoker = chain.getHeadInvoker(); + if( theInvoker instanceof InterceptorAsync ) { + InvokerAsyncResponse responseInvoker = ((InterceptorAsync)theInvoker).getPrevious(); + if( responseInvoker instanceof JDKAsyncResponseInvoker ) { + // Register the future as the response object with its ID + ((JDKAsyncResponseInvoker)responseInvoker).registerAsyncResponse(future.getUniqueID(), future); + } // end if + } // end if + } // end if // Perform the invocations on separate thread... theExecutor.submit(new separateThreadInvoker(chain, args, source, future, asyncMethod, isAsyncService)); @@ -354,23 +364,29 @@ public void run() { try { if (isAsyncService) { - invoke(chain, args, invocable, future.getUniqueID()); + if( supportsNativeAsync(invocable) ) { + // Binding supports native async invocations + invokeAsync(chain, args, invocable, future.getUniqueID()); + } else { + // Binding does not support native async invocations + invoke(chain, args, invocable, future.getUniqueID()); + } // end if // The result is returned asynchronously via the future... } else { // ... the service is synchronous ... result = invoke(chain, args, invocable); Type type = null; if (asyncMethod.getReturnType() == Future.class) { - // For callback async menthod + // For callback async method, where a Future is returned Type[] types = asyncMethod.getGenericParameterTypes(); if (types.length > 0 && asyncMethod.getParameterTypes()[types.length - 1] == AsyncHandler.class) { - // Last paremeter, AsyncHandler + // Last parameter is AsyncHandler type = types[types.length - 1]; - } + } // end if } else if (asyncMethod.getReturnType() == Response.class) { // For the polling method, Response type = asyncMethod.getGenericReturnType(); - } + } // end if if (type instanceof ParameterizedType) { // Check if the parameterized type of Response is a doc-lit-wrapper class Class wrapperClass = (Class)((ParameterizedType)type).getActualTypeArguments()[0]; @@ -382,16 +398,15 @@ public void run() { if (p.getWriteMethod() == null) { // There is a "class" property ... continue; - } + } // end if if (p.getWriteMethod().getParameterTypes()[0].isInstance(result)) { p.getWriteMethod().invoke(wrapper, result); result = wrapper; break; - } - } - - } - } + } // end if + } // end for + } // end if + } // end if future.setResponse(result); } // end if } catch (ServiceRuntimeException s) { @@ -400,14 +415,16 @@ public void run() { if ("AsyncResponse".equals(e.getMessage())) { // Do nothing... } else { - future.setFault(new AsyncFaultWrapper(s)); + future.setWrappedFault(new AsyncFaultWrapper(s)); } // end if } // end if } catch (AsyncResponseException ar) { - // do nothing + // This exception is received in the case where the Binding does not support async invocation + // natively - the initial invocation is effectively synchronous with this exception thrown to + // indicate that the service received the request but will send the response separately - do nothing } catch (Throwable t) { - System.out.println("Async invoke got exception: " + t.toString()); - future.setFault(new AsyncFaultWrapper(t)); + //System.out.println("Async invoke got exception: " + t.toString()); + future.setWrappedFault(new AsyncFaultWrapper(t)); } // end try } // end method run @@ -427,6 +444,49 @@ private void attachFuture(RuntimeEndpoint endpoint, AsyncInvocationFutureImpl } // end method attachFuture /** + * Perform an async invocation on the reference + * @param chain - the chain + * @param args - parameters for the invocation + * @param invocable - the reference + * @param msgID - a message ID + */ + public void invokeAsync(InvocationChain chain, Object[] args, Invocable invocable, String msgID) { + Message msg = messageFactory.createMessage(); + if (invocable instanceof RuntimeEndpointReference) { + msg.setFrom((RuntimeEndpointReference)invocable); + } // end if + if (target != null) { + msg.setTo(target); + } else if (source instanceof RuntimeEndpointReference) { + msg.setTo(((RuntimeEndpointReference)invocable).getTargetEndpoint()); + } // end if + + Operation operation = chain.getTargetOperation(); + msg.setOperation(operation); + msg.setBody(args); + + Message msgContext = ThreadMessageContext.getMessageContext(); + + // Deal with header information that needs to be copied from the message context to the new message... + transferMessageHeaders( msg, msgContext); + + ThreadMessageContext.setMessageContext(msg); + + // If there is a supplied message ID, place its value into the Message Header under "MESSAGE_ID" + if( msgID != null ){ + msg.getHeaders().put("MESSAGE_ID", msgID); + } // end if + + try { + // Invoke the reference + invocable.invokeAsync(msg); + return; + } finally { + ThreadMessageContext.setMessageContext(msgContext); + } // end try + } // end method invokeAsync + + /** * Get the async callback endpoint - if not already created, create and start it * @param source - the RuntimeEndpointReference which needs an async callback endpoint * @param future @@ -436,8 +496,14 @@ private RuntimeEndpoint getAsyncCallback(Invocable source) { if (!(source instanceof RuntimeEndpointReference)) return null; RuntimeEndpointReference epr = (RuntimeEndpointReference)source; - if (!isAsyncInvocation(epr)) - return null; + if (!isAsyncInvocation(epr)) return null; + + // Check to see if the binding supports async invocation natively + ReferenceBindingProvider eprProvider = epr.getBindingProvider(); + if( eprProvider instanceof EndpointReferenceAsyncProvider) { + if( ((EndpointReferenceAsyncProvider)eprProvider).supportsNativeAsync() ) return null; + } // end if + RuntimeEndpoint endpoint; synchronized (epr) { endpoint = (RuntimeEndpoint)epr.getCallbackEndpoint(); @@ -509,7 +575,7 @@ private RuntimeEndpoint createAsyncCallbackEndpoint(RuntimeEndpointReference epr (JavaInterfaceFactory)modelFactories.getFactory(JavaInterfaceFactory.class); JavaInterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract(); try { - interfaceContract.setInterface(javaInterfaceFactory.createJavaInterface(AsyncResponseHandler.class)); + interfaceContract.setInterface(javaInterfaceFactory.createJavaInterface(AsyncResponseService.class)); } catch (InvalidInterfaceException e1) { // Nothing to do here - will not happen } // end try @@ -647,6 +713,21 @@ private boolean isAsyncInvocation(Invocable source) { } // end for return false; } // end isAsyncInvocation + + private boolean supportsNativeAsync(Invocable source) { + if (!(source instanceof RuntimeEndpointReference)) + return false; + RuntimeEndpointReference epr = (RuntimeEndpointReference)source; + + // TODO - need to update this once BindingProvider interface is refactored to contain + // supportsNativeAsync directly... + ReferenceBindingProvider provider = epr.getBindingProvider(); + if( provider instanceof EndpointReferenceAsyncProvider ) { + return ((EndpointReferenceAsyncProvider)provider).supportsNativeAsync(); + } else { + return false; + } // end if + } // end method supportsNativeAsync /** * Return the synchronous method that is the equivalent of an async method diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponseHandlerImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponseHandlerImpl.java index aa9cf4ad48..1e49767880 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponseHandlerImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponseHandlerImpl.java @@ -144,7 +144,9 @@ public List getRequiredIntents() { public void setExtensionType(ExtensionType type) {} - public void setFault(AsyncFaultWrapper e) {} + public void setWrappedFault(AsyncFaultWrapper e) {} + + public void setFault(Throwable e) {} public void setResponse(V res) { } @@ -181,7 +183,7 @@ public Message invoke(Message msg) { response = payload; } // end if if( response.getClass().equals(AsyncFaultWrapper.class)) { - future.setFault((AsyncFaultWrapper) response ); + future.setWrappedFault((AsyncFaultWrapper) response ); } else { future.setResponse(response); } // end if diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/InvocationChainImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/InvocationChainImpl.java index fff5fb3991..0e4d4344d2 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/InvocationChainImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/InvocationChainImpl.java @@ -75,7 +75,7 @@ public void addInterceptor(Interceptor interceptor) { } String phase = forReference ? Phase.REFERENCE : Phase.SERVICE; addInterceptor(phase, interceptor); - } + } // end method addInterceptor public void addInvoker(Invoker invoker) { if (invoker instanceof PhasedInterceptor) { @@ -94,38 +94,13 @@ public Invoker getHeadInvoker() { } public Invoker getTailInvoker() { - // *** int nodeCount = nodes.size(); if( nodeCount > 0 ) { return nodes.get( nodeCount - 1).getInvoker(); } // end if - // *** - // find the tail invoker - Invoker next = getHeadInvoker(); - Invoker tail = null; - while (next != null){ - tail = next; - if (next instanceof Interceptor){ - // TODO - hack to get round SCA binding optimization - // On the reference side this loop will go all the way - // across to the service invoker so stop looking if we find - // an invoker with no "previous" pointer. This will be the point - // where the SCA binding invoker points to the head of the - // service chain - if (!(next instanceof InterceptorAsync) || - ((InterceptorAsyncImpl)next).isLocalSCABIndingInvoker()){ - break; - } - - next = ((Interceptor)next).getNext(); - } else { - next = null; - } - } - - return tail; - } + return null; + } // end method getTailInvoker public Invoker getHeadInvoker(String phase) { int index = phaseManager.getAllPhases().indexOf(phase); @@ -269,4 +244,70 @@ public boolean isAsyncInvocation() { return isAsyncInvocation; } + public void addHeadInterceptor(Interceptor interceptor) { + String phase = forReference ? Phase.REFERENCE : Phase.SERVICE_BINDING; + if (interceptor instanceof PhasedInterceptor) { + PhasedInterceptor pi = (PhasedInterceptor)interceptor; + if (pi.getPhase() != null) { + phase = pi.getPhase(); + } // end if + } // end if + + addHeadInterceptor(phase, interceptor); + } // end method addHeadInterceptor + + public void addHeadInterceptor(String phase, Interceptor interceptor) { + // TODO Auto-generated method stub + Invoker invoker = (Invoker)interceptor; + + int index = phaseManager.getAllPhases().indexOf(phase); + if (index == -1) { + throw new IllegalArgumentException("Invalid phase name: " + phase); + } // end if + Node node = new Node(index, invoker); + + ListIterator li = nodes.listIterator(); + Node before = null, after = null; + boolean found = false; + while (li.hasNext()) { + before = after; + after = li.next(); + // Look for the first node with a phase index equal to or greater than the one provided + if (after.getPhaseIndex() >= index) { + // Move back + li.previous(); + li.add(node); + found = true; + break; + } + } + if (!found) { + // Add to the end + nodes.add(node); + before = after; + after = null; + } + + // Relink the interceptors + if (before != null) { + if (before.getInvoker() instanceof Interceptor) { + ((Interceptor)before.getInvoker()).setNext(invoker); + if ((invoker instanceof InterceptorAsync) && + (before.getInvoker() instanceof InvokerAsyncResponse)) { + ((InterceptorAsync) invoker).setPrevious((InvokerAsyncResponse)before.getInvoker()); + } + } + } + if (after != null) { + if (invoker instanceof Interceptor) { + ((Interceptor)invoker).setNext(after.getInvoker()); + if ((after.getInvoker() instanceof InterceptorAsync) && + (invoker instanceof InvokerAsyncResponse)){ + ((InterceptorAsync) after.getInvoker()).setPrevious((InvokerAsyncResponse)invoker); + } + } + } + + } // end method addHeadInterceptor + } diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java index afdad37e2d..df378e55a0 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java @@ -314,7 +314,7 @@ protected Object invoke(InvocationChain chain, Object[] args, Invocable source, * @param newMsg * @param oldMsg */ - private void transferMessageHeaders( Message newMsg, Message oldMsg ) { + protected void transferMessageHeaders( Message newMsg, Message oldMsg ) { if( oldMsg == null ) return; // For the present, simply copy all the headers if( !oldMsg.getHeaders().isEmpty() ) newMsg.getHeaders().putAll( oldMsg.getHeaders() ); diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKProxyFactory.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKProxyFactory.java index f072d66227..7109dad1fd 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKProxyFactory.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKProxyFactory.java @@ -24,7 +24,9 @@ import java.lang.reflect.Proxy; import java.security.AccessController; import java.security.PrivilegedAction; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.concurrent.Future; import javax.xml.ws.AsyncHandler; From 7d51f91388c1558d222bb7e17835180b3ab9568e Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Tue, 11 Jan 2011 14:15:07 +0000 Subject: [PATCH 026/157] Add capability to support Bindings that support Async invocations natively - as under TUSCANY-3801 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057650 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/invocation/InvocationChain.java | 31 ++++++++++++----- .../provider/OptimisingBindingProvider.java | 34 +++++++++++++++++++ .../runtime/RuntimeComponentReference.java | 6 ++++ 3 files changed, 62 insertions(+), 9 deletions(-) create mode 100644 modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OptimisingBindingProvider.java diff --git a/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/InvocationChain.java b/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/InvocationChain.java index 1d38ec7101..b7e26d68eb 100644 --- a/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/InvocationChain.java +++ b/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/InvocationChain.java @@ -60,15 +60,35 @@ public interface InvocationChain { void setSourceOperation(Operation operation); /** - * Adds an interceptor to the chain. For reference side, it will be added to + * Adds an interceptor to the end of the chain. For reference side, it will be added to * Phase.REFERENCE. For service side, it will be added to Phase.SERVICE * * @param interceptor The interceptor to add */ void addInterceptor(Interceptor interceptor); + + /** + * Add an interceptor to the end of the given phase + * @param phase - the phase + * @param interceptor - the interceptor + */ + void addInterceptor(String phase, Interceptor interceptor); + + /** + * Adds an interceptor to the head of the chain + * @param interceptor - the interceptor + */ + void addHeadInterceptor(Interceptor interceptor); + + /** + * Adds an interceptor to the head of the given phase + * @param phase - the phase + * @param interceptor - the interceptor + */ + void addHeadInterceptor(String phase, Interceptor interceptor); /** - * Adds an invoker to the chain + * Adds an invoker to the end of the chain * * @param invoker The invoker to add */ @@ -95,13 +115,6 @@ public interface InvocationChain { */ Invoker getHeadInvoker(String phase); - /** - * Add an interceptor to the given phase - * @param phase - * @param interceptor - */ - void addInterceptor(String phase, Interceptor interceptor); - /** * Indicate if the data can be passed in by reference as they won't be mutated. * @return true if pass-by-reference is allowed diff --git a/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OptimisingBindingProvider.java b/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OptimisingBindingProvider.java new file mode 100644 index 0000000000..57c9b48349 --- /dev/null +++ b/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/OptimisingBindingProvider.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.provider; + +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; + +/** + * Defines the extra operation that binding providers implement + * when they provide local optimisation of reference to service invocations + */ +public interface OptimisingBindingProvider { + /** + * Optimise the binding chain for a service endpoint + */ + void optimiseBinding( RuntimeEndpoint ep ); + +} // end interface OptimisingBindingProvider diff --git a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java index 8abecee0bf..5dc114ade0 100644 --- a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java +++ b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java @@ -35,4 +35,10 @@ public interface RuntimeComponentReference extends ComponentReference { * @param component */ void setComponent(RuntimeComponent component); + + /** + * Get the owning component + * @return the owning component + */ + RuntimeComponent getComponent(); } From 66208a48ba3981ca4f2826cd676f5324f499bc7f Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Tue, 11 Jan 2011 14:16:43 +0000 Subject: [PATCH 027/157] Complete enablement of the JMS Binding to deal with Async invocations - as under TUSCANY-3809 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057651 13f79535-47bb-0310-9956-ffa450edef68 --- .../jms/headers/HeaderServiceInterceptor.java | 9 +++++++- .../JMSBindingAsyncResponseInvoker.java | 3 ++- .../JMSBindingServiceBindingProvider.java | 4 ++-- .../TransportServiceInterceptor.java | 21 +++++++++++-------- .../AsyncResponseDestinationInterceptor.java | 18 ++++++++++++++-- 5 files changed, 40 insertions(+), 15 deletions(-) diff --git a/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderServiceInterceptor.java b/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderServiceInterceptor.java index 6dac182d9a..6f1c6ed10e 100644 --- a/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderServiceInterceptor.java +++ b/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderServiceInterceptor.java @@ -24,6 +24,9 @@ import org.apache.tuscany.sca.binding.jms.JMSBinding; import org.apache.tuscany.sca.binding.jms.JMSBindingException; +import org.apache.tuscany.sca.binding.jms.provider.JMSMessageProcessor; +import org.apache.tuscany.sca.binding.jms.provider.JMSMessageProcessorUtil; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.Interceptor; @@ -34,10 +37,12 @@ public class HeaderServiceInterceptor extends InterceptorAsyncImpl { private Invoker next; private JMSBinding jmsBinding; + private JMSMessageProcessor responseMessageProcessor; - public HeaderServiceInterceptor(JMSBinding jmsBinding) { + public HeaderServiceInterceptor(ExtensionPointRegistry extensions, JMSBinding jmsBinding) { super(); this.jmsBinding = jmsBinding; + this.responseMessageProcessor = JMSMessageProcessorUtil.getResponseMessageProcessor(extensions, jmsBinding); } public Message invoke(Message msg) { @@ -72,6 +77,8 @@ public Message invokeResponse(Message tuscanyMsg) { Operation operation = tuscanyMsg.getOperation(); String operationName = operation.getName(); + + responseMessageProcessor.setOperationName(operationName, jmsMsg); for (String propName : jmsBinding.getPropertyNames()) { Object value = jmsBinding.getProperty(propName); diff --git a/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingAsyncResponseInvoker.java b/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingAsyncResponseInvoker.java index f07e9de29f..1df3403451 100644 --- a/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingAsyncResponseInvoker.java +++ b/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingAsyncResponseInvoker.java @@ -38,6 +38,7 @@ public JMSBindingAsyncResponseInvoker(ExtensionPointRegistry extensionPoints, } // end constructor public void invokeAsyncResponse(Message msg) { - // TODO + // Deliberately left null since in JMS the TransportServiceInterceptor does all the work } // end method invokeAsyncResponse + } // end class JMSBindingAsyncResponseInvoker \ No newline at end of file diff --git a/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java b/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java index b96376eb15..2fdbf2afbe 100644 --- a/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java +++ b/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java @@ -205,11 +205,11 @@ public void configure() { bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT, new CallbackDestinationInterceptor(endpoint)); - bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT, new HeaderServiceInterceptor(jmsBinding)); + bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT, new HeaderServiceInterceptor(registry, jmsBinding)); // add async response interceptor after header interceptor bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT, - new AsyncResponseDestinationInterceptor(endpoint)); + new AsyncResponseDestinationInterceptor(endpoint, registry) ); // add request wire format bindingChain.addInterceptor(requestWireFormatProvider.getPhase(), diff --git a/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java b/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java index df8f33bac3..266f02b9f1 100644 --- a/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java +++ b/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java @@ -210,10 +210,11 @@ public Message processResponse(Message msg) { JMSBindingContext context = msg.getBindingContext(); try { Session session = context.getJmsResponseSession(); - javax.jms.Message requestJMSMsg = context.getJmsMsg(); + //javax.jms.Message requestJMSMsg = context.getJmsMsg(); javax.jms.Message responseJMSMsg = msg.getBody(); - Destination replyDest = requestJMSMsg.getJMSReplyTo(); + //Destination replyDest = requestJMSMsg.getJMSReplyTo(); + Destination replyDest = context.getReplyToDestination(); if (replyDest == null) { if (jmsBinding.getResponseDestinationName() != null) { try { @@ -251,22 +252,24 @@ public Message processResponse(Message msg) { } } + /* if (correlationScheme == null || JMSBindingConstants.CORRELATE_MSG_ID.equalsIgnoreCase(correlationScheme)) { responseJMSMsg.setJMSCorrelationID(requestJMSMsg.getJMSMessageID()); } else if (JMSBindingConstants.CORRELATE_CORRELATION_ID.equalsIgnoreCase(correlationScheme)) { responseJMSMsg.setJMSCorrelationID(requestJMSMsg.getJMSCorrelationID()); - } + } + */ MessageProducer producer = session.createProducer(replyDest); // Set jms header attributes in producer, not message. - int deliveryMode = requestJMSMsg.getJMSDeliveryMode(); - producer.setDeliveryMode(deliveryMode); - int deliveryPriority = requestJMSMsg.getJMSPriority(); - producer.setPriority(deliveryPriority); - long timeToLive = requestJMSMsg.getJMSExpiration(); - producer.setTimeToLive(timeToLive); + //int deliveryMode = requestJMSMsg.getJMSDeliveryMode(); + //producer.setDeliveryMode(deliveryMode); + //int deliveryPriority = requestJMSMsg.getJMSPriority(); + //producer.setPriority(deliveryPriority); + //long timeToLive = requestJMSMsg.getJMSExpiration(); + //producer.setTimeToLive(timeToLive); producer.send((javax.jms.Message)msg.getBody()); diff --git a/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wire/AsyncResponseDestinationInterceptor.java b/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wire/AsyncResponseDestinationInterceptor.java index 43bf090796..0ecee7777c 100644 --- a/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wire/AsyncResponseDestinationInterceptor.java +++ b/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wire/AsyncResponseDestinationInterceptor.java @@ -33,11 +33,14 @@ import org.apache.tuscany.sca.binding.jms.JMSBindingException; import org.apache.tuscany.sca.binding.jms.context.JMSBindingContext; import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.invocation.AsyncResponseInvoker; import org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl; import org.apache.tuscany.sca.invocation.Interceptor; import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.invocation.Message; +import org.apache.tuscany.sca.invocation.MessageFactory; import org.apache.tuscany.sca.policy.Intent; import org.apache.tuscany.sca.runtime.RuntimeComponentService; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; @@ -50,11 +53,13 @@ public class AsyncResponseDestinationInterceptor extends InterceptorAsyncImpl { private Invoker next; private RuntimeComponentService service; private RuntimeEndpoint endpoint; + private ExtensionPointRegistry registry; - public AsyncResponseDestinationInterceptor(RuntimeEndpoint endpoint) { + public AsyncResponseDestinationInterceptor(RuntimeEndpoint endpoint, ExtensionPointRegistry registry) { super(); this.service = (RuntimeComponentService) endpoint.getService(); this.endpoint = endpoint; + this.registry = registry; } public Invoker getNext() { @@ -104,8 +109,11 @@ public Message invokeRequest(Message msg) { // than this interceptor String msgID = (String)msg.getHeaders().get("MESSAGE_ID"); + String operationName = msg.getOperation().getName(); + // Create a response invoker and add it to the message headers - AsyncResponseInvoker respInvoker = new AsyncResponseInvoker(endpoint, null, asyncRespAddr, msgID); + AsyncResponseInvoker respInvoker = + new AsyncResponseInvoker(endpoint, null, asyncRespAddr, msgID, operationName, getMessageFactory()); msg.getHeaders().put("ASYNC_RESPONSE_INVOKER", respInvoker); } catch (JMSException e) { @@ -191,4 +199,10 @@ private boolean isAsync( RuntimeComponentService service ) { } // end while return false; } // end method isAsync + + private MessageFactory getMessageFactory() { + FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); + return modelFactories.getFactory(MessageFactory.class); + } // end method getMessageFactory + } // end class \ No newline at end of file From 3a0706cdde9da948a91781ca8fbac335f7611af6 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Tue, 11 Jan 2011 14:18:49 +0000 Subject: [PATCH 028/157] Complete enablement of the SCA Binding to deal with local Async invocations - as under TUSCANY-3811 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057653 13f79535-47bb-0310-9956-ffa450edef68 --- .../RuntimeSCAReferenceBindingProvider.java | 6 +- .../RuntimeSCAServiceBindingProvider.java | 27 ++++- .../SCABindingAsyncResponseInvoker.java | 23 +++- .../sca/provider/SCABindingInvoker.java | 52 +++++++-- .../SCABindingLocalInvocationInterceptor.java | 109 ++++++++++++++++++ 5 files changed, 202 insertions(+), 15 deletions(-) create mode 100644 modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/SCABindingLocalInvocationInterceptor.java diff --git a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java index dff89b8d79..6bda9f0c2d 100644 --- a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java +++ b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java @@ -63,10 +63,12 @@ public class RuntimeSCAReferenceBindingProvider implements EndpointReferenceAsyn private Mediator mediator; private InterfaceContractMapper interfaceContractMapper; private SCABindingMapper scaBindingMapper; + private ExtensionPointRegistry registry; public RuntimeSCAReferenceBindingProvider(ExtensionPointRegistry extensionPoints, RuntimeEndpointReference endpointReference) { - this.endpointReference = endpointReference; + this.registry = extensionPoints; + this.endpointReference = endpointReference; this.component = (RuntimeComponent)endpointReference.getComponent(); this.reference = (RuntimeComponentReference)endpointReference.getReference(); this.binding = (SCABinding)endpointReference.getBinding(); @@ -155,7 +157,7 @@ private Invoker getInvoker(RuntimeEndpointReference epr, Operation operation) { // it turns out that the chain source and target operations are the same, and are the operation // from the target, not sure if thats by design or a bug. The SCA binding invoker needs to know // the source and target class loaders so pass in the real source operation in the constructor - return chain == null ? null : new SCABindingInvoker(chain, operation, mediator, passByValue, epr); + return chain == null ? null : new SCABindingInvoker(chain, operation, mediator, passByValue, epr, registry); } } return null; diff --git a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java index 559ee59bc1..f5745f75e3 100644 --- a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java +++ b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java @@ -19,11 +19,16 @@ package org.apache.tuscany.sca.binding.sca.provider; +import java.util.Iterator; + import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.invocation.InvocationChain; import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; +import org.apache.tuscany.sca.invocation.Phase; import org.apache.tuscany.sca.provider.EndpointAsyncProvider; +import org.apache.tuscany.sca.provider.OptimisingBindingProvider; import org.apache.tuscany.sca.provider.ServiceBindingProvider; import org.apache.tuscany.sca.runtime.RuntimeComponentService; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; @@ -36,7 +41,7 @@ * * @version $Rev$ $Date$ */ -public class RuntimeSCAServiceBindingProvider implements EndpointAsyncProvider { +public class RuntimeSCAServiceBindingProvider implements EndpointAsyncProvider, OptimisingBindingProvider { private RuntimeEndpoint endpoint; private RuntimeComponentService service; @@ -112,5 +117,23 @@ public boolean supportsNativeAsync() { public InvokerAsyncResponse createAsyncResponseInvoker() { return new SCABindingAsyncResponseInvoker(null, null); } + + /** + * Handles the optimisation for the service side chain, which provides a mechanism for direct local + * invocation of the service in cases where the component reference is in the same JVM as the + * component service. Effectively, this means skipping any Remote Binding listener and its associated + * binding chain and data binding processors. + * + * This means inserting a SCABindingLocalInvocationInterceptor into the chains for the Endpoint, + * which is placed immediately before the Policy processors (and after any Databinding processors) + */ + public void optimiseBinding(RuntimeEndpoint ep) { + // To optimise, place an SCA binding Local Invocation interceptor at the start of the POLICY phase + // of the service chain... + for (InvocationChain chain : ep.getInvocationChains()) { + chain.addHeadInterceptor( Phase.SERVICE_POLICY, new SCABindingLocalInvocationInterceptor() ); + } // end for + + } // end method optimiseBinding -} +} // end class RuntimeSCAServiceBinding diff --git a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/SCABindingAsyncResponseInvoker.java b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/SCABindingAsyncResponseInvoker.java index 240ba69d62..fb7b6210d6 100644 --- a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/SCABindingAsyncResponseInvoker.java +++ b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/SCABindingAsyncResponseInvoker.java @@ -20,9 +20,11 @@ package org.apache.tuscany.sca.binding.sca.provider; import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.invocation.AsyncResponseInvoker; import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; +import org.oasisopen.sca.ServiceRuntimeException; /** * @version $Rev: 989157 $ $Date: 2010-08-25 16:02:01 +0100 (Wed, 25 Aug 2010) $ @@ -34,8 +36,21 @@ public SCABindingAsyncResponseInvoker(ExtensionPointRegistry extensionPoints, } // TODO - this only works for the local case! - public void invokeAsyncResponse(Message msg) { - RuntimeEndpointReference epr = (RuntimeEndpointReference)msg.getFrom(); - epr.invokeAsyncResponse(msg); - } + @SuppressWarnings("unchecked") + public void invokeAsyncResponse(Message msg) { + AsyncResponseInvoker asyncInvoker = + (AsyncResponseInvoker)msg.getHeaders().get("ASYNC_RESPONSE_INVOKER"); + RuntimeEndpointReference epr; + if( asyncInvoker != null ) { + epr = asyncInvoker.getResponseTargetAddress(); + } else { + epr = (RuntimeEndpointReference)msg.getFrom(); + } // end if + if( epr != null ) { + epr.invokeAsyncResponse(msg); + } else { + throw new ServiceRuntimeException("SCABindingAsyncResponseInvoker - invokeAsyncResponse has null epr"); + } // end if + + } // end method invokeAsyncResponse } \ No newline at end of file diff --git a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/SCABindingInvoker.java b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/SCABindingInvoker.java index 8ea754c8fc..de0b1cfe0e 100644 --- a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/SCABindingInvoker.java +++ b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/SCABindingInvoker.java @@ -19,13 +19,18 @@ package org.apache.tuscany.sca.binding.sca.provider; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.invocation.AsyncResponseInvoker; import org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl; import org.apache.tuscany.sca.databinding.Mediator; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.InvocationChain; import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.invocation.InvokerAsyncRequest; +import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; import org.apache.tuscany.sca.invocation.Message; +import org.apache.tuscany.sca.invocation.MessageFactory; import org.apache.tuscany.sca.invocation.Phase; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; @@ -42,11 +47,13 @@ public class SCABindingInvoker extends InterceptorAsyncImpl { private boolean passByValue; private RuntimeEndpointReference epr; private RuntimeEndpoint ep; + private ExtensionPointRegistry registry; /** - * Construct a SCABindingInvoker that delegates to the service invocaiton chain + * Construct a SCABindingInvoker that delegates to the service invocation chain */ - public SCABindingInvoker(InvocationChain chain, Operation sourceOperation, Mediator mediator, boolean passByValue, RuntimeEndpointReference epr) { + public SCABindingInvoker(InvocationChain chain, Operation sourceOperation, Mediator mediator, + boolean passByValue, RuntimeEndpointReference epr, ExtensionPointRegistry registry) { super(); this.chain = chain; this.mediator = mediator; @@ -55,6 +62,7 @@ public SCABindingInvoker(InvocationChain chain, Operation sourceOperation, Media this.passByValue = passByValue; this.epr = epr; this.ep = (RuntimeEndpoint)epr.getTargetEndpoint(); + this.registry = registry; } /** @@ -87,15 +95,21 @@ public Message processRequest(Message msg){ // Get the message ID String msgID = (String)msg.getHeaders().get("MESSAGE_ID"); + String operationName = msg.getOperation().getName(); + // Create a response invoker and add it to the message headers AsyncResponseInvoker respInvoker = - new AsyncResponseInvoker(ep, null, epr, msgID); + new AsyncResponseInvoker(ep, null, epr, msgID, operationName, getMessageFactory()); + respInvoker.setBindingType("SCA_LOCAL"); msg.getHeaders().put("ASYNC_RESPONSE_INVOKER", respInvoker); } // end if return msg; - } + } // end method processRequest + /** + * Regular (sync) processing of response message + */ public Message processResponse(Message msg){ if (passByValue) { // Note source and target operation swapped so result is in source class loader @@ -108,22 +122,46 @@ public Message processResponse(Message msg){ } // end if } // end if + return msg; + } // end method processResponse + + public void invokeAsyncRequest(Message msg) throws Throwable { + try{ + msg = processRequest(msg); + InvokerAsyncRequest theNext = (InvokerAsyncRequest)getNext(); + if( theNext != null ) theNext.invokeAsyncRequest(msg); + postProcessRequest(msg); + } catch (Throwable e) { + postProcessRequest(msg, e); + } // end try + } // end method invokeAsyncRequest + + public void invokeAsyncResponse(Message msg) { + msg = processResponse(msg); + // Handle async response Relates_To message ID value @SuppressWarnings("unchecked") AsyncResponseInvoker respInvoker = (AsyncResponseInvoker)msg.getHeaders().get("ASYNC_RESPONSE_INVOKER"); - if( respInvoker != null ) { + // TODO - this deals with the Local case only - not distributed + if( respInvoker != null && "SCA_LOCAL".equals(respInvoker.getBindingType()) ) { RuntimeEndpointReference responseEPR = respInvoker.getResponseTargetAddress(); msg.setFrom(responseEPR); String msgID = respInvoker.getRelatesToMsgID(); msg.getHeaders().put("RELATES_TO", msgID); } // end if - return msg; - } // end method processResponse + InvokerAsyncResponse thePrevious = (InvokerAsyncResponse)getPrevious(); + if (thePrevious != null ) thePrevious.invokeAsyncResponse(msg); + } // end method invokeAsyncResponse public boolean isLocalSCABIndingInvoker() { return true; } + + private MessageFactory getMessageFactory() { + FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); + return modelFactories.getFactory(MessageFactory.class); + } // end method getMessageFactory } diff --git a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/SCABindingLocalInvocationInterceptor.java b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/SCABindingLocalInvocationInterceptor.java new file mode 100644 index 0000000000..45933bde63 --- /dev/null +++ b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/SCABindingLocalInvocationInterceptor.java @@ -0,0 +1,109 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.binding.sca.provider; + +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.apache.tuscany.sca.core.invocation.AsyncResponseInvoker; +import org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl; +import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; +import org.apache.tuscany.sca.invocation.Message; +import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; + +/** + * Interceptor used by the SCA Binding on the service side chain to provide a mechanism for optimising + * invocations when the reference and the service involved are both in the same JVM, and thus the need + * to use a transport of any kind is unnecessary. + * + */ +public class SCABindingLocalInvocationInterceptor extends InterceptorAsyncImpl { + private static final Logger logger = Logger.getLogger(SCABindingLocalInvocationInterceptor.class.getName()); + + private Invoker next; + + private boolean skipPrevious; + + public SCABindingLocalInvocationInterceptor() { + super(); + } // end constructor + + public Message invoke(Message msg) { + return next.invoke(msg); + } // end method invoke + + public Invoker getNext() { + return next; + } // end method getNext + + public void setNext(Invoker next) { + this.next = next; + } // end method setNext + + /** + * Process request method is simply a passthrough + */ + public Message processRequest(Message msg) { + return msg ; + } // end method processRequest + + + /** + * Handle an async response + * - deals with the local SCA binding case only (at present) + * - in this case, extract the async response invoker from the message header and call the EPR + * that is present in the invoker, which is in fact the local EPR from which the original forward + * request came + */ + public void invokeAsyncResponse(Message msg) { + @SuppressWarnings("unchecked") + AsyncResponseInvoker respInvoker = + (AsyncResponseInvoker)msg.getHeaders().get("ASYNC_RESPONSE_INVOKER"); + if( respInvoker != null && "SCA_LOCAL".equals(respInvoker.getBindingType()) ) { + // Handle the locally optimised case + RuntimeEndpointReference responseEPR = (RuntimeEndpointReference)respInvoker.getResponseTargetAddress(); + msg.setFrom(responseEPR); + // Handle async response Relates_To message ID value + String msgID = respInvoker.getRelatesToMsgID(); + msg.getHeaders().put("RELATES_TO", msgID); + + // Call the processing on the reference chain directly + responseEPR.invokeAsyncResponse(msg); + + // Prevent the response being processed by the rest of the service chain + return; + } else { + // Carry on processing the response by the rest of the service chain + InvokerAsyncResponse thePrevious = (InvokerAsyncResponse)getPrevious(); + if (thePrevious != null ) thePrevious.invokeAsyncResponse(msg); + return; + } // end if + + } // end method invokeAsyncResponse + + /** + * processResponse is not called during async response handling (all handled by invokeAsyncResponse) + * - this version is a dummy which does nothing. + */ + public Message processResponse(Message msg) { + return msg; + } // end method processResponse + +} // end class From 13650758759c9b318184d9a4539d143836e34748 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Tue, 11 Jan 2011 14:21:27 +0000 Subject: [PATCH 029/157] Separate the Java implementation specific async invocation code from the core code - as in TUSCANY-3786 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057654 13f79535-47bb-0310-9956-ffa450edef68 --- .../JavaAsyncImplementationInvoker.java | 128 ++++++++++++++++-- .../JavaAsyncResponseInvokerImpl.java | 95 +++++++++++++ .../JavaImplementationProvider.java | 15 +- .../java/invocation/ResponseDispatchImpl.java | 25 +++- 4 files changed, 247 insertions(+), 16 deletions(-) create mode 100644 modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncResponseInvokerImpl.java diff --git a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncImplementationInvoker.java b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncImplementationInvoker.java index 97b7570faa..259e3a66ad 100644 --- a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncImplementationInvoker.java +++ b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncImplementationInvoker.java @@ -29,6 +29,9 @@ import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.interfacedef.java.JavaOperation; +import org.apache.tuscany.sca.invocation.InterceptorAsync; +import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.oasisopen.sca.ResponseDispatch; @@ -39,7 +42,7 @@ * implementation instance * */ -public class JavaAsyncImplementationInvoker extends JavaImplementationInvoker { +public class JavaAsyncImplementationInvoker extends JavaImplementationInvoker implements InterceptorAsync { public JavaAsyncImplementationInvoker(Operation operation, Method method, RuntimeComponent component, InterfaceContract interfaceContract) { @@ -53,16 +56,13 @@ public Message invoke(Message msg) { Object payload = msg.getBody(); - Object contextId = null; - - // store the current thread context classloader - // - replace it with the class loader used to load the java class as per SCA Spec + // Save the current thread context classloader ClassLoader tccl = Thread.currentThread().getContextClassLoader(); try { // The following call might create a new conversation, as a result, the msg.getConversationID() might // return a new value - InstanceWrapper wrapper = scopeContainer.getWrapper(contextId); + InstanceWrapper wrapper = scopeContainer.getWrapper(null); Object instance = wrapper.getInstance(); @@ -89,12 +89,8 @@ public Message invoke(Message msg) { ret = method.invoke(instance, (Object[])payload2); - //ret = ((ResponseDispatchImpl)dispatch).get(50, TimeUnit.SECONDS); throw new InvocationTargetException( new AsyncResponseException("AsyncResponse") ); - //scopeContainer.returnWrapper(wrapper, contextId); - - //msg.setBody(ret); } catch (InvocationTargetException e) { Throwable cause = e.getTargetException(); boolean isChecked = false; @@ -104,7 +100,7 @@ public Message invoke(Message msg) { msg.setFaultBody(cause); break; } - } + } // end for if (!isChecked) { if (cause instanceof RuntimeException) { @@ -115,7 +111,7 @@ public Message invoke(Message msg) { } else { throw new ServiceRuntimeException(cause.getMessage(), cause); } - } + } // end if } catch (ObjectCreationException e) { throw new ServiceRuntimeException(e.getMessage(), e); @@ -128,4 +124,110 @@ public Message invoke(Message msg) { return msg; } // end method invoke -} + protected Invoker next; + protected InvokerAsyncResponse previous; + + public void setNext(Invoker next) { + this.next = next; + } + + public Invoker getNext() { + return next; + } + + public void invokeAsyncRequest(Message msg) throws Throwable { + processRequest(msg); + } // end method invokeAsyncRequest + + public void invokeAsyncResponse(Message msg) { + msg = processResponse(msg); + InvokerAsyncResponse thePrevious = (InvokerAsyncResponse)getPrevious(); + if (thePrevious != null ) thePrevious.invokeAsyncResponse(msg); + } // end method invokeAsyncResponse + + public void setPrevious(InvokerAsyncResponse previous) { + this.previous = previous; + } + + public InvokerAsyncResponse getPrevious() { + return previous; + } + + public Message processRequest(Message msg) { + Operation op = this.operation; + Object payload = msg.getBody(); + + // Replace TCCL with the class loader used to load the java class as per SCA Spec + ClassLoader tccl = Thread.currentThread().getContextClassLoader(); + + try { + InstanceWrapper wrapper = scopeContainer.getWrapper(null); + Object instance = wrapper.getInstance(); + + // Set the TCCL to the classloader used to load the implementation class + Thread.currentThread().setContextClassLoader(instance.getClass().getClassLoader()); + + // For an async server method, there is an extra input parameter, which is a DispatchResponse instance + // which is typed by the type of the response + Class responseType = op.getOutputType().getPhysical(); + ResponseDispatch dispatch = ResponseDispatchImpl.newInstance(responseType, msg ); + + Object[] payload2; + if (payload != null && !payload.getClass().isArray()) { + payload2 = new Object[2]; + payload2[0] = payload; + } else { + payload2 = new Object[ ((Object[])payload).length + 1 ]; + for( int i = 0; i < ((Object[])payload).length; i++) { + payload2[i] = ((Object[])payload)[i]; + } // end for + } + payload2[ payload2.length - 1 ] = dispatch; + + method.invoke(instance, (Object[])payload2); + + } catch (InvocationTargetException e) { + Throwable cause = e.getTargetException(); + boolean isChecked = false; + for (DataType d : operation.getFaultTypes()) { + if (d.getPhysical().isInstance(cause)) { + isChecked = true; + // Ignore these errors since they should be returned asynchronously + break; + } + } // end for + + if (!isChecked) { + if (cause instanceof RuntimeException) { + throw (RuntimeException)cause; + } // end if + if (cause instanceof Error) { + throw (Error)cause; + } else { + throw new ServiceRuntimeException(cause.getMessage(), cause); + } // end if + } // end if + + } catch (Exception e) { + throw new ServiceRuntimeException(e.getMessage(), e); + } finally { + // set the tccl + Thread.currentThread().setContextClassLoader(tccl); + } + return msg; + } // end method processRequest + + public Message postProcessRequest(Message msg) { + return msg; + } + + public Message postProcessRequest(Message msg, Throwable e) + throws Throwable { + throw e; + } + + public Message processResponse(Message msg) { + return msg; + } // end method processResponse + +} // end class JavaAsyncImplementationInvoker diff --git a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncResponseInvokerImpl.java b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncResponseInvokerImpl.java new file mode 100644 index 0000000000..e7db583edd --- /dev/null +++ b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncResponseInvokerImpl.java @@ -0,0 +1,95 @@ +package org.apache.tuscany.sca.implementation.java.invocation; + +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; + +import org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper; +import org.apache.tuscany.sca.core.invocation.AsyncResponseHandler; +import org.apache.tuscany.sca.core.invocation.JDKAsyncResponseInvoker; +import org.apache.tuscany.sca.invocation.Message; +import org.oasisopen.sca.ServiceRuntimeException; + +/** + * Class which handles the asynchronous response message from an async service back to the client Java component + * + * This class provides a registration function which permits the reference invoking code to register the Future + * which is used to return the response to the Java component code + */ +public class JavaAsyncResponseInvokerImpl implements JDKAsyncResponseInvoker { + + // Map used to link between async requests and async responses + private ConcurrentMap asyncMessageMap; + + public JavaAsyncResponseInvokerImpl() { + + asyncMessageMap = new ConcurrentHashMap(); + } // end constructor + + /** + * Deal with the asynchronous response message + * @param msg - the response message + * + * The response message must contain a RELATES_TO id, which is used to identify the Future that represents + * the operation yet to complete. The Future is then completed with the content of the message. + * The Future either calls back to the application code, or it is expected that the application is polling + * the Future for its completion. + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + public void invokeAsyncResponse(Message msg) { + // Obtain the Message ID for this message + String relatesID = getMessageRelatesID( msg ); + if( relatesID == null ) + throw new ServiceRuntimeException("JavaAsyncResponseInvoker - response message has no RELATES_TO id"); + + // Look up the response object & remove it from the Map + Object responseHandler = asyncMessageMap.remove(relatesID); + + if( responseHandler == null ) + throw new ServiceRuntimeException("JavaAsyncResponseInvoker - no Future matches the RELATES_TO id: " + relatesID); + + // Invoke the response handler with the content of the message + // - in the case of a Java implementation, the response handler is a Future... + AsyncResponseHandler future = (AsyncResponseHandler) responseHandler; + + Object payload = msg.getBody(); + Object response; + if( payload == null ) { + System.out.println("Returned response message was null"); + } else { + if (payload.getClass().isArray()) { + response = ((Object[])payload)[0]; + } else { + response = payload; + } // end if + if( response.getClass().equals(AsyncFaultWrapper.class)) { + future.setWrappedFault((AsyncFaultWrapper) response ); + } else if ( response instanceof Throwable ) { + future.setFault( (Throwable)response ); + } else { + future.setResponse(response); + } // end if + } // end if + + } // end method invokeAsyncResponse + + /** + * Registers an Async response, which provides an ID which identifies a given response + * and an object which can handle the response + * @param id - the ID + * @param responseHandler - the response handler object + */ + public void registerAsyncResponse( String id, Object responseHandler ) { + // Add the ID/response handler mapping into the table + if( id != null && responseHandler != null ) asyncMessageMap.put(id, responseHandler); + } // end method registerAsyncResponse + + /** + * Extracts the RELATES_TO header from the message + * @param msg - the Tuscany message + * @return - the value of the RELATES_TO header as a String + */ + private String getMessageRelatesID( Message msg ) { + return (String)msg.getHeaders().get("RELATES_TO"); + } // end method getMessageRelatesID + +} // end class JavaAsyncResponseInvoker diff --git a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProvider.java b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProvider.java index d7abd021f6..3bc7a486a5 100644 --- a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProvider.java +++ b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProvider.java @@ -40,6 +40,9 @@ import org.apache.tuscany.sca.interfacedef.java.JavaInterface; import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil; import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.invocation.InvokerAsyncRequest; +import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; +import org.apache.tuscany.sca.provider.ImplementationAsyncProvider; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.RuntimeComponentService; import org.oasisopen.sca.ComponentContext; @@ -48,7 +51,7 @@ /** * @version $Rev$ $Date$ */ -public class JavaImplementationProvider implements ScopedImplementationProvider { +public class JavaImplementationProvider implements ScopedImplementationProvider, ImplementationAsyncProvider { private JavaImplementation implementation; private JavaComponentContextProvider componentContextProvider; private RequestContextFactory requestContextFactory; @@ -166,4 +169,14 @@ public boolean isEagerInit() { return implementation.isEagerInit(); } + public InvokerAsyncRequest createAsyncInvoker(RuntimeComponentService service, Operation operation) { + // createInvoker should automatically create a JavaAsyncImplementationInvoker - if not, then it means + // that the service is not async and the result will be an exception caused by the class cast. + return (InvokerAsyncRequest) createInvoker( service, operation ); + } // end method createAsyncInvoker + + public InvokerAsyncResponse createAsyncResponseInvoker(Operation operation) { + return new JavaAsyncResponseInvokerImpl(); + } // end method createAsyncResponseInvoker + } diff --git a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java index af40d07409..8c1650096a 100644 --- a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java +++ b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java @@ -37,6 +37,7 @@ import org.apache.tuscany.sca.core.factory.ObjectFactory; import org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper; import org.apache.tuscany.sca.core.invocation.AsyncResponseHandler; +import org.apache.tuscany.sca.core.invocation.AsyncResponseInvoker; import org.apache.tuscany.sca.core.invocation.CallbackReferenceObjectFactory; import org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory; import org.apache.tuscany.sca.core.invocation.ProxyFactory; @@ -45,6 +46,7 @@ import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; import org.oasisopen.sca.ResponseDispatch; import org.oasisopen.sca.ServiceReference; +import org.oasisopen.sca.ServiceRuntimeException; /** * Implementation of the ResponseDispatch interface of the OASIS SCA Java API @@ -80,12 +82,16 @@ public class ResponseDispatchImpl implements ResponseDispatch, Serializabl // Service Reference used for the callback private ServiceReference> callbackRef; - private String messageID; + private AsyncResponseInvoker respInvoker; + private String messageID; public ResponseDispatchImpl( Message msg ) { super(); callbackRef = getAsyncCallbackRef( msg ); + respInvoker = (AsyncResponseInvoker)msg.getHeaders().get("ASYNC_RESPONSE_INVOKER"); + //if( respInvoker == null ) throw new ServiceRuntimeException("Async Implementation invoked with no response invoker"); + // TODO - why is WS stuff bleeding into general code? messageID = (String) msg.getHeaders().get(MESSAGE_ID); if (messageID == null){ @@ -122,10 +128,18 @@ public void sendFault(Throwable e) { } else { throw new IllegalStateException("sendResponse() or sendFault() has been called previously"); } // end if + + // Use response invoker if present + if( respInvoker != null ) { + //respInvoker.invokeAsyncResponse(new AsyncFaultWrapper(e)); + respInvoker.invokeAsyncResponse(e); + return; + } // end if + // Now dispatch the response to the callback... AsyncResponseHandler handler = (AsyncResponseHandler) callbackRef.getService(); setResponseHeaders(); - handler.setFault(new AsyncFaultWrapper(e)); + handler.setWrappedFault(new AsyncFaultWrapper(e)); } // end method sendFault /** @@ -145,6 +159,13 @@ public void sendResponse(T res) { } else { throw new IllegalStateException("sendResponse() or sendFault() has been called previously"); } // end if + + // Use response invoker if present + if( respInvoker != null ) { + respInvoker.invokeAsyncResponse(res); + return; + } // end if + // Now dispatch the response to the callback... AsyncResponseHandler handler = (AsyncResponseHandler) callbackRef.getService(); setResponseHeaders(); From 60bc73cbb5d2bb62c924a06c827ce592eb7ce264 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Tue, 11 Jan 2011 23:10:48 +0000 Subject: [PATCH 030/157] Adjust printing of blank lines so the Shell output is clearer git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1057921 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/tuscany/sca/shell/Shell.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java index 0c06af891d..ba4ba8a63f 100644 --- a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java +++ b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java @@ -475,6 +475,7 @@ public Node getNode() { } List read(Object r) throws IOException { + out.println(); out.print(currentDomain + "> "); final String l; if (useJline) { @@ -722,7 +723,6 @@ boolean help(List toks) { } else if ("bye".equalsIgnoreCase(command)) { helpBye(); } - out.println(); return true; } @@ -756,7 +756,6 @@ boolean helpOverview() { if (useJline) out.println("Use Tab key for command and argument completion"); out.println("For detailed help on each command do 'help ', for help of startup options do 'help startup'"); - out.println(); return true; } From 3f84b8e13912ef72eb26b771432c45f3c44dd692 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 12 Jan 2011 08:56:52 +0000 Subject: [PATCH 031/157] Update to create a service proxy directly instead of using the sca client factory api and update testcases for that, and rename package git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058025 13f79535-47bb-0310-9956-ffa450edef68 --- modules/domain-node/pom.xml | 6 -- .../tuscany/sca/{node2 => runtime}/Node.java | 2 +- .../sca/{node2 => runtime}/NodeFactory.java | 6 +- .../impl/DeployedComposite.java | 2 +- .../impl/InstalledContribution.java | 2 +- .../sca/{node2 => runtime}/impl/NodeImpl.java | 38 ++++++++--- .../tuscany/sca/node2/DeployerTestCase.java | 2 + .../tuscany/sca/node2/NodeTestCase.java | 63 ++++++++++++------ .../tuscany/sca/node2/NodeXMLTestCase.java | 2 + ...t-nodes-helloworld-client-2.0-SNAPSHOT.jar | Bin 4708 -> 4779 bytes ...-nodes-helloworld-service-2.0-SNAPSHOT.jar | Bin 4515 -> 4586 bytes .../org/apache/tuscany/sca/shell/Shell.java | 8 +-- .../sca/shell/jline/ServiceCompletor.java | 2 +- .../jline/ServiceOperationCompletor.java | 2 +- 14 files changed, 87 insertions(+), 48 deletions(-) rename modules/domain-node/src/main/java/org/apache/tuscany/sca/{node2 => runtime}/Node.java (99%) rename modules/domain-node/src/main/java/org/apache/tuscany/sca/{node2 => runtime}/NodeFactory.java (97%) rename modules/domain-node/src/main/java/org/apache/tuscany/sca/{node2 => runtime}/impl/DeployedComposite.java (99%) rename modules/domain-node/src/main/java/org/apache/tuscany/sca/{node2 => runtime}/impl/InstalledContribution.java (98%) rename modules/domain-node/src/main/java/org/apache/tuscany/sca/{node2 => runtime}/impl/NodeImpl.java (93%) diff --git a/modules/domain-node/pom.xml b/modules/domain-node/pom.xml index b4980b2105..20d21e0b31 100644 --- a/modules/domain-node/pom.xml +++ b/modules/domain-node/pom.xml @@ -44,12 +44,6 @@ 2.0-SNAPSHOT - - org.apache.tuscany.sca - tuscany-sca-client-impl - 2.0-SNAPSHOT - - org.apache.tuscany.sca tuscany-implementation-java-runtime diff --git a/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/Node.java b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/Node.java similarity index 99% rename from modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/Node.java rename to modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/Node.java index 9a82997a33..5e9d9973c3 100644 --- a/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/Node.java +++ b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/Node.java @@ -17,7 +17,7 @@ * under the License. */ -package org.apache.tuscany.sca.node2; +package org.apache.tuscany.sca.runtime; import java.io.Reader; import java.util.List; diff --git a/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/NodeFactory.java similarity index 97% rename from modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java rename to modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/NodeFactory.java index 999311b05d..2e8e29a05b 100644 --- a/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/NodeFactory.java +++ b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/NodeFactory.java @@ -17,7 +17,7 @@ * under the License. */ -package org.apache.tuscany.sca.node2; +package org.apache.tuscany.sca.runtime; import java.io.IOException; import java.io.InputStream; @@ -40,12 +40,12 @@ import org.apache.tuscany.sca.monitor.ValidationException; import org.apache.tuscany.sca.node.configuration.ContributionConfiguration; import org.apache.tuscany.sca.node.configuration.NodeConfiguration; -import org.apache.tuscany.sca.node2.impl.NodeImpl; import org.apache.tuscany.sca.runtime.ActivationException; import org.apache.tuscany.sca.runtime.CompositeActivator; import org.apache.tuscany.sca.runtime.EndpointRegistry; import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory; import org.apache.tuscany.sca.runtime.RuntimeProperties; +import org.apache.tuscany.sca.runtime.impl.NodeImpl; import org.apache.tuscany.sca.work.WorkScheduler; import org.oasisopen.sca.ServiceRuntimeException; @@ -72,7 +72,7 @@ public static NodeFactory newInstance(Properties config) { * @param dependentContributionURLs optional URLs of dependent contributions * @return a Node with installed contributions */ - public static Node newStandaloneNode(String compositeURI, String contributionURL, String... dependentContributionURLs) { + public static Node createStandaloneNode(String compositeURI, String contributionURL, String... dependentContributionURLs) { try { NodeFactory nodeFactory = newInstance(); EndpointRegistry endpointRegistry = new EndpointRegistryImpl(nodeFactory.extensionPointRegistry, null, null); diff --git a/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/impl/DeployedComposite.java b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/DeployedComposite.java similarity index 99% rename from modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/impl/DeployedComposite.java rename to modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/DeployedComposite.java index 6e31f283ee..dab3309bfd 100644 --- a/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/impl/DeployedComposite.java +++ b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/DeployedComposite.java @@ -17,7 +17,7 @@ * under the License. */ -package org.apache.tuscany.sca.node2.impl; +package org.apache.tuscany.sca.runtime.impl; import java.util.ArrayList; import java.util.HashMap; diff --git a/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/impl/InstalledContribution.java b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/InstalledContribution.java similarity index 98% rename from modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/impl/InstalledContribution.java rename to modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/InstalledContribution.java index d847c8d199..4a8e600c76 100644 --- a/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/impl/InstalledContribution.java +++ b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/InstalledContribution.java @@ -17,7 +17,7 @@ * under the License. */ -package org.apache.tuscany.sca.node2.impl; +package org.apache.tuscany.sca.runtime.impl; import java.util.ArrayList; import java.util.List; diff --git a/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/impl/NodeImpl.java b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java similarity index 93% rename from modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/impl/NodeImpl.java rename to modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java index 15f5e2b18e..2721bf4496 100644 --- a/modules/domain-node/src/main/java/org/apache/tuscany/sca/node2/impl/NodeImpl.java +++ b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java @@ -17,11 +17,10 @@ * under the License. */ -package org.apache.tuscany.sca.node2.impl; +package org.apache.tuscany.sca.runtime.impl; import java.io.File; import java.io.Reader; -import java.net.URI; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -33,6 +32,7 @@ import javax.xml.stream.XMLStreamException; import org.apache.tuscany.sca.assembly.Composite; +import org.apache.tuscany.sca.assembly.Endpoint; import org.apache.tuscany.sca.common.java.io.IOHelper; import org.apache.tuscany.sca.contribution.Artifact; import org.apache.tuscany.sca.contribution.Contribution; @@ -42,14 +42,13 @@ import org.apache.tuscany.sca.deployment.Deployer; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.ValidationException; -import org.apache.tuscany.sca.node2.Node; -import org.apache.tuscany.sca.node2.NodeFactory; import org.apache.tuscany.sca.runtime.ActivationException; import org.apache.tuscany.sca.runtime.CompositeActivator; import org.apache.tuscany.sca.runtime.EndpointRegistry; -import org.oasisopen.sca.NoSuchDomainException; +import org.apache.tuscany.sca.runtime.Node; +import org.apache.tuscany.sca.runtime.NodeFactory; +import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.oasisopen.sca.NoSuchServiceException; -import org.oasisopen.sca.client.SCAClientFactory; public class NodeImpl implements Node { @@ -61,6 +60,8 @@ public class NodeImpl implements Node { private ExtensionPointRegistry extensionPointRegistry; private NodeFactory nodeFactory; + private static Map allNodes = new HashMap(); + public NodeImpl(String domainName, Deployer deployer, CompositeActivator compositeActivator, EndpointRegistry endpointRegistry, ExtensionPointRegistry extensionPointRegistry, NodeFactory nodeFactory) { this.domainName = domainName; this.deployer = deployer; @@ -68,6 +69,7 @@ public NodeImpl(String domainName, Deployer deployer, CompositeActivator composi this.endpointRegistry = endpointRegistry; this.extensionPointRegistry = extensionPointRegistry; this.nodeFactory = nodeFactory; + allNodes.put(domainName, this); } public String installContribution(String contributionURL) throws ContributionReadException, ActivationException, ValidationException { @@ -254,15 +256,25 @@ public void stop() { if (nodeFactory != null) { nodeFactory.stop(); } + allNodes.remove(this.domainName); } public T getService(Class interfaze, String serviceURI) throws NoSuchServiceException { - try { - return SCAClientFactory.newInstance(URI.create(getDomainName())).getService(interfaze, serviceURI); - } catch (NoSuchDomainException e) { - // shouldn't ever happen as we know this is the domain so it must exist - throw new IllegalStateException(e); + + List endpoints = endpointRegistry.findEndpoint(serviceURI); + if (endpoints.size() < 1) { + throw new NoSuchServiceException(serviceURI); + } + + String serviceName = null; + if (serviceURI.contains("/")) { + int i = serviceURI.indexOf("/"); + if (i < serviceURI.length()-1) { + serviceName = serviceURI.substring(i+1); + } } + + return ((RuntimeComponent)endpoints.get(0).getComponent()).getServiceReference(interfaze, serviceName).getService(); } public String getDomainName() { @@ -357,5 +369,9 @@ protected String getDefaultContributionURI(String contributionURL) { public EndpointRegistry getEndpointRegistry() { return endpointRegistry; } + + public static Node nodeExists(String domainName) { + return allNodes.get(domainName); + } } diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java index 40509337c8..6d4467a895 100644 --- a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java @@ -34,6 +34,8 @@ import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.ValidationException; import org.apache.tuscany.sca.runtime.ActivationException; +import org.apache.tuscany.sca.runtime.Node; +import org.apache.tuscany.sca.runtime.NodeFactory; import org.junit.Test; import org.oasisopen.sca.NoSuchDomainException; import org.oasisopen.sca.NoSuchServiceException; diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java index 6637f05979..2fd1cb7a4e 100644 --- a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java @@ -25,13 +25,17 @@ import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.monitor.ValidationException; -import org.apache.tuscany.sca.node2.impl.NodeImpl; import org.apache.tuscany.sca.runtime.ActivationException; +import org.apache.tuscany.sca.runtime.Node; +import org.apache.tuscany.sca.runtime.NodeFactory; +import org.apache.tuscany.sca.runtime.impl.NodeImpl; import org.junit.Ignore; import org.junit.Test; import org.oasisopen.sca.NoSuchDomainException; import org.oasisopen.sca.NoSuchServiceException; +import sample.Helloworld; + public class NodeTestCase { @Test @@ -39,8 +43,30 @@ public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainE Node node = NodeFactory.newInstance().createNode("default"); node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true); -// Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); -// Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); + Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); + Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); + } + + @Test + public void testStopStart() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { + Node node = NodeFactory.newInstance().createNode("default"); + node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true); + String ci = node.getStartedCompositeURIs("helloworld").get(0); + + Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); + Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); + + node.stop("helloworld", ci); + try { + node.getService(Helloworld.class, "HelloworldComponent"); + Assert.fail(); + } catch (NoSuchServiceException e) { + // expected as there is no deployables + } + + node.start("helloworld", ci); + helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); + Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); } @Test @@ -50,8 +76,8 @@ public void testInstallWithDependent() throws NoSuchServiceException, Contributi node.installContribution("store", "../../itest/T3558/src/test/resources/sample-store.jar", null, null, true); node.installContribution("store-client", "../../itest/T3558/src/test/resources/sample-store-client.jar", null, null, true); -// Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); -// Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); + Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); + Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); } @Test @@ -59,17 +85,16 @@ public void testInstallNoDeployable() throws NoSuchServiceException, NoSuchDomai Node node = NodeFactory.newInstance().createNode("default"); node.installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); -// SCAClientFactory scaClientFactory = node.getSCAClientFactory(); -// try { -// scaClientFactory.getService(Helloworld.class, "HelloworldComponent"); -// Assert.fail(); -// } catch (NoSuchServiceException e) { -// // expected as there is no deployables -// } + try { + node.getService(Helloworld.class, "HelloworldComponent"); + Assert.fail(); + } catch (NoSuchServiceException e) { + // expected as there is no deployables + } node.start("helloworld", "helloworld.composite"); -// Helloworld helloworldService = scaClientFactory.getService(Helloworld.class, "HelloworldComponent"); -// Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); + Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); + Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); } @Test @@ -100,7 +125,7 @@ public void testRemoveComposte() throws NoSuchServiceException, NoSuchDomainExce } @Test - public void testInstallWithMetaData() throws ContributionReadException, ActivationException, ValidationException { + public void testInstallWithMetaData() throws ContributionReadException, ActivationException, ValidationException, NoSuchServiceException { Node node = NodeFactory.newInstance().createNode("default"); ((NodeImpl)node).installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar", "src/test/resources/sca-contribution-generated.xml", null, true); @@ -108,8 +133,8 @@ public void testInstallWithMetaData() throws ContributionReadException, Activati Assert.assertEquals(1, dcs.size()); Assert.assertEquals("helloworld.composite", dcs.get(0)); -// Helloworld helloworldService = scaClientFactory.getService(Helloworld.class, "HelloworldComponent"); -// Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); + Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); + Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); } @Test @@ -121,7 +146,7 @@ public void testURI() throws NoSuchServiceException, NoSuchDomainException, Cont @Test public void testStaticCreate() { - Node node = NodeFactory.newStandaloneNode("helloworld.composite", "src/test/resources/sample-helloworld.jar"); + Node node = NodeFactory.createStandaloneNode("helloworld.composite", "src/test/resources/sample-helloworld.jar"); List cs = node.getInstalledContributionURIs(); Assert.assertEquals(1, cs.size()); List dcs = node.getStartedCompositeURIs(cs.get(0)); @@ -131,7 +156,7 @@ public void testStaticCreate() { @Test public void testStaticCreateWithNullComposite() { - Node node = NodeFactory.newStandaloneNode(null, "src/test/resources/sample-helloworld.jar"); + Node node = NodeFactory.createStandaloneNode(null, "src/test/resources/sample-helloworld.jar"); List cs = node.getInstalledContributionURIs(); Assert.assertEquals(1, cs.size()); List dcs = node.getStartedCompositeURIs(cs.get(0)); diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java index 5e265a0c8a..694b0b6f6a 100644 --- a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java @@ -25,6 +25,8 @@ import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.monitor.ValidationException; import org.apache.tuscany.sca.runtime.ActivationException; +import org.apache.tuscany.sca.runtime.Node; +import org.apache.tuscany.sca.runtime.NodeFactory; import org.junit.Test; public class NodeXMLTestCase { diff --git a/modules/domain-node/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar b/modules/domain-node/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar index 3e9ae79a413cca2fcfb398156d878c76c4becd98..7f6073ce7f574016af08ee095d397c972cdbb384 100644 GIT binary patch delta 1530 zcmY+Ec{G#@7{_C} z7z{3&48~kEV-htn3XN2@%6{(Ey|>QkpZ9s+_mAIu-gBPwOlUvE*WL$ZwgLbk35cOI zkD71OOoHk`0}|w-77aU;CR=Oa03klgt%d^faD_x##DGRW$xV%szahSG`#^KB~ zHeYe$Tk0`<-;GnjUN4O4P3f<>HCG%ztcDsg*3n{vh)Y)`vP<`$BD?y=N^-8h`)vJu zsKHCCntvKAkW;4a8hoz!OgGd?&e$uY5~IS&tM>^1O1hbJQUyQftTm)pg8-e)2kutW zmZxMIO5RIK`5CI)1Ydj2)$qILx~dSKmacFuiWM(z%FBF7n75|jU-Tsjijsc z0uptVs%{-VH2q$$JLWGlzl8*+wbA~bc(op6Qj7-E!XU-PP8o87-z;j-=@L9M0#r_wy&#aWe{CH)luV{ z4m&(;@|xaMrkgS{ECHD@?m-{d}N3{19Moh+pE>ag9-&* z?yU}@FmcWV%dEYd{SldUzVyuUQ1H9tPO1DI*iyD(Rh0jQ@cfWH3ZB`Jh5M)YG$;LL z9M9f9xf$CoIfNj_R#!^8hIXyYk;G1IkNWO$N=TFJYa z4H$s!A_`I0il@3R!K)!C6tqL5!OKuPuftW4h43-RtvW8>=F%zV%S|p*;Q8Ci@~Bq)g|$)ooCICg zwtpn>h(Ec`nV!{0{WF&%l5X*~>yJ2U!JR;gR*;S*rXjWPhaC~Jydt;H`ur{#FRfpn zI}8cr)TtG$1(+yRDYuh+Z+{HwhUN}@4R)rmJpC(Ks+F6nVjFgb4CChaxCLHZ0+hK$ zdqVwW80G=!i-c%q$Gy+HhtaslVdHvp*sEpf{qj<5CFMtjmL<<->A?+HzB>DQjp#wd zbO45PycgHeJ!!Lc`eO#qau=@eHgh1kA__Agq{2)!jVx=^BUOvvCXhD0+Ap-ibSz0F z5cp}nFB-3K-d~M6nNVeMX)NP-=()p_QM;x2K{&VoesvB$?D5J+m%RtMcL{c;yg<9h zp{VCeYh0>zXFFqeorQl7d(5c#fy9jQT+uD!CHr;HqfNWkf>up5h{^XedV-YDcH3@6 z?>L4;)w6S=0ry_VL{dNq=>9~Q;1R&udYZNn{l%FXwz^K83jFHS@m}#0aV3!$^pNU6 zuwHD;+R)<6R*(a9^E#JK8<})^7=}2>sG6o%JcpnRBBmcyKiMsjCQ6JXufm~nffs7^vJ_ihbWMgf1p}EdwYM{ z+9RZ+9SeFm@?mBYW0boZcch9_GRTfGq|9%7FG}P67Z3sBhL15NZQew59$X zzAd)_WO>xON)-qEuE3&mldDcI2r;&};QxpI@bD(|#3oebCn&TRt??659g_o7-9&!Z zAIMBJ4vIj_fc{V-`Uorw0nH=yptop!82?*q4Y|qcfd?V7Y#fY&f-cM2LgsQsBpt+9UT$|TBU!%mbiFP z2v?j}ASC^$y%dksSaR)rQSs)WMY*$}T1nP-qM?eJbCa%)a!kiO6ehn1weRhWocDpu z;71oCoQHEbr2`(t`fYah)x&Fk0I4kO4ZiUMzJKP}SW-;V>ZTH0<{i9uI8-5-&pnIU zSWW=$-GJJTj{&z1?kNCv);3?FsBPPjd(ENJWpuO|-BZ3vdK-}L0rV&G>p6TmfTS#*&iRE?0DBIwoD;T8GKu& zaeq34r#QP?KW6Z>e0W$US$vzq`T?%j$xWQa>x8~muuPsk^n0A#%m67jDu%C(c0Nd~ zaJgbJnyjM=H#Wz1nFe#Q6**ay<(`)arJ~Cr-PAOwYhhfA4e2asPHJKOco~oV$6q*| z1cAFduBplhi$Ir6ng#1SQmEX7iW^}9)qkM$ZILE&@44ZT$$4}>pMRczWYfus<+?I zzOdVy^Rw#@QFML=^n8RTQK2+ggH>QR2x-qNdKGGI2d)toYAb7Q2@o#QVsQy{L=8$} zKu{WgIz^F{l2(h=*3w10M+M$!#15r3F+hRnOXSNkyL*7OXpb1RF#B90G6=h&IALH= z`WLJTj@Pwt6nG0l(naS9g=CEl*G?l*=yzH)8w+ZXWWz@ERJU}pibWu0_Tc04q{={y4=yi>Kt9HJJZt|3&zjNk8W{=pmiZ-mR@5mo%S>kvmW1=^I z0gxKAeF^skCj$xq000O8F>o3?equj{lmY+%$pioZ8vpo3?GC@a*kvuR8jXCtAgu$V%wXolEaxhuC36E?=IXbTzhTV{vIF^4G^o*8bTLEL%02}b9IRWLW1GV*U3@R#2L4H6yeS#% zo$j8Frmj92m^n8L(_l{%F6<<^S2}lubQaFK&Tzba9JSJsd-V%$X~m%=>{B!jOVG}s z8d{1x%dcO5f%Pk!=TGDc#{(|#dKpJ3DXdA6y(PW0vWnanQZwYaOkVi?mQJRys7_P7 z17${U?gjHrh3A^Jv{R=T>cw(28|yoyin&N3MoG^>l=l&Pnv2Y2KhMVMTrJQG8O7IC z(i9JAbuK&A4H%q^;6J9EpW?LNn^-8CPbrXlZMkLV;?NlwTZA)rX4uq-cAKuf62UE! z>4y~OCC8Q^W71)|TQ!3nJ!Q71)mnV6?uwiGMs_e9y1ik*e<{lSVmaO?A0L|N4rSGEl-Tw47`&U|5|eD^-Cp2OiW%h z`*HW(9_l8iicf_j6pbMZ-J=>p zjuwn+#`B$~!X>E7&xY;Ml=6C{GI0+WlR8 zDtW63t}om%y%~KkQ^@RP&2!ODuCYG|=_{%IcBsbM7ipI>s$nrgt~=k4P(~*nsBA=Q zl6CDZ6oUy1UdnjRuQu$DOYC%qT?H51uj_6vAoGW13_ua zIj8lVfn(!(2_;ts)uxJWuj#MWN8Mg>nc}70T-4!t^}vT_c$Sy!4MnCl`v66_Z2Ivq znvryoZHa*#aYcsgASNyi)cS~5L6HCCGHgAU!T@-mD~OfcLzgeywSVtMGMeFh_OvSg z*+ia)!*n;z?(_STw6~b>c)RJ5#D&DMXWnBG0!4H3rs9bV?=}}nZ5>ycp>AQQaaL>1 z)BJw$tsW&N0Xlao^%$kt@NkN&?;tGrflh)#NYI9>=vN_Xp%GH3-ah{%M2r>O-k(Iq znpkJ&u-wvL((mz*Xw`wBJ6+(%J=yBl9zW^ z!OjoXN6E*@?CZ0BEtMLW2_JM)qfDOkFbtImVFupym^;)E!#@|lC1`&9#Vj|mV%LUX zH6_HW1LK3EE{z!#QTrjP*(wC#5;E)I2Nl~Ozkr!qY5Mr}JENFbg76b>oNq$F4d6r3 zV+&$T4-Y5fkuGRG_6(!}qS^v^@?`#JyB)HY-8YgCPiac=!DG>8dUyinL*!pq!X7C{ z&pz0H{LSs?4J}&b3O<;%T;$cRR!$Q6x5q`7)c726aXHDOBlizliiPt7airYYfX(h6 zBscv<4qegRfYDHO%Bv-JCbzYP8_zM5ua08~tdlP03=t~&aeXUhffhkatK!UQF01if zy_{85>IvN2M=KKBBl!Do7@E2HYY@$c%=c5Jsow}pnc&s09eZb4)lhZS zf>$H3Fgr_Vptiq^am|E}NRAQgcF zFC!5UHrRyx3EBn&MKB_G0)YihQ3xnZYTass)l!>57K#WB{cbfuSu_#aA^UCWi#C=< MuWxV{{`I`S0biD#8vpTs7Z_n z4P+ov8stbzYniP?sw5r7f8Qk~D+UTw7rl07XJ(g+tJkK67t}^5xnv*1IRli1Dut|; z>@i;jpV`&rbh3CK1k(w8fO}D(G+2UFV0Q>{%L}??YHK^L5mst1OKyn`&f;u!4)lr| zltd3#8h;u^WrdPfi_PBBhq|W(UTMSzr8OZyhUodzb)H<`!dBEhK`BfRBnh3cJ1PH+*1JTtZlzWQP*`L_nJectLSJmx~F{8>^30XBj{1q zXbeU6XD>7*y*U7HNm#)*B)8_B8>F9?Uj)+8Y06zzGY>b%Z8)9QTXIL0WdF2)vg7@z zSbv;Bk}>!mXGu1LrzF2yKj!chKRm=~p4?`zet_$BdXwbII;FQ2#Obq#{z%fB86f3G z&G5C=&IgGVE>|p1HtVRut<7;RML`y2wdWN=rRZ=-w>2&5Mi@6@Lpn>^lSWv- zUdChp@fS`fLEz4g8>%wGBG6%zX32($lz*x)q2flEK(#3SSfq*Eb76R73Lag|=U?WZ z*mUyFa$TWKd4qJK0(b}hq9?j~J(3O@{14M# z3m2R}mELOji@(sy)!dK`-#V14L=(PoBm`j5z_5tMW|yM?iX<8{p~AmVO9KQ70FxjO z7_)Z-lmQP4000080B}kAIvn>!eO8ki1~`9o>}6vVlmQhHD3wSU;?Yg6skOw;Y?rkE zerLBX(UzCQ&fRz4_ubvq&9-ad9kmfk&e)fD$^d1hY9X5$dnxD9H+FMq)>XuGcF%P879(-J$wC~jBAZ_Hr!JG;F+ItEY z@f6M|ASALw1UvuX5jwsDsVr;^epG(}+*a6IqD}<6z7eMBPu&3%zA8beP0*$7QNSnh!L z#I)i|;@|SYb=f!54+^mwG<8HalYn5tz>Hh@VQ8RDmW%_)Qhw|sOAE*f20wq(A}c2F znw1ZWml9sn=jSvpv-<)T&v3iQ@3JymCsE`! z?zkLoifBuvnXyB=YE_w7aU)7hq>lqOnIb ze`41@^s2_bRXg89H+jm?-x>2Emk-#siZ-mR3)JsKnI(>BGG==H7mymWu?YSJCj$xq z000O8a7p?)O&=#aeF6Xgg#-Wq8~^|S0000000000q=BLVlfD5SlNb+EB?Afo000O8 za7p?)9QQ?iRssM3QUm}19RL6T0000000000q=A!=4xd008xAhIIe{ diff --git a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java index ba4ba8a63f..d45e95e863 100644 --- a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java +++ b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java @@ -46,13 +46,13 @@ import org.apache.tuscany.sca.contribution.Contribution; import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.monitor.ValidationException; -import org.apache.tuscany.sca.node2.Node; -import org.apache.tuscany.sca.node2.NodeFactory; -import org.apache.tuscany.sca.node2.impl.NodeImpl; import org.apache.tuscany.sca.runtime.ActivationException; import org.apache.tuscany.sca.runtime.EndpointRegistry; +import org.apache.tuscany.sca.runtime.Node; +import org.apache.tuscany.sca.runtime.NodeFactory; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.Version; +import org.apache.tuscany.sca.runtime.impl.NodeImpl; import org.apache.tuscany.sca.shell.jline.JLine; /** @@ -405,7 +405,7 @@ boolean start(String curi, String compositeURI) throws ActivationException, Vali boolean start(String nodeName, String compositeURI, String contributionURL, String... dependentContributionURLs) throws ActivationException, ValidationException { - Node node = NodeFactory.newStandaloneNode(compositeURI, contributionURL, dependentContributionURLs); + Node node = NodeFactory.createStandaloneNode(compositeURI, contributionURL, dependentContributionURLs); standaloneNodes.put(nodeName, node); return true; } diff --git a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/ServiceCompletor.java b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/ServiceCompletor.java index 69b8fbd033..d23e04b331 100644 --- a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/ServiceCompletor.java +++ b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/ServiceCompletor.java @@ -25,8 +25,8 @@ import jline.SimpleCompletor; import org.apache.tuscany.sca.assembly.Endpoint; -import org.apache.tuscany.sca.node2.impl.NodeImpl; import org.apache.tuscany.sca.runtime.EndpointRegistry; +import org.apache.tuscany.sca.runtime.impl.NodeImpl; import org.apache.tuscany.sca.shell.Shell; /** diff --git a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/ServiceOperationCompletor.java b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/ServiceOperationCompletor.java index d4e1fc55e4..82e102a904 100644 --- a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/ServiceOperationCompletor.java +++ b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/ServiceOperationCompletor.java @@ -27,9 +27,9 @@ import jline.SimpleCompletor; import org.apache.tuscany.sca.assembly.Endpoint; -import org.apache.tuscany.sca.node2.impl.NodeImpl; import org.apache.tuscany.sca.runtime.EndpointRegistry; import org.apache.tuscany.sca.runtime.RuntimeComponent; +import org.apache.tuscany.sca.runtime.impl.NodeImpl; import org.apache.tuscany.sca.shell.Shell; /** From 7bc064aa4444c37f96c067f467f976d2ad2c546b Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Wed, 12 Jan 2011 14:02:42 +0000 Subject: [PATCH 032/157] Update JavaInterfaceIntrospectorImpl to add checks for @Remotable annotations in illegal locations on methods and on method parameters, as described in TUSCANY-3817 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058146 13f79535-47bb-0310-9956-ffa450edef68 --- .../impl/JavaInterfaceIntrospectorImpl.java | 38 +- .../java/impl/JavaIntrospectionHelper.java | 641 ++++++++++++++++++ 2 files changed, 675 insertions(+), 4 deletions(-) create mode 100644 modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaIntrospectionHelper.java diff --git a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java index a4629333d5..ac12cf6bef 100644 --- a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java +++ b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java @@ -140,10 +140,40 @@ public void introspectInterface(JavaInterface javaInterface, Class clazz) thr for (JavaInterfaceVisitor extension : visitors) { extension.visitInterface(javaInterface); - } - } - - private Class[] getActualTypes(Type[] types, Class[] rawTypes, Map typeBindings) { + } // end for + + // Check if any methods have disallowed annotations + // Check if any private methods have illegal annotations that should be raised as errors + Set methods = JavaIntrospectionHelper.getMethods(clazz); + for (Method method : methods) { + checkMethodAnnotations(method, javaInterface); + } // end for + } // end method introspectInterface + + private void checkMethodAnnotations(Method method, JavaInterface javaInterface) throws InvalidAnnotationException { + for ( Annotation a : method.getAnnotations() ) { + if( a instanceof Remotable ) { + // [JCA90053] @Remotable annotation cannot be on a method that is not a setter method + if( !JavaIntrospectionHelper.isSetter(method) ) { + throw new InvalidAnnotationException("[JCA90053] @Remotable annotation present on an interface method" + + " which is not a Setter method: " + javaInterface.getName() + "/" + method.getName(), Remotable.class); + } // end if + } // end if + } // end for + + // Parameter annotations + for (Annotation[] parmAnnotations : method.getParameterAnnotations()) { + for (Annotation annotation : parmAnnotations) { + if (annotation instanceof Remotable ) { + throw new InvalidAnnotationException("[JCA90053] @Remotable annotation present on an interface method" + + " parameter: " + javaInterface.getName() + "/" + method.getName(), Remotable.class); + } // end if + } // end for + } // end for + method.getParameterAnnotations(); + } // end method checkMethodAnnotations + + private Class[] getActualTypes(Type[] types, Class[] rawTypes, Map typeBindings) { Class[] actualTypes = new Class[types.length]; for (int i = 0; i < actualTypes.length; i++) { actualTypes[i] = getActualType(types[i], rawTypes[i], typeBindings); diff --git a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaIntrospectionHelper.java b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaIntrospectionHelper.java new file mode 100644 index 0000000000..a363c1ff16 --- /dev/null +++ b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaIntrospectionHelper.java @@ -0,0 +1,641 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.interfacedef.java.impl; + +import java.beans.Introspector; +import java.lang.annotation.Annotation; +import java.lang.reflect.AnnotatedElement; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.GenericArrayType; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.lang.reflect.WildcardType; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.oasisopen.sca.ServiceReference; + +/** + * Implements various reflection-related operations + * + * @version $Rev$ $Date$ + */ +public final class JavaIntrospectionHelper { + private static final Logger logger = Logger.getLogger(JavaIntrospectionHelper.class.getName()); + private static final Class[] EMPTY_CLASS_ARRY = new Class[0]; + + /** + * Hide the constructor + */ + private JavaIntrospectionHelper() { + } + + /** + * Returns a collection of public, and protected fields declared by a class + * or one of its supertypes + */ + public static Set getAllPublicAndProtectedFields(Class clazz, boolean validating) { + return getAllPublicAndProtectedFields(clazz, new HashSet(), validating); + } + + private static void checkInvalidAnnotations(AnnotatedElement element) { + for (Annotation a : element.getAnnotations()) { + if (a.annotationType().getName().startsWith("org.oasisopen.sca.annotation.")) { + logger.warning("Invalid annotation " + a + " is found on " + element); + } + } + } + + /** + * Recursively evaluates the type hierarchy to return all fields that are + * public or protected + */ + private static Set getAllPublicAndProtectedFields(Class clazz, Set fields, boolean validating) { + if (clazz == null || clazz.isArray() || Object.class.equals(clazz)) { + return fields; + } + fields = getAllPublicAndProtectedFields(clazz.getSuperclass(), fields, validating); + + Field[] declaredFields = null; + + try { + declaredFields = clazz.getDeclaredFields(); + } catch(Throwable t) { + //TUSCANY-3667 - clazz.getDeclaredFields might fail in GAE environment (log and ignore) + logger.log(Level.WARNING, "Error retrieving declared fields from class : " + t.getMessage()); + } + + if( declaredFields != null ) { + for (final Field field : declaredFields) { + int modifiers = field.getModifiers(); + // The field should be non-final and non-static + if ((Modifier.isPublic(modifiers) || Modifier.isProtected(modifiers)) && !Modifier.isStatic(modifiers) && !Modifier.isFinal(modifiers)) { + // Allow privileged access to set accessibility. Requires ReflectPermission + // in security policy. + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + field.setAccessible(true); // ignore Java accessibility + return null; + } + }); + fields.add(field); + } /*else { + if (validating) { + checkInvalidAnnotations(field); + } + }*/ + } + } + return fields; + } + + /** + * Returns a collection of injectable fields declared by a class + * or one of its supertypes + * + * For now we will include final or static fields so that validation problems can be reported + */ + public static Set getInjectableFields(Class clazz, boolean validating) { + return getInjectableFields(clazz, new HashSet(), validating); + } + + /** + * Recursively evaluates the type hierarchy to return all fields + */ + private static Set getInjectableFields(Class clazz, Set fields, boolean validating) { + if (clazz == null || clazz.isArray() || Object.class.equals(clazz)) { + return fields; + } + + fields = getInjectableFields(clazz.getSuperclass(), fields, validating); + + Field[] declaredFields = null; + + try { + declaredFields = clazz.getDeclaredFields(); + } catch(Throwable t) { + //TUSCANY-3667 - clazz.getDeclaredFields might fail in GAE environment (log and ignore) + logger.log(Level.WARNING, "Error retrieving declared fields from class : " + t.getMessage()); + } + + if( declaredFields != null ) { + for (final Field field : declaredFields) { + int modifiers = field.getModifiers(); + // The field should be non-final and non-static + if (!Modifier.isStatic(modifiers) + // && !Modifier.isFinal(modifiers) + ) { + + // Allow privileged access to set accessibility. Requires ReflectPermission + // in security policy. + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + field.setAccessible(true); // ignore Java accessibility + return null; + } + }); + fields.add(field); + } else { + if (validating) { + checkInvalidAnnotations(field); + } + } + } + } + + + return fields; + } + + /** + * Returns a collection of public and protected methods declared by a class + * or one of its supertypes. Note that overridden methods will not be + * returned in the collection (i.e. only the method override will be).

    + * This method can potentially be expensive as reflection information is not + * cached. It is assumed that this method will be used during a + * configuration phase. + */ + public static Set getAllUniquePublicProtectedMethods(Class clazz, boolean validating) { + return getAllUniqueMethods(clazz, new HashSet(), validating); + } + + /** + * Recursively evaluates the type hierarchy to return all unique methods + */ + private static Set getAllUniqueMethods(Class pClass, Set methods, boolean validating) { + if (pClass == null || pClass.isArray() || Object.class.equals(pClass)) { + return methods; + } + // we first evaluate methods of the subclass and then move to the parent + Method[] declaredMethods = pClass.getDeclaredMethods(); + for (final Method declaredMethod : declaredMethods) { + int modifiers = declaredMethod.getModifiers(); + if ((!Modifier.isPublic(modifiers) && !Modifier.isProtected(modifiers)) || Modifier.isStatic(modifiers)) { + if (validating) { + checkInvalidAnnotations(declaredMethod); + } + continue; + } + if (methods.size() == 0) { + methods.add(declaredMethod); + } else { + List temp = new ArrayList(); + boolean matched = false; + for (Method method : methods) { + // only add if not already in the set from a superclass (i.e. + // the method is not overridden) + if (exactMethodMatch(declaredMethod, method)) { + matched = true; + break; + } + } + if (!matched) { + // Allow privileged access to set accessibility. Requires ReflectPermission + // in security policy. + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + declaredMethod.setAccessible(true); + return null; + } + }); + temp.add(declaredMethod); + } + methods.addAll(temp); + temp.clear(); + } + } + // evaluate class hierarchy - this is done last to track inherited + // methods + methods = getAllUniqueMethods(pClass.getSuperclass(), methods, validating); + return methods; + } + + /** + * Finds the closest matching field with the given name, that is, a field of + * the exact specified type or, alternately, of a supertype. + * + * @param name the name of the field + * @param type the field type + * @param fields the collection of fields to search + * @return the matching field or null if not found + */ + public static Field findClosestMatchingField(String name, Class type, Set fields) { + Field candidate = null; + for (Field field : fields) { + if (field.getName().equals(name)) { + if (field.getType().equals(type)) { + return field; // exact match + } else if (field.getType().isAssignableFrom(type) || (field.getType().isPrimitive() && primitiveAssignable(field + .getType(), + type))) { + // We could have the situation where a field parameter is a + // primitive and the demarshalled value is + // an object counterpart (e.g. Integer and int) + // @spec issue + // either an interface or super class, so keep a reference + // until + // we know there are no closer types + candidate = field; + } + } + } + if (candidate != null) { + return candidate; + } else { + return null; + } + } + + /** + * Finds the closest matching method with the given name, that is, a method + * taking the exact parameter types or, alternately, parameter supertypes. + * + * @param name the name of the method + * @param types the method parameter types + * @param methods the collection of methods to search + * @return the matching method or null if not found + */ + public static Method findClosestMatchingMethod(String name, Class[] types, Set methods) { + if (types == null) { + types = EMPTY_CLASS_ARRY; + } + Method candidate = null; + for (Method method : methods) { + if (method.getName().equals(name) && method.getParameterTypes().length == types.length) { + Class[] params = method.getParameterTypes(); + boolean disqualify = false; + boolean exactMatch = true; + for (int i = 0; i < params.length; i++) { + if (!params[i].equals(types[i]) && !params[i].isAssignableFrom(types[i])) { + // no match + disqualify = true; + exactMatch = false; + break; + } else if (!params[i].equals(types[i]) && params[i].isAssignableFrom(types[i])) { + // not exact match + exactMatch = false; + } + } + if (disqualify) { + continue; + } else if (exactMatch) { + return method; + } else { + candidate = method; + } + } + } + if (candidate != null) { + return candidate; + } else { + return null; + } + } + + /** + * Determines if two methods "match" - that is, they have the same method + * names and exact parameter types (one is not a supertype of the other) + */ + public static boolean exactMethodMatch(Method method1, Method method2) { + if (!method1.getName().equals(method2.getName())) { + return false; + } + Class[] types1 = method1.getParameterTypes(); + Class[] types2 = method2.getParameterTypes(); + if (types1.length != types2.length) { + return false; + } + boolean matched = true; + for (int i = 0; i < types1.length; i++) { + if (types1[i] != types2[i]) { + matched = false; + break; + } + } + return matched; + } + + /** + * Returns the simple name of a class - i.e. the class name devoid of its + * package qualifier + * + * @param implClass the implementation class + */ + public static String getBaseName(Class implClass) { + return implClass.getSimpleName(); + } + + public static boolean isImmutable(Class clazz) { + return String.class == clazz || clazz.isPrimitive() + || Number.class.isAssignableFrom(clazz) + || Boolean.class.isAssignableFrom(clazz) + || Character.class.isAssignableFrom(clazz) + || Byte.class.isAssignableFrom(clazz); + } + + /** + * Takes a property name and converts it to a getter method name according + * to JavaBean conventions. For example, property + * foo is returned as getFoo + */ + public static String toGetter(String name) { + return "get" + name.toUpperCase().substring(0, 1) + name.substring(1); + } + + /** + * Takes a setter or getter method name and converts it to a property name + * according to JavaBean conventions. For example, setFoo(var) + * is returned as property foo + */ + public static String toPropertyName(String name) { + if (!name.startsWith("set")) { + return name; + } + return Introspector.decapitalize(name.substring(3)); + } + + public static Class getErasure(Type type) { + if (type instanceof Class) { + return (Class)type; + } else if (type instanceof GenericArrayType) { + // FIXME: How to deal with the []? + GenericArrayType arrayType = (GenericArrayType)type; + return getErasure(arrayType.getGenericComponentType()); + } else if (type instanceof ParameterizedType) { + ParameterizedType pType = (ParameterizedType)type; + return getErasure(pType.getRawType()); + } else if (type instanceof WildcardType) { + WildcardType wType = (WildcardType)type; + Type[] types = wType.getUpperBounds(); + return getErasure(types[0]); + } else if (type instanceof TypeVariable) { + TypeVariable var = (TypeVariable)type; + Type[] types = var.getBounds(); + return getErasure(types[0]); + } + return null; + } + + public static Class getBaseType(Class cls, Type genericType) { + if (cls.isArray()) { + return cls.getComponentType(); + } else if (Collection.class.isAssignableFrom(cls)) { + if (genericType instanceof ParameterizedType) { + // Collection + ParameterizedType parameterizedType = (ParameterizedType)genericType; + Type baseType = parameterizedType.getActualTypeArguments()[0]; + if (baseType instanceof GenericArrayType) { + // Base is array + return cls; + } else { + return getErasure(baseType); + } + } else { + return cls; + } + } else { + return cls; + } + } + + public static Type getParameterType(Type type) { + if (type instanceof ParameterizedType) { + // Collection + ParameterizedType parameterizedType = (ParameterizedType)type; + Type baseType = parameterizedType.getActualTypeArguments()[0]; + return baseType; + } else { + return Object.class; + } + } + + public static Class getBusinessInterface(Class cls, Type callableReferenceType) { + if (ServiceReference.class.isAssignableFrom(cls) && callableReferenceType instanceof ParameterizedType) { + // Collection + ParameterizedType parameterizedType = (ParameterizedType)callableReferenceType; + Type baseType = parameterizedType.getActualTypeArguments()[0]; + if (baseType instanceof GenericArrayType) { + // Base is array + return cls; + } else { + return getErasure(baseType); + } + } + return Object.class; + } + + /** + * Takes a property name and converts it to a setter method name according + * to JavaBean conventions. For example, the property + * foo is returned as setFoo(var) + */ + public static String toSetter(String name) { + return "set" + name.toUpperCase().substring(0, 1) + name.substring(1); + } + + /** + * Compares a two types, assuming one is a primitive, to determine if the + * other is its object counterpart + */ + private static boolean primitiveAssignable(Class memberType, Class param) { + if (memberType == Integer.class) { + return param == Integer.TYPE; + } else if (memberType == Double.class) { + return param == Double.TYPE; + } else if (memberType == Float.class) { + return param == Float.TYPE; + } else if (memberType == Short.class) { + return param == Short.TYPE; + } else if (memberType == Character.class) { + return param == Character.TYPE; + } else if (memberType == Boolean.class) { + return param == Boolean.TYPE; + } else if (memberType == Byte.class) { + return param == Byte.TYPE; + } else if (param == Integer.class) { + return memberType == Integer.TYPE; + } else if (param == Double.class) { + return memberType == Double.TYPE; + } else if (param == Float.class) { + return memberType == Float.TYPE; + } else if (param == Short.class) { + return memberType == Short.TYPE; + } else if (param == Character.class) { + return memberType == Character.TYPE; + } else if (param == Boolean.class) { + return memberType == Boolean.TYPE; + } else if (param == Byte.class) { + return memberType == Byte.TYPE; + } else { + return false; + } + } + + /** + * Returns the generic types represented in the given type. Usage as + * follows: + * JavaIntrospectionHelper.getGenerics(field.getGenericType()); + *

    + * JavaIntrospectionHelper.getGenerics(m.getGenericParameterTypes()[0];); + * + * @return the generic types in order of declaration or an empty array if + * the type is not genericized + */ + public static List getGenerics(Type genericType) { + List classes = new ArrayList(); + if (genericType instanceof ParameterizedType) { + ParameterizedType ptype = (ParameterizedType)genericType; + // get the type arguments + Type[] targs = ptype.getActualTypeArguments(); + for (Type targ : targs) { + classes.add(targ); + } + } + return classes; + } + + /** + * Returns the generic type specified by the class at the given position as + * in:

    public class Foo{ //.. } + *

    + * JavaIntrospectionHelper.introspectGeneric(Foo.class,1); + *

    + * will return Baz. + */ + public static Class introspectGeneric(Class clazz, int pos) { + assert clazz != null : "No class specified"; + Type type = clazz.getGenericSuperclass(); + if (type instanceof ParameterizedType) { + Type[] args = ((ParameterizedType)type).getActualTypeArguments(); + if (args.length <= pos) { + throw new IllegalArgumentException("Invalid index value for generic class " + clazz.getName()); + } + return (Class)((ParameterizedType)type).getActualTypeArguments()[pos]; + } else { + Type[] interfaces = clazz.getGenericInterfaces(); + for (Type itype : interfaces) { + if (!(itype instanceof ParameterizedType)) { + continue; + } + ParameterizedType interfaceType = (ParameterizedType)itype; + return (Class)interfaceType.getActualTypeArguments()[0]; + } + } + return null; + } + + /** + * Returns the set of interfaces implemented by the given class and its + * ancestors or a blank set if none + */ + public static Set> getAllInterfaces(Class clazz) { + Set> implemented = new HashSet>(); + getAllInterfaces(clazz, implemented); + return implemented; + } + + private static void getAllInterfaces(Class clazz, Set> implemented) { + Class[] interfaces = clazz.getInterfaces(); + for (Class interfaze : interfaces) { + implemented.add(interfaze); + } + Class superClass = clazz.getSuperclass(); + // Object has no superclass so check for null + if (superClass != null && !superClass.equals(Object.class)) { + getAllInterfaces(superClass, implemented); + } + } + + public static boolean isSetter(Method method) { + return (void.class == method.getReturnType() && method.getParameterTypes().length == 1 && method.getName() + .startsWith("set")); + } + + public static boolean isGetter(Method method) { + return (void.class != method.getReturnType() && method.getParameterTypes().length == 0 && method.getName() + .startsWith("get")); + } + + private final static Map, String> signatures = new HashMap, String>(); + static { + signatures.put(boolean.class, "Z"); + signatures.put(byte.class, "B"); + signatures.put(char.class, "C"); + signatures.put(short.class, "S"); + signatures.put(int.class, "I"); + signatures.put(long.class, "J"); + signatures.put(float.class, "F"); + signatures.put(double.class, "D"); + }; + + public static String getSignature(Class cls) { + if (cls.isPrimitive()) { + return signatures.get(cls); + } + if (cls.isArray()) { + return "[" + getSignature(cls.getComponentType()); + } + return "L" + cls.getName().replace('.', '/') + ";"; + } + + public static Class getArrayType(Class componentType, int dims) throws ClassNotFoundException { + StringBuffer buf = new StringBuffer(); + for (int i = 0; i < dims; i++) { + buf.append('['); + } + buf.append(getSignature(componentType)); + return Class.forName(buf.toString(), false, componentType.getClassLoader()); + } + + public static Set getMethods(Class clazz) { + Set methods = new HashSet(); + Method[] declaredMethods = clazz.getDeclaredMethods(); + for (final Method declaredMethod : declaredMethods) { + methods.add(declaredMethod); + } // end for + + return methods; + } // end method getMethods + + public static Set getPrivateFields(Class clazz) { + Set fields = new HashSet(); + Field[] declaredFields = clazz.getDeclaredFields(); + for (final Field declaredField : declaredFields) { + int modifiers = declaredField.getModifiers(); + if(Modifier.isPrivate(modifiers)) { + fields.add(declaredField); + } + } + + return fields; + } +} From 2058145d4d6db73a7cabb31c9978b7c8f03baa05 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Wed, 12 Jan 2011 14:12:58 +0000 Subject: [PATCH 033/157] Re-enabled all OASIS Java CAA testcases, plus updated Tuscany error messages git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058151 13f79535-47bb-0310-9956-ffa450edef68 --- testing/compliance-tests/java-caa/pom.xml | 10 ---------- .../tuscany-oasis-sca-tests-errors.properties | 17 +++++++++++++---- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/testing/compliance-tests/java-caa/pom.xml b/testing/compliance-tests/java-caa/pom.xml index acfe75a243..3a53743afc 100644 --- a/testing/compliance-tests/java-caa/pom.xml +++ b/testing/compliance-tests/java-caa/pom.xml @@ -91,16 +91,6 @@ -Xms256m -Xmx1024m - **/JCA_11021_TestCase.java - - **/JCA_10029_TestCase.java - **/JCA_10030_TestCase.java - **/JCA_10031_TestCase.java - **/JCA_10032_TestCase.java - **/JCA_10033_TestCase.java - **/JCA_10034_TestCase.java - **/JCA_10035_TestCase.java - **/JCA_11022_TestCase.java diff --git a/testing/compliance-tests/java-caa/src/test/resources/tuscany-oasis-sca-tests-errors.properties b/testing/compliance-tests/java-caa/src/test/resources/tuscany-oasis-sca-tests-errors.properties index c388eff7a9..e4fa1c2304 100644 --- a/testing/compliance-tests/java-caa/src/test/resources/tuscany-oasis-sca-tests-errors.properties +++ b/testing/compliance-tests/java-caa/src/test/resources/tuscany-oasis-sca-tests-errors.properties @@ -5,15 +5,19 @@ # 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. +# under the License. +# +# Detailed Tuscany error messages for Java CAA testcases, where the testcase causes an +# exception either in initialization or at runtime +# JCA_1001=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: org.apache.tuscany.sca.interfacedef.InvalidCallbackException: Callback org.oasisopen.sca.test.ServiceRemoteLocalCallback must be remotable on remotable interface org.oasisopen.sca.test.ServiceRemoteLocal JCA_1002=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: org.apache.tuscany.sca.interfacedef.InvalidCallbackException: Callbackorg.oasisopen.sca.test.ServiceLocalRemoteCallback must not be remotable on local interface org.oasisopen.sca.test.ServiceLocalRemote JCA_2001=org.apache.tuscany.sca.interfacedef.OverloadedOperationException: [JCA20001] Cannot overload operation operation1 on org.oasisopen.sca.test.Service1Overload as it is a @Remotable interface @@ -43,6 +47,12 @@ JCA_10011=org.apache.tuscany.sca.contribution.processor.ContributionResolveExcep JCA_10013=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_10013Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent6.qual2 and {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent6.qual1 are mutually exclusive JCA_10014=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.InvalidReferenceException: [JCA90018] @Reference in a Constructor must have a name attributeorg.oasisopen.sca.test.service1ConstrBad JCA_10015=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.InvalidReference +JCA_10029=org.apache.tuscany.sca.interfacedef.InvalidAnnotationException: [JCA90053] @Remotable annotation present on an interface method which is not a Setter method: org.oasisopen.sca.test.ServiceBadRemotableMethod/operation2 +JCA_10030=org.apache.tuscany.sca.interfacedef.InvalidAnnotationException: [JCA90053] @Remotable annotation present on an interface method parameter: org.oasisopen.sca.test.ServiceBadRemotable/operation2 +JCA_10031=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.IllegalCallbackReferenceException: Callback type does not match a service callback interface: org.oasisopen.sca.test.service3ImplBad +JCA_10032=org.apache.tuscany.sca.interfacedef.InvalidOperationException: Method should return 'void' when declared with an @OneWay annotation. public abstract java.lang.String org.oasisopen.sca.test.ServiceOneWayNoVoid.operation2(java.lang.String) +JCA_10033=org.apache.tuscany.sca.interfacedef.InvalidOperationException: Method should not declare exceptions with an @OneWay annotation. public abstract void org.oasisopen.sca.test.ServiceOneWayThrows.operation2(java.lang.String) throws org.oasisopen.sca.test.TestException +JCA_10035=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.introspect.impl.IllegalCallbackReferenceException: [JCA90057] @Callback on field or method cannot be used for a class with @Scope(COMPOSITE): org.oasisopen.sca.test.service3ImplComposite.callback JCA_10046=org.oasisopen.sca.ServiceRuntimeException: [] - [JCA90040] Exception while generating WSDL for TEST_JCA_10046Component1/Unmappable exception was: ***.IllegalAnnotationsException: 4 counts of IllegalAnnotationExceptions JCA_10047=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: [JCA90041] @Scope annotation not allowed on service interface JCA_10048=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: [JCA90042,JCI20002] Implementation missing service method operation2 service interface org.oasisopen.sca.test.Service1Superset @@ -67,4 +77,3 @@ JCA_8006=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oas JCA_8008=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.contribution.processor.ContributionResolveException: Processing composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_8008: Resolving Java implementation: org.oasisopen.sca.test.service1BadPolicySet, [JCA70002,JCA70005] Method that is not an SCA reference cannot have policySet/intent annotations: public java.lang.String org.oasisopen.sca.test.service1BadPolicySet.operation1(java.lang.String) JCA_8009=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.contribution.processor.ContributionResolveException: Processing composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_8009: Resolving Java implementation: org.oasisopen.sca.test.service1BadPolicySet, [JCA70002,JCA70005] Field that is not an SCA reference cannot have policySet/intent annotations: public java.lang.String org.oasisopen.sca.test.service1BadPolicySet.someField JCA_8010=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.contribution.processor.ContributionResolveException: Processing composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_8010: Resolving Java implementation: org.oasisopen.sca.test.service1BadPolicySet, [JCA70002,JCA70005] Constructor parameter that is not an SCA reference cannot have policySet/intent annotations: public org.oasisopen.sca.test.service1BadPolicySet(java.lang.String)[0] - From d741062592b3ae3dab39a0ae8e076714004e2f2d Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 12 Jan 2011 15:24:28 +0000 Subject: [PATCH 034/157] Update to use getService from Node git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058185 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/shell/Shell.java | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java index d45e95e863..00f1626bdb 100644 --- a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java +++ b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java @@ -54,6 +54,7 @@ import org.apache.tuscany.sca.runtime.Version; import org.apache.tuscany.sca.runtime.impl.NodeImpl; import org.apache.tuscany.sca.shell.jline.JLine; +import org.oasisopen.sca.NoSuchServiceException; /** * A little SCA command shell. @@ -218,26 +219,12 @@ boolean installed(final List toks) { return true; } - boolean invoke(final List toks) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException { + boolean invoke(final List toks) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, NoSuchServiceException { String endpointName = toks.get(1); - String serviceName = null; - if (endpointName.contains("/")) { - int i = endpointName.indexOf("/"); - if (i < endpointName.length()-1) { - serviceName = endpointName.substring(i+1); - } - } String operationName = toks.get(2); String params[] = new String[toks.size()- 3]; System.arraycopy(toks.toArray(), 3, params, 0, params.length); - - EndpointRegistry reg = ((NodeImpl)getNode()).getEndpointRegistry(); - List endpoints = reg.findEndpoint(endpointName); - if (endpoints.size() < 1) { - out.println(" no service found: " + endpointName); - return true; - } - Object proxy = ((RuntimeComponent)endpoints.get(0).getComponent()).getServiceReference(null, serviceName).getService(); + Object proxy = getNode().getService(null, endpointName); Object result = invoke(proxy, operationName, params); if (result != null && result.getClass().isArray()) { out.println(Arrays.toString((Object[])result)); From de1c3f692254d37f9ab1eed253ddaad38ea51cec Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 12 Jan 2011 15:25:37 +0000 Subject: [PATCH 035/157] Add setAutoDestroy methdod git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058187 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/node/NodeFactory.java | 3 +++ .../sca/node/impl/NodeFactoryImpl.java | 13 +++++-------- .../sca/node/impl/NodeImplTestCase.java | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java b/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java index 95d1adc92e..86045b014e 100644 --- a/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java +++ b/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java @@ -627,4 +627,7 @@ public static List getNodeFactories() { public abstract T getExtensionPointRegistry(); public abstract void init(); + + public void setAutoDestroy(boolean b) { + } } diff --git a/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java b/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java index 63c5254873..4b8c071855 100644 --- a/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java +++ b/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java @@ -44,13 +44,7 @@ import javax.xml.stream.XMLStreamException; import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentReference; -import org.apache.tuscany.sca.assembly.ComponentService; import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.Endpoint; -import org.apache.tuscany.sca.assembly.EndpointReference; -import org.apache.tuscany.sca.assembly.Implementation; import org.apache.tuscany.sca.common.java.io.IOHelper; import org.apache.tuscany.sca.contribution.Artifact; import org.apache.tuscany.sca.contribution.Contribution; @@ -80,8 +74,6 @@ import org.apache.tuscany.sca.node.configuration.NodeConfiguration; import org.apache.tuscany.sca.node.configuration.NodeConfigurationFactory; import org.apache.tuscany.sca.runtime.DomainRegistryFactory; -import org.apache.tuscany.sca.runtime.EndpointReferenceBinder; -import org.apache.tuscany.sca.runtime.EndpointRegistry; import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory; import org.apache.tuscany.sca.runtime.RuntimeProperties; import org.apache.tuscany.sca.work.WorkScheduler; @@ -477,5 +469,10 @@ public void configure(Map> attributes) { public Deployer getDeployer() { return deployer; } + + @Override + public void setAutoDestroy(boolean b) { + autoDestroy = b; + } } diff --git a/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java b/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java index 3133931210..644b0e662b 100644 --- a/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java +++ b/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java @@ -215,4 +215,23 @@ public void testLoadNodeFactoryProperties() throws Exception { System.out.println(attrs); } } + + @Test + public void testAutoDestroy() throws Exception { + NodeFactory nf = NodeFactory.newInstance(); + Node node = nf.createNode(); + node.start(); + Assert.assertTrue(((NodeFactoryImpl)nf).inited); + node.stop(); + Assert.assertFalse(((NodeFactoryImpl)nf).inited); + + nf = NodeFactory.newInstance(); + nf.setAutoDestroy(false); + node = nf.createNode(); + node.start(); + Assert.assertTrue(((NodeFactoryImpl)nf).inited); + node.stop(); + Assert.assertTrue(((NodeFactoryImpl)nf).inited); + + } } From ab69425eea4a13bdbcb4143dc011216b74b2597a Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Wed, 12 Jan 2011 16:01:37 +0000 Subject: [PATCH 036/157] Fix for the problem in Callback-SeparateThread iTest identified in TUSCANY-3816 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058211 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/itest/EventProcessorServiceImpl.java | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java b/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java index bec98a49c9..0805b96875 100644 --- a/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java +++ b/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java @@ -25,8 +25,11 @@ import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; +import org.oasisopen.sca.ComponentContext; +import org.oasisopen.sca.RequestContext; import org.oasisopen.sca.ServiceReference; import org.oasisopen.sca.annotation.Callback; +import org.oasisopen.sca.annotation.Context; import org.oasisopen.sca.annotation.Destroy; import org.oasisopen.sca.annotation.Scope; import org.oasisopen.sca.annotation.Service; @@ -39,10 +42,21 @@ public class EventProcessorServiceImpl implements EventProcessorService { /** - * Reference to the call back + * Reference to the callback + * + * **NB** This test makes the *DANGEROUS* assumption that there is only one client to + * this component and thus only one callback location. For a "real" COMPOSITE component, + * each client would need to be uniquely identified - this would need to be done using something + * like an ID on the service methods, which could be set by the client and used to identify + * a "session" + */ + private ServiceReference clientCallback = null; + + /** + * Component context (injected) */ - @Callback - protected ServiceReference clientCallback; + @Context + protected ComponentContext componentContext; /** * This map contains the call backs for each of the registered Event names @@ -73,13 +87,21 @@ public EventProcessorServiceImpl() { */ public void registerForEvent(String aEventName) { // Register for the Event - eventListeners.put(aEventName, clientCallback); + eventListeners.put(aEventName, getClientCallback()); // Send the "register" started event to the client receiveEvent(aEventName, "SameThread: Registered to receive notifications for " + aEventName); } - /** + private ServiceReference getClientCallback() { + if(clientCallback == null) { + RequestContext requestContext = componentContext.getRequestContext(); + clientCallback = requestContext.getCallbackReference(); + } + return clientCallback; + } // end method getClientCallback + + /** * Unregisters the client so it no longer receives notifications for the specified event * * @param aEventName The name of the Event to unregister From 776d153eada18da14b3b65f53df8f5d8d4345983 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Wed, 12 Jan 2011 16:11:43 +0000 Subject: [PATCH 037/157] Re-enabling iTest Callback SeparateThread following fix to TUSCANY-3816 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058215 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/pom.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/testing/itest/pom.xml b/testing/itest/pom.xml index 7a8b2d44e2..db9e21c3df 100644 --- a/testing/itest/pom.xml +++ b/testing/itest/pom.xml @@ -45,9 +45,7 @@ callback-basic callback-complex-type callback-multiple-wires - + callback-separatethread callback-two-composites callback-two-nodes component-type From e2840fb52afea1de25921d483fed236028a4f65e Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Wed, 12 Jan 2011 16:55:09 +0000 Subject: [PATCH 038/157] Add some more constants for use in the async processing git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058230 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/tuscany/sca/core/invocation/Constants.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/Constants.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/Constants.java index 3e2a71027d..5534828b8a 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/Constants.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/Constants.java @@ -26,5 +26,6 @@ */ public interface Constants { String MESSAGE_ID = "MESSAGE_ID"; - + String RELATES_TO = "RELATES_TO"; + String ASYNC_RESPONSE_INVOKER = "ASYNC_RESPONSE_INVOKER"; } From 1ec4ff7c3ab2b90ad4029399f01e29741ae1a6ab Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Thu, 13 Jan 2011 14:04:19 +0000 Subject: [PATCH 039/157] Update message to match OASIS git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058566 13f79535-47bb-0310-9956-ffa450edef68 --- .../resources/tuscany-oasis-sca-tests-errors.properties | 1 + .../resources/tuscany-oasis-sca-tests-errors.properties | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/testing/compliance-tests/java-ci/src/test/resources/tuscany-oasis-sca-tests-errors.properties b/testing/compliance-tests/java-ci/src/test/resources/tuscany-oasis-sca-tests-errors.properties index 8d8c93a80e..02fbb475cb 100644 --- a/testing/compliance-tests/java-ci/src/test/resources/tuscany-oasis-sca-tests-errors.properties +++ b/testing/compliance-tests/java-ci/src/test/resources/tuscany-oasis-sca-tests-errors.properties @@ -30,6 +30,7 @@ POJO_8031=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oa POJO_8032=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8032Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}antiSoap and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP are mutually exclusive POJO_8033=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8033Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}antiSoap and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP are mutually exclusive POJO_8035=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8035Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_1 and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_2 are mutually exclusive +POJO_8037=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POJO_8037Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_1 and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_2 are mutually exclusive POJO_9001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POJO_9001, Artifact: Test_POJO_9001.composite] - XMLSchema validation error occured in: Test_POJO_9001.composite ,line = ***, column = ***, Message = cvc-complex-type.3.2.2: Attribute 'interface' is not allowed to appear in element 'implementation.java'. POJO_10001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POJO_10001, Artifact: META-INF/sca-contribution.xml] - [JCI10001] The value of the @package attribute on the element is not unique across all other elements within the contribution. POJO_10004=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: [JCI100007] A Java package org.oasisopen.sca.test;version=1.0.0 that is specified on an export element MUST be contained within the contribution containing the export element. diff --git a/testing/compliance-tests/policy/src/test/resources/tuscany-oasis-sca-tests-errors.properties b/testing/compliance-tests/policy/src/test/resources/tuscany-oasis-sca-tests-errors.properties index 9410c01ff8..adbaff1e0d 100644 --- a/testing/compliance-tests/policy/src/test/resources/tuscany-oasis-sca-tests-errors.properties +++ b/testing/compliance-tests/policy/src/test/resources/tuscany-oasis-sca-tests-errors.properties @@ -31,10 +31,10 @@ POL_3017=org.oasisopen.sca.ServiceRuntimeException: [Contribution: http://tuscan POL_3018=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POL_3018, Artifact: META-INF/definitions.xml, Definitions: jar:file:***/POL_3018.zip!/META-INF/definitions.xml] - [POL30021] Intent Map provides for Intent not specified as provided by parent PolicySet - BadIntentMapPolicySet POL_3020=TUSCANY-3371 POL_4001=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Service: TestInvocation] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntentExt2 associated with policy subject ***Endpoint: URI = TestClient#service-binding(TestInvocation/TestInvocation) has no matching policy set -POL_4004=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POL_4004Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestCompositeImplIntent, Component: TestComposite0Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite0, Component: TestComposite0Component1] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testImplIntent.qual2 associated with policy subject {http://docs.oasis-open.org/ns/opencsa/sca/200912}implementation.java (class=org.oasisopen.sca.test.service1Impl) has no matching policy set +POL_4004=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POL_4004Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestCompositeImplIntent, Component: TestComposite0Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite1, Component: TestComposite1Component1] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testImplIntent.qual2 associated with policy subject {http://docs.oasis-open.org/ns/opencsa/sca/200912}implementation.java (class=org.oasisopen.sca.test.Service1Impl) has no matching policy set POL_4005=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POL_4005Component1, Service: Service1] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testImplIntent.qual2 associated with policy subject ***Endpoint: URI = TEST_POL_4005Component1#service-binding(Service1/Service1) has no matching policy set POL_4006=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Service: TestInvocation] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}HighIntent associated with policy subject ***Endpoint: URI = TestClient#service-binding(TestInvocation/TestInvocation) has no matching policy set -POL_4009=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POL_4009Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestCompositeImplPolicySet, Component: TestComposite0Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite0, Component: TestComposite0Component1] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testImplIntent2 associated with policy subject {http://docs.oasis-open.org/ns/opencsa/sca/200912}implementation.java (class=org.oasisopen.sca.test.service1Impl) has no matching policy set +POL_4009=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POL_4009Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestCompositeImplPolicySet, Component: TestComposite0Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite1, Component: TestComposite1Component1] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testImplIntent2 associated with policy subject {http://docs.oasis-open.org/ns/opencsa/sca/200912}implementation.java (class=org.oasisopen.sca.test.Service1Impl) has no matching policy set POL_4010=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Service: TestInvocation] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}DirectIntent associated with policy subject ***Endpoint: URI = TestClient#service-binding(TestInvocation/TestInvocation) has no matching policy set POL_4012=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Service: TestInvocation] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent*** and {http://docs.oasis-open.org/ns/opencsa/scatests/200903}testIntent*** are mutually exclusive POL_4018=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Service: TestInvocation] - The intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}DirectIntent associated with policy subject ***Endpoint: URI = TestClient#service-binding(TestInvocation/TestInvocation) has no matching policy set @@ -51,7 +51,7 @@ POL_9018=org.oasisopen.sca.ServiceRuntimeException: [] - The component reference POL_9019=org.oasisopen.sca.ServiceRuntimeException: [***] - The Component reference reference1 can not require transactedOneWay because the implementation for Component TEST_POL_9019Component1 requires managedTransaction.local POL_9020=org.oasisopen.sca.ServiceRuntimeException: [] - The component reference reference1 can not require transactedOneWay because the operation operation1 is a two way operation POL_9021=org.oasisopen.sca.ServiceRuntimeException: [] - The component reference reference1 can not require immediateOneWay because the operation operation1 is a two way operation -POL_9022=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POL_9022Component1, Reference: reference1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}*** and {http://docs.oasis-open.org/ns/opencsa/sca/200912}*** are mutually exclusive +POL_9022=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POL_9022Component1, Reference: Reference1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}asyncInvocation and {http://docs.oasis-open.org/ns/opencsa/sca/200912}propagatesTransaction are mutually exclusive POL_9023=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_POL_9023Component2, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}*** and {http://docs.oasis-open.org/ns/opencsa/sca/200912}*** are mutually exclusive POL_10001=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Service: TestInvocation] - The noListener intent may only be specified on a reference. POL_11001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: POL_11001, Artifact: Test_POL_11001.composite] - XMLSchema validation error occured in: Test_POL_11001.composite ,line = 21, column = 4, Message = cvc-complex-type.3.2.2: Attribute 'badAttribute' is not allowed to appear in element 'policySetAttachment'. \ No newline at end of file From 294c4c6be6695853b06683ac5397476c7559788e Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Thu, 13 Jan 2011 14:05:31 +0000 Subject: [PATCH 040/157] Remove some redundant dependencies. Also for some strange reason I have to move to the base pom dependency to get this to work. The normal jar is ok for the others. Haven't got to the bottom of it yet, git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058568 13f79535-47bb-0310-9956-ffa450edef68 --- testing/compliance-tests/java-caa/pom.xml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/testing/compliance-tests/java-caa/pom.xml b/testing/compliance-tests/java-caa/pom.xml index 3a53743afc..235eed88fa 100644 --- a/testing/compliance-tests/java-caa/pom.xml +++ b/testing/compliance-tests/java-caa/pom.xml @@ -40,7 +40,8 @@ org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT @@ -57,12 +58,6 @@ test - - org.codehaus.woodstox - wstx-asl - 3.2.9 - - junit junit @@ -70,13 +65,6 @@ test - - log4j - log4j - 1.2.16 - test - - From ba5560f39a02fea869372f7c64cd20264261b40d Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Thu, 13 Jan 2011 14:10:42 +0000 Subject: [PATCH 041/157] Switch the debugging statement (which remains commented out) round as you want to know the output before it's loaded. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058572 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/builder/impl/PolicyAttachmentBuilderImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAttachmentBuilderImpl.java b/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAttachmentBuilderImpl.java index 4d1a7d52b6..c7b48a47db 100644 --- a/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAttachmentBuilderImpl.java +++ b/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAttachmentBuilderImpl.java @@ -236,11 +236,11 @@ protected Document saveAsDOM(Composite composite) throws XMLStreamException, Con // Write the composite into a DOM document processor.write(composite, writer, new ProcessorContext(registry)); writer.close(); - - Document document = domHelper.load(sw.toString()); // Debugging - //System.out.println("\n" + sw.toString()); + //System.out.println("\n" + sw.toString()); + + Document document = domHelper.load(sw.toString()); return document; } From ae62ea88042a05f921733548149aa29e0839d850 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Thu, 13 Jan 2011 14:12:04 +0000 Subject: [PATCH 042/157] Don't add a namespace twice. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058574 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/assembly/xml/CompositeProcessor.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java b/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java index eecb07e6cd..320db7ab82 100644 --- a/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java +++ b/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java @@ -1173,15 +1173,21 @@ protected void writePropertyValue(Object propertyValue, QName element, QName typ writer.writeStartElement(name.getPrefix(), name.getLocalPart(), name.getNamespaceURI()); int namespaces = reader.getNamespaceCount(); + boolean elementNamespaceAdded = false; for (int i = 0; i < namespaces; i++) { String prefix = reader.getNamespacePrefix(i); String ns = reader.getNamespaceURI(i); writer.writeNamespace(prefix, ns); + if(ns.equals(name.getNamespaceURI())){ + elementNamespaceAdded = true; + } } - - if (!"".equals(name.getNamespaceURI())) { + + if (!"".equals(name.getNamespaceURI()) && + !elementNamespaceAdded) { writer.writeNamespace(name.getPrefix(), name.getNamespaceURI()); } + // add the attributes for this element namespaces = reader.getAttributeCount(); From 12e9ce4e7ab9845bd2235f6f98a81be655764f69 Mon Sep 17 00:00:00 2001 From: Scott Kurz Date: Thu, 13 Jan 2011 20:54:22 +0000 Subject: [PATCH 043/157] Add context via MediatorImpl so a transformer can know whether a transform is for input/output/fault. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058748 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/databinding/Mediator.java | 12 ++++++++++++ .../sca/databinding/impl/MediatorImpl.java | 15 +++++++++++++-- .../impl/TransformationContextImpl.java | 5 ++--- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/Mediator.java b/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/Mediator.java index e768c60030..ceb2f59e80 100644 --- a/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/Mediator.java +++ b/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/Mediator.java @@ -33,6 +33,17 @@ */ public interface Mediator { + // Constants used by the databinding framework's TransformationContext metadata + public final static String SOURCE_OPERATION = "source.operation"; + public final static String TARGET_OPERATION = "target.operation"; + + // Use String constants rather than an enum, in case the dependency isn't factored + // out well enough and someone needs to use the String values. + public static final String BODY_TYPE = "body.type"; + public static final String BODY_TYPE_INPUT = "input"; + public static final String BODY_TYPE_OUTPUT = "output"; + public static final String BODY_TYPE_FAULT = "fault"; + /** * Mediate the data from the source type to the target type * @param source The data to be mediated @@ -201,4 +212,5 @@ Object copy(Object data, TransformationContext createTransformationContext(DataType sourceDataType, DataType targetDataType, Map metadata); + } diff --git a/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java b/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java index 5137338f4d..d6d56e2711 100644 --- a/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java +++ b/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java @@ -64,8 +64,7 @@ * @tuscany.spi.extension.asclient */ public class MediatorImpl implements Mediator { - private static final String TARGET_OPERATION = "target.operation"; - private static final String SOURCE_OPERATION = "source.operation"; + private ExtensionPointRegistry registry; private DataBindingExtensionPoint dataBindings; private TransformerExtensionPoint transformers; @@ -327,6 +326,10 @@ public Object mediateFault(Object result, if (sourceOperation != null) { context.put(TARGET_OPERATION, sourceOperation); } + if (context.get(BODY_TYPE) == null) { + context.put(BODY_TYPE, BODY_TYPE_FAULT); + } + Object newResult = transformException(result, targetDataType, sourceDataType, targetFaultType, sourceFaultType, context); @@ -403,6 +406,10 @@ public Object mediateOutput(Object output, if (sourceOperation != null) { context.put(TARGET_OPERATION, sourceOperation); } + if (context.get(BODY_TYPE) == null) { + context.put(BODY_TYPE, BODY_TYPE_OUTPUT); + } + return mediate(output, targetType, sourceType, context); } @@ -429,6 +436,10 @@ public Object mediateInput(Object input, if (targetOperation != null) { context.put(TARGET_OPERATION, targetOperation); } + if (context.get(BODY_TYPE) == null) { + context.put(BODY_TYPE, BODY_TYPE_INPUT); + } + return mediate(input, sourceType, targetType, context); } diff --git a/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/TransformationContextImpl.java b/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/TransformationContextImpl.java index 7af63f1ad6..e8b1ac3c01 100644 --- a/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/TransformationContextImpl.java +++ b/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/TransformationContextImpl.java @@ -21,14 +21,13 @@ import java.util.HashMap; import java.util.Map; +import static org.apache.tuscany.sca.databinding.Mediator.SOURCE_OPERATION; +import static org.apache.tuscany.sca.databinding.Mediator.TARGET_OPERATION; import org.apache.tuscany.sca.databinding.TransformationContext; import org.apache.tuscany.sca.interfacedef.DataType; import org.apache.tuscany.sca.interfacedef.Operation; public class TransformationContextImpl implements TransformationContext { - private static final String SOURCE_OPERATION = "source.operation"; - - private static final String TARGET_OPERATION = "target.operation"; private DataType sourceDataType; From 085f9b03c4cb96682603f14e6b40845365e3c85f Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Fri, 14 Jan 2011 07:40:46 +0000 Subject: [PATCH 044/157] Update to use local version of Endpoint if a local Endpoint exists git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058877 13f79535-47bb-0310-9956-ffa450edef68 --- .../hazelcast/HazelcastEndpointRegistry.java | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java b/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java index 6d696dfaaa..004aa81816 100644 --- a/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java +++ b/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java @@ -224,23 +224,28 @@ public List findEndpoint(String uri) { Endpoint endpoint = (Endpoint)v; logger.fine("Matching against - " + endpoint); if (endpoint.matches(uri)) { - if (!isLocal(endpoint)) { - endpoint.setRemote(true); - ((RuntimeEndpoint)endpoint).bind(registry, this); - } else { - // get the local version of the endpoint - // this local version won't have been serialized - // won't be marked as remote and will have the - // full interface contract information - endpoint = localEndpoints.get(endpoint.getURI()); - } - + endpoint = localizeEndpoint(endpoint); foundEndpoints.add(endpoint); logger.fine("Found endpoint with matching service - " + endpoint); } } return foundEndpoints; } + + private Endpoint localizeEndpoint(Endpoint endpoint) { + if (endpoint == null) return null; + if (!isLocal(endpoint)) { + endpoint.setRemote(true); + ((RuntimeEndpoint)endpoint).bind(registry, this); + } else { + // get the local version of the endpoint + // this local version won't have been serialized + // won't be marked as remote and will have the + // full interface contract information + endpoint = localEndpoints.get(endpoint.getURI()); + } + return endpoint; + } private boolean isLocal(Endpoint endpoint) { @@ -248,11 +253,15 @@ private boolean isLocal(Endpoint endpoint) { } public Endpoint getEndpoint(String uri) { - return (Endpoint)endpointMap.get(uri); + return localizeEndpoint((Endpoint)endpointMap.get(uri)); } public List getEndpoints() { - return new ArrayList(endpointMap.values()); + ArrayList eps = new ArrayList(); + for (Object ep : endpointMap.values()) { + eps.add(localizeEndpoint((Endpoint)ep)); + } + return eps; } public void removeEndpoint(Endpoint endpoint) { From 0e5a0c0691cd3c1ac2829b6910d1d96732b471b4 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Fri, 14 Jan 2011 08:51:37 +0000 Subject: [PATCH 045/157] JCAA still seems to be loading a logging configuration from somewhere that requires Log4J. I can't find it so to get the build going I'll add the dependency. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058897 13f79535-47bb-0310-9956-ffa450edef68 --- testing/compliance-tests/java-caa/pom.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/testing/compliance-tests/java-caa/pom.xml b/testing/compliance-tests/java-caa/pom.xml index 235eed88fa..bf000148ef 100644 --- a/testing/compliance-tests/java-caa/pom.xml +++ b/testing/compliance-tests/java-caa/pom.xml @@ -65,6 +65,13 @@ test + + log4j + log4j + 1.2.16 + test + + From 452eff77c8a635fa16732622cf1769803e0b6348 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Fri, 14 Jan 2011 09:37:44 +0000 Subject: [PATCH 046/157] This works fine for me so put back so i can verify it works with Hudson too git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058912 13f79535-47bb-0310-9956-ffa450edef68 --- testing/compliance-tests/java-caa/pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testing/compliance-tests/java-caa/pom.xml b/testing/compliance-tests/java-caa/pom.xml index bf000148ef..b5d4acb603 100644 --- a/testing/compliance-tests/java-caa/pom.xml +++ b/testing/compliance-tests/java-caa/pom.xml @@ -40,8 +40,7 @@ org.apache.tuscany.sca - tuscany-base-runtime-pom - pom + tuscany-base-runtime 2.0-SNAPSHOT From fb9d66957cebebc901ff1f3f5446a3318f54f79f Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Fri, 14 Jan 2011 09:46:09 +0000 Subject: [PATCH 047/157] Take this out for now as it doesn't appear to be used by anythig or do anything but it does try to start and opens a log file which causes conflicts if mutlipe runtimes try to open the same file git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058917 13f79535-47bb-0310-9956-ffa450edef68 --- features/all/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/all/pom.xml b/features/all/pom.xml index bf168dc8b7..9113d6af55 100644 --- a/features/all/pom.xml +++ b/features/all/pom.xml @@ -289,11 +289,11 @@ 2.0-SNAPSHOT - + From 939e4840e170c0d77b118c72addcc0979fca98e4 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Fri, 14 Jan 2011 11:34:37 +0000 Subject: [PATCH 048/157] TUSCANY-3788 - Resolved async references are now started at start time to give them a chance to create a response listener. Plus remove an unused reference starting interface from the component context as it;s all handled by endpoint references now. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1058955 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/runtime/RuntimeComponentContext.java | 5 - .../assembly/impl/CompositeActivatorImpl.java | 160 ++++++++++-------- .../context/impl/ComponentContextImpl.java | 7 - 3 files changed, 92 insertions(+), 80 deletions(-) diff --git a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentContext.java b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentContext.java index 861ca2d6f9..cf2042a0ae 100644 --- a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentContext.java +++ b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentContext.java @@ -29,11 +29,6 @@ * @version $Rev$ $Date$ */ public interface RuntimeComponentContext extends ComponentContext { - /** - * Activate the reference (creating runtime wires) - * @param reference - */ - void start(RuntimeComponentReference reference); /** * Get the CallableReference for a given component reference diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java index da28cab2a2..6ec740ae20 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java @@ -41,6 +41,7 @@ import org.apache.tuscany.sca.core.scope.ScopeRegistry; import org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent; import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.provider.EndpointReferenceAsyncProvider; import org.apache.tuscany.sca.provider.ImplementationProvider; import org.apache.tuscany.sca.provider.ImplementationProviderFactory; import org.apache.tuscany.sca.provider.PolicyProvider; @@ -345,6 +346,18 @@ public void start(CompositeContext compositeContext, Composite composite) { start(compositeContext, (ScopedRuntimeComponent)component); } } + + // start reference last. In allowing references to start at "start" time + // as well as when they are first used (for late bound references) we need + // to make sure that all potential target services and component implementations + // are started first to take account of the default binding optimization case + for (Component component : composite.getComponents()) { + for (ComponentReference reference : component.getReferences()) { + start(compositeContext, + (RuntimeComponent)component, + (RuntimeComponentReference)reference); + } + } } public void stop(CompositeContext compositeContext, Composite composite) { @@ -396,9 +409,6 @@ public void start(CompositeContext compositeContext, Component component) { } } - // Reference bindings aren't started until the wire is first used although this may - // happen when the scope container is started in the case of @EagerInit - for (ComponentService service : component.getServices()) { if (logger.isLoggable(Level.FINE)) { logger.fine("Starting component service: " + component.getURI() + "#" + service.getName()); @@ -408,6 +418,10 @@ public void start(CompositeContext compositeContext, Component component) { startEndpoint(compositeContext, ep, providers); } } + + // Reference start is done after all components have been started to make sure everything + // is up and running before we try and connect references to services + } catch (Throwable e) { for (int i = providers.size() - 1; i >= 0; i--) { try { @@ -432,36 +446,6 @@ private void rethrow(Throwable e) throws Error { } } - public void start(CompositeContext compositeContext, RuntimeEndpoint ep) { - startEndpoint(compositeContext, ep, null); - } - - private void startEndpoint(CompositeContext compositeContext, RuntimeEndpoint ep, final List providers) { - // FIXME: Should the policy providers be started before the endpoint is started? - for (PolicyProvider policyProvider : ep.getPolicyProviders()) { - policyProvider.start(); - if (providers != null) { - providers.add(policyProvider); - } - } - - final ServiceBindingProvider bindingProvider = ep.getBindingProvider(); - if (bindingProvider != null) { - // bindingProvider.start(); - // Allow bindings to add shutdown hooks. Requires RuntimePermission shutdownHooks in policy. - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - bindingProvider.start(); - if (providers != null) { - providers.add(bindingProvider); - } - return null; - } - }); - compositeContext.getEndpointRegistry().addEndpoint(ep); - } - } - public void stop(CompositeContext compositeContext, Component component) { if (!((RuntimeComponent)component).isStarted()) { return; @@ -519,6 +503,48 @@ public Object run() { ((RuntimeComponent)component).setStarted(false); } + + // Scope container start/stop + // separate off from component start that all endpoints are + // registered before any @EagerInit takes place + public void start(CompositeContext compositeContext, ScopedRuntimeComponent scopedRuntimeComponent) { + if (scopedRuntimeComponent.getScopeContainer() != null) { + scopedRuntimeComponent.getScopeContainer().start(); + } + } + + // Service start/stop + + public void start(CompositeContext compositeContext, RuntimeEndpoint ep) { + startEndpoint(compositeContext, ep, null); + } + + private void startEndpoint(CompositeContext compositeContext, RuntimeEndpoint ep, final List providers) { + // FIXME: Should the policy providers be started before the endpoint is started? + for (PolicyProvider policyProvider : ep.getPolicyProviders()) { + policyProvider.start(); + if (providers != null) { + providers.add(policyProvider); + } + } + + final ServiceBindingProvider bindingProvider = ep.getBindingProvider(); + if (bindingProvider != null) { + // bindingProvider.start(); + // Allow bindings to add shutdown hooks. Requires RuntimePermission shutdownHooks in policy. + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + bindingProvider.start(); + if (providers != null) { + providers.add(bindingProvider); + } + return null; + } + }); + compositeContext.getEndpointRegistry().addEndpoint(ep); + } + } + public void stop(RuntimeEndpoint ep) { ep.getCompositeContext().getEndpointRegistry().removeEndpoint(ep); final ServiceBindingProvider bindingProvider = ep.getBindingProvider(); @@ -536,48 +562,38 @@ public Object run() { } } - // Scope container start/stop - // separate off from component start that all endpoints are - // registered before any @EagerInit takes place - public void start(CompositeContext compositeContext, ScopedRuntimeComponent scopedRuntimeComponent) { - if (scopedRuntimeComponent.getScopeContainer() != null) { - scopedRuntimeComponent.getScopeContainer().start(); - } - } - - // Service start/stop - - // done as part of the component start above // Reference start/stop - // Used by component context start - - public void start(CompositeContext compositeContext, RuntimeComponent component, RuntimeComponentReference componentReference) { - synchronized (componentReference) { - if (!(componentReference instanceof RuntimeComponentReference)) { - return; - } - - // create a wire for each endpoint reference. An endpoint reference says either that - // - a target has been specified and hence the reference has been wired in some way. - // - an unwired binding ha been specified - // and endpoint reference representing a wired reference may not at this point - // be resolved (the service to which it points may not be present in the - // current composite). Endpoint reference resolution takes place when the wire - // is first used (when the chains are created) - for (EndpointReference endpointReference : componentReference.getEndpointReferences()){ - // addReferenceWire(compositeContext, endpointReference); - start(compositeContext, (RuntimeEndpointReference) endpointReference); + public void start(CompositeContext compositeContext, RuntimeComponent component, RuntimeComponentReference reference) { + if (logger.isLoggable(Level.FINE)) { + logger.fine("Starting component reference: " + component.getURI() + "#" + reference.getName()); + } + + for (EndpointReference endpointReference : reference.getEndpointReferences()){ + RuntimeEndpointReference epr = (RuntimeEndpointReference)endpointReference; + + // If the reference is already resolved then start it now. This currently + // important for async references which have native async bindings as the + // reference provider has to register a response listener regardless of + // whether the reference has been used or not. + if (epr.getStatus() == EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED || + epr.getStatus() == EndpointReference.Status.RESOLVED_BINDING){ + + // As we only care about starting references at build time in the + // async case at the moment check that the binding supports native async + // and that the reference is an async reference + ReferenceBindingProvider bindingProvider = epr.getBindingProvider(); + if (bindingProvider instanceof EndpointReferenceAsyncProvider && + ((EndpointReferenceAsyncProvider)bindingProvider).supportsNativeAsync() && + epr.isAsyncInvocation()){ + // it's resolved so start it now + start(compositeContext, epr); + } } - } } - public void start(CompositeContext compositeContext, RuntimeEndpointReference endpointReference) { - compositeContext.getEndpointRegistry().addEndpointReference(endpointReference); - } - public void stop(Component component, ComponentReference reference) { if (logger.isLoggable(Level.FINE)) { logger.fine("Stopping component reference: " + component.getURI() + "#" + reference.getName()); @@ -588,6 +604,14 @@ public void stop(Component component, ComponentReference reference) { stop(epr); } } + + public void start(CompositeContext compositeContext, RuntimeEndpointReference endpointReference) { + compositeContext.getEndpointRegistry().addEndpointReference(endpointReference); + + // The act of getting invocation chains starts the reference in the late binding case + // so just use that here + endpointReference.getInvocationChains(); + } public void stop(RuntimeEndpointReference epr) { if (epr.isStarted()) { diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java index 003acce0fb..d9cb512501 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java @@ -481,13 +481,6 @@ private InterfaceContract getInterfaceContract(InterfaceContract interfaceContra return interfaceContract; } - /** - * @see org.apache.tuscany.sca.runtime.RuntimeComponentContext#start(org.apache.tuscany.sca.runtime.RuntimeComponentReference) - */ - public void start(RuntimeComponentReference reference) { - compositeActivator.start(compositeContext, component, reference); - } - /* ******************** Contribution for issue TUSCANY-2281 ******************** */ /** From 698720ea1d1d042b165f791129dd9a27587ec2f5 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Fri, 14 Jan 2011 13:49:42 +0000 Subject: [PATCH 049/157] Remove actspec == destname check as thats not strictly correct and the test requirement isn't in the compliance tests anymore git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059008 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/binding/jms/JMSBindingProcessor.java | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java b/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java index 97dfd5f4cf..b9d7d7a6f6 100644 --- a/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java +++ b/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java @@ -1005,20 +1005,6 @@ protected void validate( JMSBinding jmsBinding, Monitor monitor ) { error(monitor, "DestinationURIContradiction", jmsBinding, jmsBinding.getJMSURI(), jmsBinding.getDestinationName()); } - // If activation spec and destination are both specified, they have to match - if ( ( jmsBinding.getActivationSpecName() != null ) && (jmsBinding.getActivationSpecName().length() > 0 ) && - (jmsBinding.getDestinationName() != null) && (jmsBinding.getDestinationName().length() > 0 ) ) { - if ( !jmsBinding.getActivationSpecName().equals(jmsBinding.getDestinationName())) { - error(monitor, "ActivationSpecAndDestinationMismatch", jmsBinding, jmsBinding.getActivationSpecName(), jmsBinding.getDestinationName()); - } - } - - if ( ( jmsBinding.getResponseActivationSpecName() != null ) && (jmsBinding.getResponseActivationSpecName().length() > 0 ) && - (jmsBinding.getResponseDestinationName() != null ) && (jmsBinding.getResponseDestinationName().length() > 0 ) ) { - if ( !jmsBinding.getResponseActivationSpecName().equals(jmsBinding.getResponseDestinationName())) { - error(monitor, "ActivationSpecAndDestinationMismatch", jmsBinding, jmsBinding.getResponseActivationSpecName(), jmsBinding.getResponseDestinationName()); - } - } // If activation spec exists with create=always, a jndiName must be specified if (JMSBindingConstants.CREATE_ALWAYS.equals(jmsBinding.getActivationSpecCreate()) && (jmsBinding.getActivationSpecName() == null)) { From fbb76b64434a4f8415eedb9bfcfc556f5d170558 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Fri, 14 Jan 2011 14:54:03 +0000 Subject: [PATCH 050/157] TUSCANY-3788 - Put some more info back into the response message based on what's stored in the response invoker git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059028 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/core/invocation/AsyncResponseInvoker.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java index 652f67f5e1..43e34c1173 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java @@ -76,7 +76,9 @@ public AsyncResponseInvoker(RuntimeEndpoint requestEndpoint, * If you have a Tuscany message you can call this */ public void invokeAsyncResponse(Message responseMessage) { - responseMessage.getHeaders().put("ASYNC_RESPONSE_INVOKER", this); + responseMessage.getHeaders().put(Constants.ASYNC_RESPONSE_INVOKER, this); + responseMessage.getHeaders().put(Constants.RELATES_TO, relatesToMsgID); + if ((requestEndpoint.getBindingProvider() instanceof EndpointAsyncProvider) && (((EndpointAsyncProvider)requestEndpoint.getBindingProvider()).supportsNativeAsync())){ // process the response as a native async response @@ -114,6 +116,12 @@ public void invokeAsyncResponse(Object args) { Message msg = messageFactory.createMessage(); msg.setOperation(getOperation()); + + // on the the following will be null depending + // on whether this is native or non-native async + msg.setTo(requestEndpoint); + msg.setFrom(responseEndpointReference); + if( args instanceof Throwable ) { msg.setFaultBody(args); } else { From e24216a618b882f5127a145c498ca7501649acd0 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Fri, 14 Jan 2011 14:55:35 +0000 Subject: [PATCH 051/157] TUSCANY-3801 - make the non-blocking interceptor work with native async bindings git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059030 13f79535-47bb-0310-9956-ffa450edef68 --- .../invocation/NonBlockingInterceptor.java | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java index a31a126977..7108728206 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java @@ -38,7 +38,7 @@ * * @version $Rev$ $Date$ */ -public class NonBlockingInterceptor implements Interceptor { +public class NonBlockingInterceptor extends InterceptorAsyncImpl { private static final Message RESPONSE = new ImmutableMessage(); @@ -48,7 +48,6 @@ public class NonBlockingInterceptor implements Interceptor { private static final Logger LOGGER = Logger.getLogger(NonBlockingInterceptor.class.getName()); private WorkScheduler workScheduler; - private Invoker next; public NonBlockingInterceptor(WorkScheduler workScheduler) { this.workScheduler = workScheduler; @@ -69,6 +68,11 @@ public void setWorkScheduler(WorkScheduler workScheduler){ this.workScheduler = workScheduler; } + /** + * For request/response messages use the workScheduler to break the connection between + * requests and the void response + */ + @Override public Message invoke(final Message msg) { // Schedule the invocation of the next interceptor in a new Work instance try { @@ -107,13 +111,21 @@ public void run() { } return RESPONSE; } - - public Invoker getNext() { - return next; + + /** + * For forward async responses we just pass the message along + * as this is naturally one way + */ + public Message processRequest(Message msg) { + return msg; } - - public void setNext(Invoker next) { - this.next = next; + + /** + * This should never be called as a one way message won't + * expect a response + */ + public Message processResponse(Message msg) { + return null; } /** From 4ed3277cb62c5ca71b0d99bef06a2c9fb06addaa Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Fri, 14 Jan 2011 14:57:50 +0000 Subject: [PATCH 052/157] TUSCANY-3783 - throw system exceptions rather than pushing them into the response path. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059032 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/core/invocation/RuntimeInvoker.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java index 62593ba895..1c0941f26d 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java @@ -178,10 +178,7 @@ public void invokeAsync(Message msg) { // temporary fix to swallow the dummy exception that's // thrown back to get past the response chain processing. if (!(ex instanceof AsyncResponseException)){ - // send the exception in through the - // async response processing path - msg.setFaultBody(ex); - invokeAsyncResponse(msg); + throw new ServiceRuntimeException(ex); } } } finally { From 1ebabc0ad3ea6f067c8d54d524cd6f3a7c40cf37 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Fri, 14 Jan 2011 15:00:50 +0000 Subject: [PATCH 053/157] TUSCANY-3784 - Add multiple operations and a void return type to the async part of the implementation same git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059033 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/sample/impl/SampleWSDLInvoker.java | 5 +- .../src/test/java/sample/Upper.java | 4 ++ .../sample/UpperSampleAsyncReferenceImpl.java | 49 +++++++++++++++++++ .../sample/UpperSampleAsyncServiceImpl.java | 11 ++++- .../src/test/java/sample/UpperTest.java | 9 ++++ .../impl/SampleNativeAsyncTestCase.java | 22 ++++++++- .../src/test/resources/Upper-async.wsdl | 7 +++ 7 files changed, 101 insertions(+), 6 deletions(-) diff --git a/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLInvoker.java b/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLInvoker.java index 6758c1fc1f..41e53d90b7 100644 --- a/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLInvoker.java +++ b/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLInvoker.java @@ -71,8 +71,9 @@ public void invokeAsyncRequest(Message msg) { // At this point we could serialize the AsyncResponseInvoker and pick it up again // later to send the async response - //((RuntimeEndpoint)msg.getTo()).invokeAsyncResponse(responseMsg); - respInvoker.invokeAsyncResponse(responseMsg); + if (responseMsg.getBody() != null){ + respInvoker.invokeAsyncResponse(responseMsg); + } } // end method invokeAsyncRequest public Message processRequest(Message msg) { diff --git a/samples/extending-tuscany/implementation-sample/src/test/java/sample/Upper.java b/samples/extending-tuscany/implementation-sample/src/test/java/sample/Upper.java index 9c772b3487..3a831a0ecf 100644 --- a/samples/extending-tuscany/implementation-sample/src/test/java/sample/Upper.java +++ b/samples/extending-tuscany/implementation-sample/src/test/java/sample/Upper.java @@ -30,4 +30,8 @@ public interface Upper { String upper(String s); + + String upper2(String s); + + String upperVoid(String s); } diff --git a/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncReferenceImpl.java b/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncReferenceImpl.java index 7a86d68043..4bfc8356c4 100644 --- a/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncReferenceImpl.java +++ b/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncReferenceImpl.java @@ -46,6 +46,8 @@ public class UpperSampleAsyncReferenceImpl { WSDLReference upper; Element response; + Element response2; + public static String responseVoid; CountDownLatch latch = new CountDownLatch( 1 ); public String upper(String s) { @@ -80,4 +82,51 @@ public void upperCallback(Element response) { this.response = response; latch.countDown(); } + + public String upper2(String s) { + out.println("UpperSampleAsyncReferenceImpl.upper2(" + s + ")"); + + // TODO - I'm passing in the non-wrapped version of the parameter + // here which doesn't seem right. Need to test that databinding + // wraps it correctly + //final Element ureq = xdom("http://sample/upper-async", "s", text(s)); + NodeBuilder node1 = elem("s", text(s)); + final Element ureq = xdom("http://sample/upper-async", "upper", node1); + upper.callAsync("upper2", ureq); + + try { + Thread.sleep(500); + latch.await(500, TimeUnit.SECONDS); + } catch (Exception ex) { + // do nothing + } + + if( response2 != null ) return response2.getTextContent(); + else return "upper did not get called back"; + } + + /** + * In this implementation the convention is that the + * async callback arrives at an operation named + * operationName + Callback + */ + public void upper2Callback(Element response) { + out.println("UpperSampleAsyncReferenceImpl.upper2Callback(" + response.getTextContent() + ")"); + this.response2 = response; + latch.countDown(); + } + + public String upperVoid(String s) { + out.println("UpperSampleAsyncReferenceImpl.upperVoid(" + s + ")"); + + // TODO - I'm passing in the non-wrapped version of the parameter + // here which doesn't seem right. Need to test that databinding + // wraps it correctly + //final Element ureq = xdom("http://sample/upper-async", "s", text(s)); + NodeBuilder node1 = elem("s", text(s)); + final Element ureq = xdom("http://sample/upper-async", "upper", node1); + upper.callAsync("upperVoid", ureq); + return responseVoid; + } + } diff --git a/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncServiceImpl.java b/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncServiceImpl.java index 69d6cb9ecf..75fe271d7a 100644 --- a/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncServiceImpl.java +++ b/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncServiceImpl.java @@ -38,8 +38,15 @@ public class UpperSampleAsyncServiceImpl { public Element call(String op, Element e) { String input = e.getTextContent(); - out.println("UpperSampleAsyncServiceImpl.upper(" + input + ")"); + out.println("UpperSampleAsyncServiceImpl." + op + "(" + input + ")"); String output = input.toUpperCase(); - return xdom("http://sample/upper-async", "upperResponse", elem("result", text(output))); + + if (!op.equals("upperVoid")){ + return xdom("http://sample/upper-async", "upperResponse", elem("result", text(output))); + } else { + out.println("No response as void return type"); + UpperSampleAsyncReferenceImpl.responseVoid = output; + return null; + } } } diff --git a/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperTest.java b/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperTest.java index 5399e4410d..f1daf8155e 100644 --- a/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperTest.java +++ b/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperTest.java @@ -34,4 +34,13 @@ public String upper(String s) { out.println("UpperTest.upper(" + s + ")"); return s.toUpperCase(); } + + public String upper2(String s) { + out.println("UpperTest.upper2(" + s + ")"); + return s.toUpperCase(); + } + + public void upperVoid(String s) { + out.println("UpperTest.upperVoid(" + s + ")"); + } } diff --git a/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/SampleNativeAsyncTestCase.java b/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/SampleNativeAsyncTestCase.java index f5198e7df0..28d54647c5 100644 --- a/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/SampleNativeAsyncTestCase.java +++ b/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/SampleNativeAsyncTestCase.java @@ -54,11 +54,29 @@ public static void tearDown() throws Exception { } @Test - public void testReference() { - System.out.println("SampleNaiveAsyncTestCase.testReference"); + public void testUpper() { + System.out.println("SampleNaiveAsyncTestCase.testUpper"); Upper upper = node.getService(Upper.class, "SampleNativeAsyncReference"); final String r = upper.upper("async"); System.out.println(r); assertEquals("ASYNC", r); } + + @Test + public void testUpper2() { + System.out.println("SampleNaiveAsyncTestCase.testUpper2"); + Upper upper = node.getService(Upper.class, "SampleNativeAsyncReference"); + final String r = upper.upper2("async2"); + System.out.println(r); + assertEquals("ASYNC2", r); + } + + @Test + public void testVoid() { + System.out.println("SampleNaiveAsyncTestCase.testUpperVoid"); + Upper upper = node.getService(Upper.class, "SampleNativeAsyncReference"); + final String r = upper.upperVoid("asyncVoid"); + System.out.println(r); + assertEquals("ASYNCVOID", r); + } } diff --git a/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async.wsdl b/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async.wsdl index a16fb5db3d..9a6ab268fb 100644 --- a/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async.wsdl +++ b/samples/extending-tuscany/implementation-sample/src/test/resources/Upper-async.wsdl @@ -60,6 +60,13 @@ + + + + + + + From bf6047881c6aa4e12edc84104080f7a2327e85e1 Mon Sep 17 00:00:00 2001 From: Brent Daniel Date: Fri, 14 Jan 2011 17:31:35 +0000 Subject: [PATCH 054/157] Add getter methods for the endpoint and endpoint and endpointRef to AsyncResponseInvoker git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059083 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/core/invocation/AsyncResponseInvoker.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java index 43e34c1173..8bcda4efb2 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java @@ -148,4 +148,11 @@ public String getBindingType() { return bindingType; } // end method getBindingType + public RuntimeEndpoint getRequestEndpoint() { + return this.requestEndpoint; + } + + public RuntimeEndpointReference getResponseEndpointReference() { + return this.responseEndpointReference; + } } // end class From 6c22f4ae1cb5d9112c4d97a8f7ea331133c5ce49 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sat, 15 Jan 2011 10:17:22 +0000 Subject: [PATCH 055/157] Update pom to avoid circular dependencies git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059282 13f79535-47bb-0310-9956-ffa450edef68 --- modules/domain-hazelcast/pom.xml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/modules/domain-hazelcast/pom.xml b/modules/domain-hazelcast/pom.xml index 351955f99e..20e98453df 100644 --- a/modules/domain-hazelcast/pom.xml +++ b/modules/domain-hazelcast/pom.xml @@ -60,11 +60,34 @@ org.apache.tuscany.sca - tuscany-base-runtime-pom - pom + tuscany-core 2.0-SNAPSHOT provided + + org.apache.tuscany.sca + tuscany-assembly-xml + 2.0-SNAPSHOT + provided + + + org.apache.tuscany.sca + tuscany-binding-ws-wsdlgen + 2.0-SNAPSHOT + provided + + + org.apache.tuscany.sca + tuscany-node-impl + 2.0-SNAPSHOT + test + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 2.0-SNAPSHOT + test + From 23f62dfa8f5a2b162f98235111809c58b1f4106e Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sat, 15 Jan 2011 10:18:32 +0000 Subject: [PATCH 056/157] Make test interface remotable so it can be used to test distributed ops git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059283 13f79535-47bb-0310-9956-ffa450edef68 --- modules/domain-node/src/test/java/sample/Helloworld.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/domain-node/src/test/java/sample/Helloworld.java b/modules/domain-node/src/test/java/sample/Helloworld.java index ea65a1e58c..b67efbb485 100644 --- a/modules/domain-node/src/test/java/sample/Helloworld.java +++ b/modules/domain-node/src/test/java/sample/Helloworld.java @@ -19,6 +19,9 @@ package sample; +import org.oasisopen.sca.annotation.Remotable; + +@Remotable public interface Helloworld { String sayHello(String name); } From 0ea3ecd8b5bf1b181cdc08cabf404169c0a28dfe Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sat, 15 Jan 2011 11:44:44 +0000 Subject: [PATCH 057/157] Update getService to work with services on remote nodes git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059305 13f79535-47bb-0310-9956-ffa450edef68 --- modules/domain-node/pom.xml | 14 +- .../tuscany/sca/runtime/impl/NodeImpl.java | 135 +++++++++++++++++- .../tuscany/sca/node2/TwoNodesTestCase.java | 49 +++++++ 3 files changed, 193 insertions(+), 5 deletions(-) create mode 100644 modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/TwoNodesTestCase.java diff --git a/modules/domain-node/pom.xml b/modules/domain-node/pom.xml index 20d21e0b31..76fae9963a 100644 --- a/modules/domain-node/pom.xml +++ b/modules/domain-node/pom.xml @@ -59,10 +59,22 @@ org.apache.tuscany.sca - tuscany-binding-ws-wsdlgen + tuscany-domain-hazelcast 2.0-SNAPSHOT test + + org.apache.tuscany.sca + tuscany-assembly-xml + 2.0-SNAPSHOT + test + + + org.apache.tuscany.sca + tuscany-binding-ws-wsdlgen + 2.0-SNAPSHOT + test + diff --git a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java index 2721bf4496..32f01698bf 100644 --- a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java +++ b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java @@ -31,15 +31,32 @@ import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import org.apache.tuscany.sca.assembly.AssemblyFactory; +import org.apache.tuscany.sca.assembly.Component; +import org.apache.tuscany.sca.assembly.ComponentReference; +import org.apache.tuscany.sca.assembly.ComponentService; import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.Endpoint; +import org.apache.tuscany.sca.assembly.EndpointReference; +import org.apache.tuscany.sca.assembly.Multiplicity; +import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.common.java.io.IOHelper; +import org.apache.tuscany.sca.context.CompositeContext; import org.apache.tuscany.sca.contribution.Artifact; import org.apache.tuscany.sca.contribution.Contribution; import org.apache.tuscany.sca.contribution.ContributionMetadata; import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; +import org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory; +import org.apache.tuscany.sca.core.invocation.ProxyFactory; +import org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint; import org.apache.tuscany.sca.deployment.Deployer; +import org.apache.tuscany.sca.interfacedef.Interface; +import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; +import org.apache.tuscany.sca.interfacedef.java.JavaInterface; +import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.ValidationException; import org.apache.tuscany.sca.runtime.ActivationException; @@ -48,7 +65,10 @@ import org.apache.tuscany.sca.runtime.Node; import org.apache.tuscany.sca.runtime.NodeFactory; import org.apache.tuscany.sca.runtime.RuntimeComponent; +import org.apache.tuscany.sca.runtime.RuntimeComponentReference; +import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; import org.oasisopen.sca.NoSuchServiceException; +import org.oasisopen.sca.ServiceRuntimeException; public class NodeImpl implements Node { @@ -260,7 +280,7 @@ public void stop() { } public T getService(Class interfaze, String serviceURI) throws NoSuchServiceException { - + List endpoints = endpointRegistry.findEndpoint(serviceURI); if (endpoints.size() < 1) { throw new NoSuchServiceException(serviceURI); @@ -269,12 +289,119 @@ public T getService(Class interfaze, String serviceURI) throws NoSuchServ String serviceName = null; if (serviceURI.contains("/")) { int i = serviceURI.indexOf("/"); - if (i < serviceURI.length()-1) { - serviceName = serviceURI.substring(i+1); + if (i < serviceURI.length() - 1) { + serviceName = serviceURI.substring(i + 1); + } + } + + Endpoint ep = endpoints.get(0); + if (((RuntimeComponent)ep.getComponent()).getComponentContext() != null) { + return ((RuntimeComponent)ep.getComponent()).getServiceReference(interfaze, serviceName).getService(); + } else { + return getRemoteProxy(interfaze, ep); + } + } + + private T getRemoteProxy(Class serviceInterface, Endpoint endpoint) throws NoSuchServiceException { + FactoryExtensionPoint factories = extensionPointRegistry.getExtensionPoint(FactoryExtensionPoint.class); + AssemblyFactory assemblyFactory = factories.getFactory(AssemblyFactory.class); + JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class); + ProxyFactory proxyFactory = + new ExtensibleProxyFactory(extensionPointRegistry.getExtensionPoint(ProxyFactoryExtensionPoint.class)); + + CompositeContext compositeContext = + new CompositeContext(extensionPointRegistry, endpointRegistry, null, null, null, + deployer.getSystemDefinitions()); + + RuntimeEndpointReference epr; + try { + epr = + createEndpointReference(javaInterfaceFactory, + compositeContext, + assemblyFactory, + endpoint, + serviceInterface); + } catch (Exception e) { + throw new ServiceRuntimeException(e); + } + + return proxyFactory.createProxy(serviceInterface, epr); + } + + private RuntimeEndpointReference createEndpointReference(JavaInterfaceFactory javaInterfaceFactory, + CompositeContext compositeContext, + AssemblyFactory assemblyFactory, + Endpoint endpoint, + Class businessInterface) + throws CloneNotSupportedException, InvalidInterfaceException { + Component component = endpoint.getComponent(); + ComponentService service = endpoint.getService(); + ComponentReference componentReference = assemblyFactory.createComponentReference(); + componentReference.setName("sca.client." + service.getName()); + + componentReference.setCallback(service.getCallback()); + componentReference.getTargets().add(service); + componentReference.getPolicySets().addAll(service.getPolicySets()); + componentReference.getRequiredIntents().addAll(service.getRequiredIntents()); + componentReference.getBindings().add(endpoint.getBinding()); + + InterfaceContract interfaceContract = service.getInterfaceContract(); + Service componentTypeService = service.getService(); + if (componentTypeService != null && componentTypeService.getInterfaceContract() != null) { + interfaceContract = componentTypeService.getInterfaceContract(); + } + interfaceContract = getInterfaceContract(javaInterfaceFactory, interfaceContract, businessInterface); + componentReference.setInterfaceContract(interfaceContract); + componentReference.setMultiplicity(Multiplicity.ONE_ONE); + // component.getReferences().add(componentReference); + + // create endpoint reference + EndpointReference endpointReference = assemblyFactory.createEndpointReference(); + endpointReference.setComponent(component); + endpointReference.setReference(componentReference); + endpointReference.setBinding(endpoint.getBinding()); + endpointReference.setUnresolved(false); + endpointReference.setStatus(EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED); + + endpointReference.setTargetEndpoint(endpoint); + + componentReference.getEndpointReferences().add(endpointReference); + ((RuntimeComponentReference)componentReference).setComponent((RuntimeComponent)component); + ((RuntimeEndpointReference)endpointReference).bind(compositeContext); + + return (RuntimeEndpointReference)endpointReference; + } + + private InterfaceContract getInterfaceContract(JavaInterfaceFactory javaInterfaceFactory, + InterfaceContract interfaceContract, + Class businessInterface) throws CloneNotSupportedException, + InvalidInterfaceException { + if (businessInterface == null) { + return interfaceContract; + } + boolean compatible = false; + if (interfaceContract != null && interfaceContract.getInterface() != null) { + Interface interfaze = interfaceContract.getInterface(); + if (interfaze instanceof JavaInterface) { + Class cls = ((JavaInterface)interfaze).getJavaClass(); + if (cls != null && businessInterface.isAssignableFrom(cls)) { + compatible = true; + } + } + } + + if (!compatible) { + // The interface is not assignable from the interface contract + interfaceContract = javaInterfaceFactory.createJavaInterfaceContract(); + JavaInterface callInterface = javaInterfaceFactory.createJavaInterface(businessInterface); + interfaceContract.setInterface(callInterface); + if (callInterface.getCallbackClass() != null) { + interfaceContract.setCallbackInterface(javaInterfaceFactory.createJavaInterface(callInterface + .getCallbackClass())); } } - return ((RuntimeComponent)endpoints.get(0).getComponent()).getServiceReference(interfaze, serviceName).getService(); + return interfaceContract; } public String getDomainName() { diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/TwoNodesTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/TwoNodesTestCase.java new file mode 100644 index 0000000000..42949e2924 --- /dev/null +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/TwoNodesTestCase.java @@ -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. + */ +package org.apache.tuscany.sca.node2; + +import junit.framework.Assert; + +import org.apache.tuscany.sca.contribution.processor.ContributionReadException; +import org.apache.tuscany.sca.monitor.ValidationException; +import org.apache.tuscany.sca.runtime.ActivationException; +import org.apache.tuscany.sca.runtime.Node; +import org.apache.tuscany.sca.runtime.NodeFactory; +import org.junit.Test; +import org.oasisopen.sca.NoSuchDomainException; +import org.oasisopen.sca.NoSuchServiceException; + +import sample.Helloworld; + +public class TwoNodesTestCase { + + @Test + public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { +// Node node1 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44331"); + Node node1 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase"); + node1.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true); + +// Node node2 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44332&wka=127.0.0.1:44331"); + Node node2 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase"); + + Helloworld helloworldService = node2.getService(Helloworld.class, "HelloworldComponent"); + Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); + } + +} From abaef587e00da34476ac2f21224df088acdc9293 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Mon, 17 Jan 2011 13:21:43 +0000 Subject: [PATCH 058/157] Mark several fields as "transient" in ResponseDispatchImpl to reduce data that is serialized unnecessarily. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059915 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/invocation/ResponseDispatchImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java index 8c1650096a..dcbf83262e 100644 --- a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java +++ b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java @@ -69,14 +69,14 @@ public class ResponseDispatchImpl implements ResponseDispatch, Serializabl // A latch used to ensure that the sendResponse() and sendFault() operations are used at most once // The latch is initialized with the value "false" - private AtomicBoolean latch = new AtomicBoolean(); + private transient AtomicBoolean latch = new AtomicBoolean(); - private final Lock lock = new ReentrantLock(); - private final Condition completed = lock.newCondition(); + private transient final Lock lock = new ReentrantLock(); + private transient final Condition completed = lock.newCondition(); // The result - private volatile T response = null; - private volatile Throwable fault = null; + private transient volatile T response = null; + private transient volatile Throwable fault = null; private ExtensionPointRegistry registry; From dcec830a1611ea8467ee2b4953402f8db26e0451 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Mon, 17 Jan 2011 13:25:07 +0000 Subject: [PATCH 059/157] Correcting MANIFEST of implementation-java-runtime to export org.apache.tuscany.sca.implementation.java.context at version 2.0.0 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059916 13f79535-47bb-0310-9956-ffa450edef68 --- .../META-INF/MANIFEST.MF | 41 ++++++++++++------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/modules/implementation-java-runtime/META-INF/MANIFEST.MF b/modules/implementation-java-runtime/META-INF/MANIFEST.MF index af05a6b540..4ba430760a 100644 --- a/modules/implementation-java-runtime/META-INF/MANIFEST.MF +++ b/modules/implementation-java-runtime/META-INF/MANIFEST.MF @@ -1,19 +1,30 @@ Manifest-Version: 1.0 -Export-Package: org.apache.tuscany.sca.implementation.java.context;use - s:="org.apache.tuscany.sca.core.context,org.apache.tuscany.sca.core.f - actory,org.apache.tuscany.sca.implementation.java,org.apache.tuscany. - sca.core.scope,org.apache.tuscany.sca.implementation.java.injection"; - version="2.0.0",org.apache.tuscany.sca.implementation.java.injection;us - es:="org.apache.tuscany.sca.databinding,org.apache.tuscany.sca.databi - nding.xml,org.apache.tuscany.sca.runtime,org.apache.tuscany.sca.inter - facedef.util,org.apache.tuscany.sca.assembly,org.apache.tuscany.sca.c - ontext,org.apache.tuscany.sca.databinding.impl,org.apache.tuscany.sca - .core.context,org.apache.tuscany.sca.implementation.java.introspect,o - rg.apache.tuscany.sca.implementation.java,org.apache.tuscany.sca.inte - rfacedef,org.w3c.dom,javax.xml.namespace,org.apache.tuscany.sca.invoc - ation,org.apache.tuscany.sca.core.factory,org.apache.tuscany.sca.inte - rfacedef.impl,org.oasisopen.sca,org.apache.tuscany.sca.core.invocation";ve - rsion="2.0.0" +Export-Package: org.apache.tuscany.sca.implementation.java.context;version="2.0.0"; + uses:="org.apache.tuscany.sca.core.context, + org.apache.tuscany.sca.core.factory, + org.apache.tuscany.sca.implementation.java, + org.apache.tuscany.sca.core.scope, + org.apache.tuscany.sca.implementation.java.injection", + org.apache.tuscany.sca.implementation.java.injection;version="2.0.0"; + uses:="org.apache.tuscany.sca.databinding, + org.apache.tuscany.sca.databinding.xml, + org.apache.tuscany.sca.runtime, + org.apache.tuscany.sca.interfacedef.util, + org.apache.tuscany.sca.assembly, + org.apache.tuscany.sca.context, + org.apache.tuscany.sca.databinding.impl, + org.apache.tuscany.sca.core.context, + org.apache.tuscany.sca.implementation.java.introspect, + org.apache.tuscany.sca.implementation.java, + org.apache.tuscany.sca.interfacedef, + org.w3c.dom, + javax.xml.namespace, + org.apache.tuscany.sca.invocation, + org.apache.tuscany.sca.core.factory, + org.apache.tuscany.sca.interfacedef.impl, + org.oasisopen.sca, + org.apache.tuscany.sca.core.invocation", + org.apache.tuscany.sca.implementation.java.invocation;version="2.0.0" Private-Package: org.apache.tuscany.sca.implementation.java.invocation ;version="2.0.0",org.apache.tuscany.sca.implementation.java.module;vers ion="2.0.0" From 2b0a45c0dafdbf43ebc70198f5cec826fe6014bb Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Mon, 17 Jan 2011 13:33:14 +0000 Subject: [PATCH 060/157] Make MessageFactoryImpl serializable to enable correct serialization of Endpoints & Endpoint references git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059919 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/core/invocation/impl/MessageFactoryImpl.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/MessageFactoryImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/MessageFactoryImpl.java index 6ce2ffca21..6f3e947631 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/MessageFactoryImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/MessageFactoryImpl.java @@ -19,6 +19,8 @@ package org.apache.tuscany.sca.core.invocation.impl; +import java.io.Serializable; + import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.invocation.MessageFactory; @@ -27,9 +29,14 @@ * * @version $Rev$ $Date$ */ -public class MessageFactoryImpl implements MessageFactory { +public class MessageFactoryImpl implements MessageFactory, Serializable { + + /** + * + */ + private static final long serialVersionUID = -2112289169275106977L; - public Message createMessage() { + public Message createMessage() { return new MessageImpl(); } From e3832777d095ce35af244eb2fd149b9e1bd5c1db Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Mon, 17 Jan 2011 13:35:35 +0000 Subject: [PATCH 061/157] Update deserialization of RuntimeEndpointImpl & RuntimeEndpointReferenceImpl to cope with Threads which dont have a ComponentContext available - in support of TUSCANY-3811 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059921 13f79535-47bb-0310-9956-ffa450edef68 --- modules/core/META-INF/MANIFEST.MF | 1 + modules/core/pom.xml | 6 ++ .../assembly/impl/RuntimeEndpointImpl.java | 61 +++++++++++++++++-- .../impl/RuntimeEndpointReferenceImpl.java | 58 +++++++++++++++++- 4 files changed, 117 insertions(+), 9 deletions(-) diff --git a/modules/core/META-INF/MANIFEST.MF b/modules/core/META-INF/MANIFEST.MF index e9fdadbd1f..95efebc96a 100644 --- a/modules/core/META-INF/MANIFEST.MF +++ b/modules/core/META-INF/MANIFEST.MF @@ -59,6 +59,7 @@ Import-Package: javax.security.auth, org.apache.tuscany.sca.interfacedef.wsdl;version="2.0.0", org.apache.tuscany.sca.invocation;version="2.0.0", org.apache.tuscany.sca.monitor;version="2.0.0", + org.apache.tuscany.sca.node;version="2.0.0", org.apache.tuscany.sca.policy;version="2.0.0", org.apache.tuscany.sca.provider;version="2.0.0", org.apache.tuscany.sca.runtime;version="2.0.0", diff --git a/modules/core/pom.xml b/modules/core/pom.xml index 8354a8e925..8eee896831 100644 --- a/modules/core/pom.xml +++ b/modules/core/pom.xml @@ -53,6 +53,12 @@ 2.0-SNAPSHOT + + org.apache.tuscany.sca + tuscany-node-api + 2.0-SNAPSHOT + + cglib cglib diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java index 5c21041413..263ba6a8c7 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java @@ -43,6 +43,7 @@ import org.apache.tuscany.sca.assembly.CompositeReference; import org.apache.tuscany.sca.assembly.CompositeService; import org.apache.tuscany.sca.assembly.Contract; +import org.apache.tuscany.sca.assembly.Endpoint; import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.assembly.Reference; import org.apache.tuscany.sca.assembly.Service; @@ -81,6 +82,7 @@ import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.invocation.MessageFactory; import org.apache.tuscany.sca.invocation.Phase; +import org.apache.tuscany.sca.node.NodeFactory; import org.apache.tuscany.sca.provider.BindingProviderFactory; import org.apache.tuscany.sca.provider.EndpointAsyncProvider; import org.apache.tuscany.sca.provider.EndpointProvider; @@ -91,8 +93,10 @@ import org.apache.tuscany.sca.provider.PolicyProviderFactory; import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint; import org.apache.tuscany.sca.provider.ServiceBindingProvider; +import org.apache.tuscany.sca.runtime.DomainRegistryFactory; import org.apache.tuscany.sca.runtime.EndpointRegistry; import org.apache.tuscany.sca.runtime.EndpointSerializer; +import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.RuntimeComponentService; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; @@ -892,18 +896,63 @@ protected synchronized void resolve() { if (compositeContext != null) { bind(compositeContext); } - } + } // end if if (serializer != null) { RuntimeEndpointImpl ep = (RuntimeEndpointImpl)serializer.readEndpoint(xml); copyFrom(ep); } else { - // FIXME: [rfeng] What should we do here? - } - } + // In this case, we assume that we're running on a detached (non Tuscany) thread and + // as a result we need to connect back to the Tuscany environment... + for( NodeFactory factory : NodeFactory.getNodeFactories() ) { + ExtensionPointRegistry registry = factory.getExtensionPointRegistry(); + if( registry != null ) { + this.registry = registry; + UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); + this.interfaceContractMapper = utilities.getUtility(InterfaceContractMapper.class); + this.serializer = utilities.getUtility(EndpointSerializer.class); + RuntimeEndpointImpl ep = (RuntimeEndpointImpl)serializer.readEndpoint(xml); + // Find the actual Endpoint in the EndpointRegistry + ep = findActualEP( ep, registry ); + + if( ep != null ){ + copyFrom( ep ); + break; + } // end if + } // end if + } // end for + } // end if + } // end if super.resolve(); - } + } // end method resolve + + /** + * Find the actual Endpoint in the EndpointRegistry which corresponds to the configuration described + * in a deserialized Endpoint + * @param ep The deserialized endpoint + * @param registry - the main extension point Registry + * @return the corresponding Endpoint from the EndpointRegistry, or null if no match can be found + */ + private RuntimeEndpointImpl findActualEP(RuntimeEndpointImpl ep, + ExtensionPointRegistry registry) { + // Get the EndpointRegistry + DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry); + + if( domainRegistryFactory == null ) return null; + + // TODO: For the moment, just use the first (and only!) EndpointRegistry... + EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0]; + + if( endpointRegistry == null ) return null; + + for( Endpoint endpoint : endpointRegistry.findEndpoint(ep.getURI()) ) { + // TODO: For the present, simply return the first matching endpoint + return (RuntimeEndpointImpl) endpoint; + } // end for + + return null; + } // end method findActualEP - public InterfaceContract getBindingInterfaceContract() { + public InterfaceContract getBindingInterfaceContract() { resolve(); if (bindingInterfaceContract != null) { return bindingInterfaceContract; diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java index f86f90c6e6..368ec0ba87 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java @@ -38,6 +38,7 @@ import org.apache.tuscany.sca.assembly.CompositeReference; import org.apache.tuscany.sca.assembly.CompositeService; import org.apache.tuscany.sca.assembly.Contract; +import org.apache.tuscany.sca.assembly.Endpoint; import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.assembly.builder.BindingBuilder; import org.apache.tuscany.sca.assembly.builder.BuilderContext; @@ -70,6 +71,7 @@ import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.invocation.MessageFactory; import org.apache.tuscany.sca.invocation.Phase; +import org.apache.tuscany.sca.node.NodeFactory; import org.apache.tuscany.sca.provider.BindingProviderFactory; import org.apache.tuscany.sca.provider.EndpointReferenceProvider; import org.apache.tuscany.sca.provider.ImplementationAsyncProvider; @@ -78,9 +80,11 @@ import org.apache.tuscany.sca.provider.PolicyProviderFactory; import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint; import org.apache.tuscany.sca.provider.ReferenceBindingProvider; +import org.apache.tuscany.sca.runtime.DomainRegistryFactory; import org.apache.tuscany.sca.runtime.EndpointReferenceBinder; import org.apache.tuscany.sca.runtime.EndpointRegistry; import org.apache.tuscany.sca.runtime.EndpointSerializer; +import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.RuntimeComponentReference; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; @@ -633,11 +637,59 @@ protected synchronized void resolve() { bind(compositeContext); } } - RuntimeEndpointReferenceImpl epr = (RuntimeEndpointReferenceImpl)serializer.readEndpointReference(xml); - copyFrom(epr); + if (serializer != null) { + RuntimeEndpointReferenceImpl epr = (RuntimeEndpointReferenceImpl)serializer.readEndpointReference(xml); + copyFrom(epr); + } else { + // In this case, we assume that we're running on a detached (non Tuscany) thread and + // as a result we need to connect back to the Tuscany environment... + for( NodeFactory factory : NodeFactory.getNodeFactories() ) { + ExtensionPointRegistry registry = factory.getExtensionPointRegistry(); + if( registry != null ) { + this.registry = registry; + UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); + this.serializer = utilities.getUtility(EndpointSerializer.class); + RuntimeEndpointReferenceImpl epr = (RuntimeEndpointReferenceImpl)serializer.readEndpointReference(xml); + // Find the actual Endpoint in the EndpointRegistry + epr = findActualEPR( epr, registry ); + + if( epr != null ){ + copyFrom( epr ); + break; + } // end if + } // end if + } // end for + } // end if } super.resolve(); - } + } // end method resolve + + /** + * Find the actual EndpointReference in the EndpointRegistry which corresponds to the configuration described + * in a deserialized EndpointReference + * @param ep The deserialized endpointReference + * @param registry - the main extension point Registry + * @return the corresponding EndpointReference from the EndpointRegistry, or null if no match can be found + */ + private RuntimeEndpointReferenceImpl findActualEPR(RuntimeEndpointReferenceImpl epr, + ExtensionPointRegistry registry) { + // Get the EndpointRegistry + DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry); + if( domainRegistryFactory == null ) return null; + + // TODO: For the moment, just use the first (and only!) EndpointRegistry... + EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0]; + if( endpointRegistry == null ) return null; + + for( EndpointReference epReference : endpointRegistry.getEndpointReferences() ) { + // TODO: For the present, simply return the first matching endpointReference + if( epReference.getURI().equals(epr.getURI()) ) { + return (RuntimeEndpointReferenceImpl) epReference; + } // end if + } // end for + + return null; + } // end method findActualEPR public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { this.uri = in.readUTF(); From a662fbbe7a76ad41f9cc3d4d355d73bdc809caa8 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Mon, 17 Jan 2011 15:41:21 +0000 Subject: [PATCH 062/157] Correct parsing of quoted strings in the argument list git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1059956 13f79535-47bb-0310-9956-ffa450edef68 --- .../shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java index 00f1626bdb..bd77c2cc1d 100644 --- a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java +++ b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java @@ -505,7 +505,7 @@ List getTokens(String[] toks) { int quotedString(String[] toks, int i) { if (toks[i].startsWith("\"") || toks[i].startsWith("'")) { for (int j=i+1; j Date: Wed, 19 Jan 2011 09:39:38 +0000 Subject: [PATCH 063/157] Rename main class to TuscanyRuntime git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1060728 13f79535-47bb-0310-9956-ffa450edef68 --- .../{NodeFactory.java => TuscanyRuntime.java} | 45 ++++++++++++++----- .../tuscany/sca/runtime/impl/NodeImpl.java | 12 ++--- .../{node2 => runtime}/DeployerTestCase.java | 16 +++---- .../sca/{node2 => runtime}/NodeTestCase.java | 26 +++++------ .../{node2 => runtime}/NodeXMLTestCase.java | 6 +-- .../{node2 => runtime}/TwoNodesTestCase.java | 8 ++-- 6 files changed, 67 insertions(+), 46 deletions(-) rename modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/{NodeFactory.java => TuscanyRuntime.java} (82%) rename modules/domain-node/src/test/java/org/apache/tuscany/sca/{node2 => runtime}/DeployerTestCase.java (87%) rename modules/domain-node/src/test/java/org/apache/tuscany/sca/{node2 => runtime}/NodeTestCase.java (88%) rename modules/domain-node/src/test/java/org/apache/tuscany/sca/{node2 => runtime}/NodeXMLTestCase.java (89%) rename modules/domain-node/src/test/java/org/apache/tuscany/sca/{node2 => runtime}/TwoNodesTestCase.java (88%) diff --git a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/NodeFactory.java b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/TuscanyRuntime.java similarity index 82% rename from modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/NodeFactory.java rename to modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/TuscanyRuntime.java index 2e8e29a05b..b2181ef1f4 100644 --- a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/NodeFactory.java +++ b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/TuscanyRuntime.java @@ -49,7 +49,7 @@ import org.apache.tuscany.sca.work.WorkScheduler; import org.oasisopen.sca.ServiceRuntimeException; -public class NodeFactory { +public class TuscanyRuntime { private Deployer deployer; private ExtensionPointRegistry extensionPointRegistry; @@ -57,26 +57,39 @@ public class NodeFactory { private ExtensibleDomainRegistryFactory domainRegistryFactory; private RuntimeAssemblyFactory assemblyFactory; - public static NodeFactory newInstance() { - return new NodeFactory(null); + public static TuscanyRuntime newInstance() { + return new TuscanyRuntime(null); } - public static NodeFactory newInstance(Properties config) { - return new NodeFactory(config); + public static TuscanyRuntime newInstance(Properties config) { + return new TuscanyRuntime(config); } /** - * A helper method to simplify creating a standalone Node + * A helper method to run a standalone SCA composite * @param compositeURI URI within the contribution of a composite to run * if compositeURI is null then all deployable composites in the contribution will be run * @param contributionURL URL of the contribution * @param dependentContributionURLs optional URLs of dependent contributions * @return a Node with installed contributions */ - public static Node createStandaloneNode(String compositeURI, String contributionURL, String... dependentContributionURLs) { + public static Node runComposite(String compositeURI, String contributionURL, String... dependentContributionURLs) { + return runComposite(newInstance(), compositeURI, contributionURL, dependentContributionURLs); + } + + /** + * A helper method to run a standalone SCA composite + * @param runtime a TuscanyRuntime instance which will be used to run the composite + * this allows sharing a runtime instance to run multiple composites + * @param compositeURI URI within the contribution of a composite to run + * if compositeURI is null then all deployable composites in the contribution will be run + * @param contributionURL URL of the contribution + * @param dependentContributionURLs optional URLs of dependent contributions + * @return a Node with installed contributions + */ + public static Node runComposite(TuscanyRuntime runtime, String compositeURI, String contributionURL, String... dependentContributionURLs) { try { - NodeFactory nodeFactory = newInstance(); - EndpointRegistry endpointRegistry = new EndpointRegistryImpl(nodeFactory.extensionPointRegistry, null, null); - NodeImpl node = new NodeImpl("default", nodeFactory.deployer, nodeFactory.compositeActivator, endpointRegistry, nodeFactory.extensionPointRegistry, nodeFactory); + EndpointRegistry endpointRegistry = new EndpointRegistryImpl(runtime.extensionPointRegistry, null, null); + NodeImpl node = new NodeImpl("default", runtime.deployer, runtime.compositeActivator, endpointRegistry, runtime.extensionPointRegistry, runtime); if (dependentContributionURLs != null) { for (int i=dependentContributionURLs.length-1; i>-1; i--) { @@ -95,7 +108,7 @@ public static Node createStandaloneNode(String compositeURI, String contribution } } - protected NodeFactory(Properties config) { + protected TuscanyRuntime(Properties config) { init(config); } @@ -122,7 +135,6 @@ public Node createNodeFromXML(String configURL) throws ContributionReadException } public void stop() { - deployer.stop(); extensionPointRegistry.stop(); } @@ -152,6 +164,15 @@ protected void init(Properties config) { this.domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(extensionPointRegistry); } + + /** + * Get the ExtensionPointRegistry used by this runtime + * @return extensionPointRegistry + */ + public ExtensionPointRegistry getExtensionPointRegistry() { + return extensionPointRegistry; + } + /** * Get the Deployer. The Deployer can be used to create contribution artifacts * when configuring a Node programatically. diff --git a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java index 32f01698bf..347d63f625 100644 --- a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java +++ b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java @@ -63,7 +63,7 @@ import org.apache.tuscany.sca.runtime.CompositeActivator; import org.apache.tuscany.sca.runtime.EndpointRegistry; import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.NodeFactory; +import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.RuntimeComponentReference; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; @@ -78,17 +78,17 @@ public class NodeImpl implements Node { private CompositeActivator compositeActivator; private EndpointRegistry endpointRegistry; private ExtensionPointRegistry extensionPointRegistry; - private NodeFactory nodeFactory; + private TuscanyRuntime tuscanyRuntime; private static Map allNodes = new HashMap(); - public NodeImpl(String domainName, Deployer deployer, CompositeActivator compositeActivator, EndpointRegistry endpointRegistry, ExtensionPointRegistry extensionPointRegistry, NodeFactory nodeFactory) { + public NodeImpl(String domainName, Deployer deployer, CompositeActivator compositeActivator, EndpointRegistry endpointRegistry, ExtensionPointRegistry extensionPointRegistry, TuscanyRuntime tuscanyRuntime) { this.domainName = domainName; this.deployer = deployer; this.compositeActivator = compositeActivator; this.endpointRegistry = endpointRegistry; this.extensionPointRegistry = extensionPointRegistry; - this.nodeFactory = nodeFactory; + this.tuscanyRuntime = tuscanyRuntime; allNodes.put(domainName, this); } @@ -273,8 +273,8 @@ public void stop() { e.printStackTrace(); } } - if (nodeFactory != null) { - nodeFactory.stop(); + if (tuscanyRuntime != null) { + tuscanyRuntime.stop(); } allNodes.remove(this.domainName); } diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java similarity index 87% rename from modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java rename to modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java index 6d4467a895..bea340c7db 100644 --- a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/DeployerTestCase.java +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.tuscany.sca.node2; +package org.apache.tuscany.sca.runtime; import java.io.File; import java.net.MalformedURLException; @@ -35,7 +35,7 @@ import org.apache.tuscany.sca.monitor.ValidationException; import org.apache.tuscany.sca.runtime.ActivationException; import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.NodeFactory; +import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.junit.Test; import org.oasisopen.sca.NoSuchDomainException; import org.oasisopen.sca.NoSuchServiceException; @@ -44,10 +44,10 @@ public class DeployerTestCase { @Test public void testInstalledContribution() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException { - NodeFactory nodeFactory = NodeFactory.newInstance(); - Node node = nodeFactory.createNode("myDomain"); + TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance(); + Node node = tuscanyRuntime.createNode("myDomain"); - Deployer deployer = nodeFactory.getDeployer(); + Deployer deployer = tuscanyRuntime.getDeployer(); Monitor monitor = deployer.createMonitor(); Contribution contribution = deployer.loadContribution(URI.create("foo"), new File("src/test/resources/sample-helloworld-nodeployable.jar").toURI().toURL(), monitor); monitor.analyzeProblems(); @@ -60,12 +60,12 @@ public void testInstalledContribution() throws NoSuchServiceException, NoSuchDom @Test public void testAddDeploymentComposite() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, MalformedURLException, XMLStreamException { - NodeFactory nodeFactory = NodeFactory.newInstance(); - Node node = nodeFactory.createNode("myDomain"); + TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance(); + Node node = tuscanyRuntime.createNode("myDomain"); node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); - Deployer deployer = nodeFactory.getDeployer(); + Deployer deployer = tuscanyRuntime.getDeployer(); Monitor monitor = deployer.createMonitor(); Composite composite = deployer.loadXMLDocument(new File("src/test/resources/helloworld2.composite").toURI().toURL(), monitor); monitor.analyzeProblems(); diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeTestCase.java similarity index 88% rename from modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java rename to modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeTestCase.java index 2fd1cb7a4e..6787804f06 100644 --- a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeTestCase.java +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeTestCase.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.tuscany.sca.node2; +package org.apache.tuscany.sca.runtime; import java.net.MalformedURLException; import java.util.List; @@ -27,7 +27,7 @@ import org.apache.tuscany.sca.monitor.ValidationException; import org.apache.tuscany.sca.runtime.ActivationException; import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.NodeFactory; +import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.apache.tuscany.sca.runtime.impl.NodeImpl; import org.junit.Ignore; import org.junit.Test; @@ -40,7 +40,7 @@ public class NodeTestCase { @Test public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true); Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); @@ -49,7 +49,7 @@ public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainE @Test public void testStopStart() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true); String ci = node.getStartedCompositeURIs("helloworld").get(0); @@ -72,7 +72,7 @@ public void testStopStart() throws NoSuchServiceException, NoSuchDomainException @Test @Ignore("Depdends on itest/T3558 which isn't in the build?") public void testInstallWithDependent() throws NoSuchServiceException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("store", "../../itest/T3558/src/test/resources/sample-store.jar", null, null, true); node.installContribution("store-client", "../../itest/T3558/src/test/resources/sample-store-client.jar", null, null, true); @@ -82,7 +82,7 @@ public void testInstallWithDependent() throws NoSuchServiceException, Contributi @Test public void testInstallNoDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); try { @@ -99,7 +99,7 @@ public void testInstallNoDeployable() throws NoSuchServiceException, NoSuchDomai @Test public void testGetInstalledContributions() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true); List ics = node.getInstalledContributionURIs(); Assert.assertEquals(1, ics.size()); @@ -108,7 +108,7 @@ public void testGetInstalledContributions() throws NoSuchServiceException, NoSuc @Test public void testGetDeployedCompostes() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, MalformedURLException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("foo", "src/test/resources/sample-helloworld.jar", null, null, true); List dcs = node.getStartedCompositeURIs("foo"); Assert.assertEquals(1, dcs.size()); @@ -117,7 +117,7 @@ public void testGetDeployedCompostes() throws NoSuchServiceException, NoSuchDoma @Test public void testRemoveComposte() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, MalformedURLException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); node.installContribution("foo", "src/test/resources/sample-helloworld.jar", null, null, true); node.stop("foo", "helloworld.composite"); List dcs = node.getStartedCompositeURIs("foo"); @@ -126,7 +126,7 @@ public void testRemoveComposte() throws NoSuchServiceException, NoSuchDomainExce @Test public void testInstallWithMetaData() throws ContributionReadException, ActivationException, ValidationException, NoSuchServiceException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); ((NodeImpl)node).installContribution("helloworld", "src/test/resources/sample-helloworld-nodeployable.jar", "src/test/resources/sca-contribution-generated.xml", null, true); List dcs = node.getStartedCompositeURIs("helloworld"); @@ -139,14 +139,14 @@ public void testInstallWithMetaData() throws ContributionReadException, Activati @Test public void testURI() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNode("default"); + Node node = TuscanyRuntime.newInstance().createNode("default"); String uri = node.installContribution("src/test/resources/sample-helloworld.jar"); Assert.assertEquals("sample-helloworld", uri); } @Test public void testStaticCreate() { - Node node = NodeFactory.createStandaloneNode("helloworld.composite", "src/test/resources/sample-helloworld.jar"); + Node node = TuscanyRuntime.runComposite("helloworld.composite", "src/test/resources/sample-helloworld.jar"); List cs = node.getInstalledContributionURIs(); Assert.assertEquals(1, cs.size()); List dcs = node.getStartedCompositeURIs(cs.get(0)); @@ -156,7 +156,7 @@ public void testStaticCreate() { @Test public void testStaticCreateWithNullComposite() { - Node node = NodeFactory.createStandaloneNode(null, "src/test/resources/sample-helloworld.jar"); + Node node = TuscanyRuntime.runComposite(null, "src/test/resources/sample-helloworld.jar"); List cs = node.getInstalledContributionURIs(); Assert.assertEquals(1, cs.size()); List dcs = node.getStartedCompositeURIs(cs.get(0)); diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java similarity index 89% rename from modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java rename to modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java index 694b0b6f6a..02a1ba1a5a 100644 --- a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/NodeXMLTestCase.java +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.tuscany.sca.node2; +package org.apache.tuscany.sca.runtime; import java.util.List; @@ -26,14 +26,14 @@ import org.apache.tuscany.sca.monitor.ValidationException; import org.apache.tuscany.sca.runtime.ActivationException; import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.NodeFactory; +import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.junit.Test; public class NodeXMLTestCase { @Test public void testHelloworldXML() throws ContributionReadException, ActivationException, ValidationException { - Node node = NodeFactory.newInstance().createNodeFromXML("src/test/resources/helloworldNode.xml"); + Node node = TuscanyRuntime.newInstance().createNodeFromXML("src/test/resources/helloworldNode.xml"); Assert.assertEquals("helloworld", node.getDomainName()); List cs = node.getInstalledContributionURIs(); Assert.assertEquals(1, cs.size()); diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/TwoNodesTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java similarity index 88% rename from modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/TwoNodesTestCase.java rename to modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java index 42949e2924..82ffff93d8 100644 --- a/modules/domain-node/src/test/java/org/apache/tuscany/sca/node2/TwoNodesTestCase.java +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.tuscany.sca.node2; +package org.apache.tuscany.sca.runtime; import junit.framework.Assert; @@ -24,7 +24,7 @@ import org.apache.tuscany.sca.monitor.ValidationException; import org.apache.tuscany.sca.runtime.ActivationException; import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.NodeFactory; +import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.junit.Test; import org.oasisopen.sca.NoSuchDomainException; import org.oasisopen.sca.NoSuchServiceException; @@ -36,11 +36,11 @@ public class TwoNodesTestCase { @Test public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { // Node node1 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44331"); - Node node1 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase"); + Node node1 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase"); node1.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true); // Node node2 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44332&wka=127.0.0.1:44331"); - Node node2 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase"); + Node node2 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase"); Helloworld helloworldService = node2.getService(Helloworld.class, "HelloworldComponent"); Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); From 603b585feaad9e5cab0e7c4bc7cb23dc7cfb0278 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 19 Jan 2011 09:40:55 +0000 Subject: [PATCH 064/157] Delete empty package git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1060729 13f79535-47bb-0310-9956-ffa450edef68 From c4b222f06b0da73e6150c0aa2cabd31afc19cad1 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 19 Jan 2011 10:19:55 +0000 Subject: [PATCH 065/157] Fix runComposite with shared runtime instance and update testcase git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1060741 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/runtime/TuscanyRuntime.java | 10 ++++++-- ...tCase.java => TuscanyRuntimeTestCase.java} | 25 ++++++++++++++++++- 2 files changed, 32 insertions(+), 3 deletions(-) rename modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/{NodeTestCase.java => TuscanyRuntimeTestCase.java} (88%) diff --git a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/TuscanyRuntime.java b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/TuscanyRuntime.java index b2181ef1f4..fa062b1933 100644 --- a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/TuscanyRuntime.java +++ b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/TuscanyRuntime.java @@ -49,6 +49,8 @@ import org.apache.tuscany.sca.work.WorkScheduler; import org.oasisopen.sca.ServiceRuntimeException; +import sun.security.jca.GetInstance; + public class TuscanyRuntime { private Deployer deployer; @@ -73,7 +75,7 @@ public static TuscanyRuntime newInstance(Properties config) { * @return a Node with installed contributions */ public static Node runComposite(String compositeURI, String contributionURL, String... dependentContributionURLs) { - return runComposite(newInstance(), compositeURI, contributionURL, dependentContributionURLs); + return runComposite(null, compositeURI, contributionURL, dependentContributionURLs); } /** @@ -88,8 +90,12 @@ public static Node runComposite(String compositeURI, String contributionURL, Str */ public static Node runComposite(TuscanyRuntime runtime, String compositeURI, String contributionURL, String... dependentContributionURLs) { try { + boolean sharedRuntime = runtime != null; + if (runtime == null) { + runtime = newInstance(); + } EndpointRegistry endpointRegistry = new EndpointRegistryImpl(runtime.extensionPointRegistry, null, null); - NodeImpl node = new NodeImpl("default", runtime.deployer, runtime.compositeActivator, endpointRegistry, runtime.extensionPointRegistry, runtime); + NodeImpl node = new NodeImpl("default", runtime.deployer, runtime.compositeActivator, endpointRegistry, runtime.extensionPointRegistry, sharedRuntime? null : runtime); if (dependentContributionURLs != null) { for (int i=dependentContributionURLs.length-1; i>-1; i--) { diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TuscanyRuntimeTestCase.java similarity index 88% rename from modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeTestCase.java rename to modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TuscanyRuntimeTestCase.java index 6787804f06..f194751e6f 100644 --- a/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeTestCase.java +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TuscanyRuntimeTestCase.java @@ -36,7 +36,7 @@ import sample.Helloworld; -public class NodeTestCase { +public class TuscanyRuntimeTestCase { @Test public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { @@ -163,4 +163,27 @@ public void testStaticCreateWithNullComposite() { Assert.assertEquals(1, dcs.size()); Assert.assertEquals("helloworld.composite", dcs.get(0)); } + @Test + public void testRunComposite() throws NoSuchServiceException { + Node node = TuscanyRuntime.runComposite("helloworld.composite", "src/test/resources/sample-helloworld.jar"); + try { + Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); + Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); + } finally { + node.stop(); + } + } + + @Test + public void testRunCompositeSharedRuntime() throws NoSuchServiceException { + TuscanyRuntime runtime = TuscanyRuntime.newInstance(); + Node node = TuscanyRuntime.runComposite(runtime, "helloworld.composite", "src/test/resources/sample-helloworld.jar"); + try { + Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent"); + Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); + } finally { + node.stop(); + } + runtime.stop(); + } } From a38374c036ffb08724f547a809a13a455cda2f72 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 19 Jan 2011 10:21:35 +0000 Subject: [PATCH 066/157] No code change just organize imports git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1060742 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/tuscany/sca/runtime/Node.java | 1 - .../org/apache/tuscany/sca/runtime/TuscanyRuntime.java | 7 ------- .../java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java | 2 +- .../org/apache/tuscany/sca/runtime/DeployerTestCase.java | 3 --- .../org/apache/tuscany/sca/runtime/NodeXMLTestCase.java | 3 --- .../apache/tuscany/sca/runtime/TuscanyRuntimeTestCase.java | 3 --- .../org/apache/tuscany/sca/runtime/TwoNodesTestCase.java | 3 --- 7 files changed, 1 insertion(+), 21 deletions(-) diff --git a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/Node.java b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/Node.java index 5e9d9973c3..ffd8c2cce0 100644 --- a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/Node.java +++ b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/Node.java @@ -29,7 +29,6 @@ import org.apache.tuscany.sca.contribution.Contribution; import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.monitor.ValidationException; -import org.apache.tuscany.sca.runtime.ActivationException; import org.oasisopen.sca.NoSuchServiceException; public interface Node { diff --git a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/TuscanyRuntime.java b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/TuscanyRuntime.java index fa062b1933..ac13a020b9 100644 --- a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/TuscanyRuntime.java +++ b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/TuscanyRuntime.java @@ -40,17 +40,10 @@ import org.apache.tuscany.sca.monitor.ValidationException; import org.apache.tuscany.sca.node.configuration.ContributionConfiguration; import org.apache.tuscany.sca.node.configuration.NodeConfiguration; -import org.apache.tuscany.sca.runtime.ActivationException; -import org.apache.tuscany.sca.runtime.CompositeActivator; -import org.apache.tuscany.sca.runtime.EndpointRegistry; -import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory; -import org.apache.tuscany.sca.runtime.RuntimeProperties; import org.apache.tuscany.sca.runtime.impl.NodeImpl; import org.apache.tuscany.sca.work.WorkScheduler; import org.oasisopen.sca.ServiceRuntimeException; -import sun.security.jca.GetInstance; - public class TuscanyRuntime { private Deployer deployer; diff --git a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java index 347d63f625..afd30c5e27 100644 --- a/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java +++ b/modules/domain-node/src/main/java/org/apache/tuscany/sca/runtime/impl/NodeImpl.java @@ -63,10 +63,10 @@ import org.apache.tuscany.sca.runtime.CompositeActivator; import org.apache.tuscany.sca.runtime.EndpointRegistry; import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.RuntimeComponentReference; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; +import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.oasisopen.sca.NoSuchServiceException; import org.oasisopen.sca.ServiceRuntimeException; diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java index bea340c7db..369249d441 100644 --- a/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/DeployerTestCase.java @@ -33,9 +33,6 @@ import org.apache.tuscany.sca.deployment.Deployer; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.ValidationException; -import org.apache.tuscany.sca.runtime.ActivationException; -import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.junit.Test; import org.oasisopen.sca.NoSuchDomainException; import org.oasisopen.sca.NoSuchServiceException; diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java index 02a1ba1a5a..910f9a830b 100644 --- a/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/NodeXMLTestCase.java @@ -24,9 +24,6 @@ import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.monitor.ValidationException; -import org.apache.tuscany.sca.runtime.ActivationException; -import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.junit.Test; public class NodeXMLTestCase { diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TuscanyRuntimeTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TuscanyRuntimeTestCase.java index f194751e6f..7ee3ee4481 100644 --- a/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TuscanyRuntimeTestCase.java +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TuscanyRuntimeTestCase.java @@ -25,9 +25,6 @@ import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.monitor.ValidationException; -import org.apache.tuscany.sca.runtime.ActivationException; -import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.apache.tuscany.sca.runtime.impl.NodeImpl; import org.junit.Ignore; import org.junit.Test; diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java index 82ffff93d8..ee10781c00 100644 --- a/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java @@ -22,9 +22,6 @@ import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.monitor.ValidationException; -import org.apache.tuscany.sca.runtime.ActivationException; -import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.junit.Test; import org.oasisopen.sca.NoSuchDomainException; import org.oasisopen.sca.NoSuchServiceException; From 88a29d8de89c01d8b2f25b559d717d4807979ebe Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 19 Jan 2011 11:18:13 +0000 Subject: [PATCH 067/157] Update CHANGES file git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1060767 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index f49c2e5e5e..b02cf090ed 100644 --- a/CHANGES +++ b/CHANGES @@ -5,8 +5,10 @@ Highlights include: - Addition of an interactive Shell to work with SCA domains, contributions, and services - More reorganization of modules to support base-runtime and extension runtime jars - Tidying and simplification of the Web Services binding dependencies - - +- Upgrade to Axis2 1.5.3, Axiom 1.2.10, Abdera 1.1.1 and Jackson 1.6.2 +- Improve jaxb/json databindings and jsonrpc binding to better handle interfaces +- Update to latest OASIS XSDs +- quite a few changes in the async area Changes With Apache Tuscany SCA 2.0-Beta1 November 2010 From 34d3a98e97ea90a7192369c121816ec7d8ef3f5e Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Wed, 19 Jan 2011 18:46:22 +0000 Subject: [PATCH 068/157] Thiss seems to be mid change. Am hoping this will get the build going at least. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1060897 13f79535-47bb-0310-9956-ffa450edef68 --- modules/shell/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/shell/pom.xml b/modules/shell/pom.xml index e13b74325d..a72a7977ab 100644 --- a/modules/shell/pom.xml +++ b/modules/shell/pom.xml @@ -38,6 +38,12 @@ 2.0-SNAPSHOT + + org.apache.tuscany.sca + tuscany-node-api + 2.0-SNAPSHOT + + jline jline From 4e6ee5e13f634566b256da973d7cd07de7e93dca Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 19 Jan 2011 19:33:14 +0000 Subject: [PATCH 069/157] Commite name change missed in previous commit git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1060922 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/tuscany/sca/shell/Shell.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java index bd77c2cc1d..90245c76a7 100644 --- a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java +++ b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java @@ -49,8 +49,7 @@ import org.apache.tuscany.sca.runtime.ActivationException; import org.apache.tuscany.sca.runtime.EndpointRegistry; import org.apache.tuscany.sca.runtime.Node; -import org.apache.tuscany.sca.runtime.NodeFactory; -import org.apache.tuscany.sca.runtime.RuntimeComponent; +import org.apache.tuscany.sca.runtime.TuscanyRuntime; import org.apache.tuscany.sca.runtime.Version; import org.apache.tuscany.sca.runtime.impl.NodeImpl; import org.apache.tuscany.sca.shell.jline.JLine; @@ -63,7 +62,7 @@ public class Shell { private boolean useJline; final List history = new ArrayList(); - private NodeFactory factory; + private TuscanyRuntime runtime; private String currentDomain = ""; private Map standaloneNodes = new HashMap(); private Map nodes = new HashMap(); @@ -95,7 +94,7 @@ public static void main(final String[] args) throws Exception { } public Shell(String domainURI, boolean useJLine) { - this.factory = NodeFactory.newInstance(); + this.runtime = TuscanyRuntime.newInstance(); this.useJline = useJLine; if (domainURI != null) { domain(domainURI); @@ -112,7 +111,7 @@ boolean domain(final String domainURI) { return true; } } - Node node = factory.createNode(domainURI); + Node node = runtime.createNode(domainURI); currentDomain = node.getDomainName(); nodes.put(currentDomain, node); } @@ -284,7 +283,7 @@ boolean listComposites(final String curi) { } boolean load(final String configXmlUrl) throws ContributionReadException, ActivationException, ValidationException { - Node node = factory.createNodeFromXML(configXmlUrl); + Node node = runtime.createNodeFromXML(configXmlUrl); currentDomain = node.getDomainName(); nodes.put(currentDomain, node); return true; @@ -362,7 +361,7 @@ public boolean bye() { for (Node node : nodes.values()) { node.stop(); } - factory.stop(); + runtime.stop(); for (Node node : standaloneNodes.values()) { node.stop(); } @@ -392,7 +391,7 @@ boolean start(String curi, String compositeURI) throws ActivationException, Vali boolean start(String nodeName, String compositeURI, String contributionURL, String... dependentContributionURLs) throws ActivationException, ValidationException { - Node node = NodeFactory.createStandaloneNode(compositeURI, contributionURL, dependentContributionURLs); + Node node = TuscanyRuntime.runComposite(compositeURI, contributionURL, dependentContributionURLs); standaloneNodes.put(nodeName, node); return true; } From 2cb64b6e8de8d2a8fdb837cfd15c7935283b3e2b Mon Sep 17 00:00:00 2001 From: Scott Kurz Date: Wed, 19 Jan 2011 19:34:23 +0000 Subject: [PATCH 070/157] Add multiple output (Holder) itests. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1060924 13f79535-47bb-0310-9956-ffa450edef68 --- .../pom.xml | 123 +++++++ .../java/org/example/orderservice/Order.java | 147 +++++++++ .../example/orderservice/OrderService.java | 58 ++++ .../orderservice/OrderServiceBare.java | 43 +++ .../OrderServiceBareForwardImpl.java | 29 ++ .../orderservice/OrderServiceBareImpl.java | 69 ++++ .../orderservice/OrderServiceForwardImpl.java | 41 +++ .../orderservice/OrderServiceImpl.java | 145 +++++++++ .../java/org/example/orderservice/Status.java | 75 +++++ .../main/resources/ordersca.bare.composite | 41 +++ .../src/main/resources/ordersca.composite | 41 +++ .../OrderServiceBareTestCase.java | 204 ++++++++++++ .../orderservice/OrderServiceTestCase.java | 305 ++++++++++++++++++ testing/itest/ws/pom.xml | 1 + 14 files changed, 1322 insertions(+) create mode 100644 testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml create mode 100644 testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Order.java create mode 100644 testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java create mode 100644 testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBare.java create mode 100644 testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java create mode 100644 testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java create mode 100644 testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java create mode 100644 testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java create mode 100644 testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Status.java create mode 100644 testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite create mode 100644 testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.composite create mode 100644 testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java create mode 100644 testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml b/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml new file mode 100644 index 0000000000..e01106ffb5 --- /dev/null +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml @@ -0,0 +1,123 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 2.0-SNAPSHOT + ../pom.xml + + + jar + holder-ws-service-multiple-outputs + Apache Tuscany SCA Itest - Holder Input/MultipleOutputs + + + + org.apache.tuscany.sca + tuscany-assembly + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-sca-api + 2.0-SNAPSHOT + + + org.apache.tuscany.sca + tuscany-node-api + 2.0-SNAPSHOT + + + org.apache.tuscany.sca + tuscany-node-impl + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-wsdlgen + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-host-http + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-policy-security + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-runtime-axis2 + 2.0-SNAPSHOT + runtime + + + + junit + junit + 4.8.1 + test + + + + + ${artifactId} + + + org.apache.tuscany.maven.plugins + maven-tuscany-plugin + 2.0-SNAPSHOT + + + + diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Order.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Order.java new file mode 100644 index 0000000000..2a4bb26858 --- /dev/null +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Order.java @@ -0,0 +1,147 @@ +/* + * 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.example.orderservice; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

    Java class for order complex type. + * + *

    The following schema fragment specifies the expected content contained within this class. + * + *

    + * <complexType name="order">
    + *   <complexContent>
    + *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    + *       <sequence>
    + *         <element name="customerId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
    + *         <element name="status" type="{http://www.example.org/OrderService/}status" minOccurs="0"/>
    + *         <element name="total" type="{http://www.w3.org/2001/XMLSchema}double"/>
    + *         <element name="orderId" type="{http://www.w3.org/2001/XMLSchema}int"/>
    + *       </sequence>
    + *     </restriction>
    + *   </complexContent>
    + * </complexType>
    + * 
    + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "order", propOrder = { + "customerId", + "status", + "total", + "orderId" +}) +public class Order { + + protected String customerId; + protected Status status; + protected double total; + protected int orderId; + + /** + * Gets the value of the customerId property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCustomerId() { + return customerId; + } + + /** + * Sets the value of the customerId property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCustomerId(String value) { + this.customerId = value; + } + + /** + * Gets the value of the status property. + * + * @return + * possible object is + * {@link Status } + * + */ + public Status getStatus() { + return status; + } + + /** + * Sets the value of the status property. + * + * @param value + * allowed object is + * {@link Status } + * + */ + public void setStatus(Status value) { + this.status = value; + } + + /** + * Gets the value of the total property. + * + */ + public double getTotal() { + return total; + } + + /** + * Sets the value of the total property. + * + */ + public void setTotal(double value) { + this.total = value; + } + + /** + * Gets the value of the orderId property. + * + */ + public int getOrderId() { + return orderId; + } + + /** + * Sets the value of the orderId property. + * + */ + public void setOrderId(int value) { + this.orderId = value; + } + + // Added manually from wsimport generated class to improve debugging. + public String toString() { + return "Order[customerId=" + customerId + ",orderId=" + orderId + ",total=" + total + ",status=" + status.value() + "]"; + } +} diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java new file mode 100644 index 0000000000..d3a8fce8c0 --- /dev/null +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java @@ -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 org.example.orderservice; + +import javax.jws.WebParam; +import javax.jws.WebService; +import javax.xml.ws.Holder; + +import org.oasisopen.sca.annotation.Remotable; + + + +@WebService +@Remotable +public interface OrderService { + + public String[] reviewOrder( + @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT) + Holder myData, + @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.OUT) + Holder myOutParam); + + public String[] reviewOrderTwoInOuts( + @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT) + Holder myData, + @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.INOUT) + Holder myOutParam); + + public String[] reviewOrderTwoOutHolders( + @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.OUT) + Holder myData, + @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.OUT) + Holder myOutParam); + + public String[] reviewOrderTwoInOutsThenIn( + @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT) + Holder myData, + @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.INOUT) + Holder myOutParam, + Integer myCode); +} diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBare.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBare.java new file mode 100644 index 0000000000..b607250806 --- /dev/null +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBare.java @@ -0,0 +1,43 @@ +/* + * 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.example.orderservice; + +import javax.jws.WebParam; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; +import javax.xml.ws.Holder; + +import org.oasisopen.sca.annotation.Remotable; + +@WebService +@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) +public interface OrderServiceBare { + + public Order bareReviewOrder(Order order); + + public void bareReviewOrderInOutHolder( + @WebParam(mode = WebParam.Mode.INOUT) + Holder myData); + + public void bareReviewOrderOutHolder( + @WebParam(mode = WebParam.Mode.OUT) + Holder myData); + +} diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java new file mode 100644 index 0000000000..644ee86652 --- /dev/null +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java @@ -0,0 +1,29 @@ +package org.example.orderservice; + +import javax.xml.ws.Holder; + +import org.oasisopen.sca.annotation.Reference; +import org.oasisopen.sca.annotation.Service; + +@Service(OrderServiceBare.class) +public class OrderServiceBareForwardImpl implements OrderServiceBare { + + @Reference + public OrderServiceBare ref; + + @Override + public Order bareReviewOrder(Order myData) { + Order retVal = ref.bareReviewOrder(myData); + return retVal; + } + + @Override + public void bareReviewOrderInOutHolder(Holder myData) { + ref.bareReviewOrderInOutHolder(myData); + } + + @Override + public void bareReviewOrderOutHolder(Holder myData) { + ref.bareReviewOrderInOutHolder(myData); + } +} diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java new file mode 100644 index 0000000000..fbf68fab7a --- /dev/null +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java @@ -0,0 +1,69 @@ +/* + * 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.example.orderservice; + +// import org.osoa.sca.annotations.Service; +import java.util.Random; + +import javax.jws.WebParam; +import javax.xml.ws.Holder; + +import org.oasisopen.sca.annotation.Service; + +/** + * This class implements the OrderService service. + */ +@Service(OrderServiceBare.class) +public class OrderServiceBareImpl implements OrderServiceBare { + + @Override + public Order bareReviewOrder(Order order) { + double total = order.getTotal(); + Order retVal = new Order(); + if ( total < 100.0 ) { + retVal.setStatus( Status.APPROVED ); + } else if ( total > 1100.0 ) { + retVal.setStatus( Status.REJECTED ); + } + return retVal; + } + + @Override + public void bareReviewOrderInOutHolder(Holder myData) { + double total = myData.value.getTotal(); + myData.value = new Order(); + if ( total < 100.0 ) { + myData.value.setStatus( Status.APPROVED ); + } else if ( total > 1100.0 ) { + myData.value.setStatus( Status.REJECTED ); + } + } + + @Override + public void bareReviewOrderOutHolder(Holder myData) { + boolean holderEmpty = (myData.value == null ? true : false); + myData.value = new Order(); + if (holderEmpty) { + myData.value.setStatus( Status.APPROVED ); + myData.value.setCustomerId("approved.1234"); + } else { + myData.value.setStatus( Status.REJECTED ); + } + } +} diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java new file mode 100644 index 0000000000..eb9b355dfa --- /dev/null +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java @@ -0,0 +1,41 @@ +package org.example.orderservice; + +import javax.xml.ws.Holder; + +import org.oasisopen.sca.annotation.Reference; +import org.oasisopen.sca.annotation.Service; + +@Service(OrderService.class) +public class OrderServiceForwardImpl implements OrderService { + + @Reference + public OrderService ref; + + public String[] reviewOrder(Holder myData, Holder myOutParam) { + String[] retVal = ref.reviewOrder(myData, myOutParam); + return retVal; + } + + @Override + public String[] reviewOrderTwoInOuts(Holder myData, + Holder myOutParam) { + String[] retVal = ref.reviewOrderTwoInOuts(myData, myOutParam); + return retVal; + } + + @Override + public String[] reviewOrderTwoOutHolders(Holder myData, + Holder myOutParam) { + String[] retVal = ref.reviewOrderTwoOutHolders(myData, myOutParam); + return retVal; + } + + @Override + public String[] reviewOrderTwoInOutsThenIn(Holder myData, + Holder myOutParam, Integer myCode) { + String[] retVal = ref.reviewOrderTwoInOutsThenIn(myData, myOutParam, myCode); + return retVal; + } + + +} diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java new file mode 100644 index 0000000000..c6c471c872 --- /dev/null +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java @@ -0,0 +1,145 @@ +/* + * 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.example.orderservice; + +// import org.osoa.sca.annotations.Service; +import java.util.Random; + +import javax.jws.WebParam; +import javax.xml.ws.Holder; + +import org.oasisopen.sca.annotation.Service; + +/** + * This class implements the OrderService service. + */ +@Service(OrderService.class) +public class OrderServiceImpl implements OrderService { + + /** This dummy implementation approves or rejects orders: + * < 100 - always approved. + * 100-1100 - randomly approved. Probability = (1100 - amount)/10 + * >1100 - always rejected. + */ + // public Order reviewOrder(Order order) { + // @WebMethod(action = "http://www.example.org/OrderService/reviewOrder") + // @RequestWrapper(localName = "reviewOrder", targetNamespace = "http://www.example.org/OrderService/", className = "org.example.orderservice.ReviewOrder") + // @ResponseWrapper(localName = "reviewOrderResponse", targetNamespace = "http://www.example.org/OrderService/", className = "org.example.orderservice.ReviewOrderResponse") + public String[] reviewOrder( + @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT) + Holder myData, + @WebParam(name="myOutParam", targetNamespace = "", mode = WebParam.Mode.OUT) + Holder myOutParam) { + String[] returnVal = {"retval1", "retval2"}; + Order order = myData.value; + double total = order.getTotal(); + if ( total < 100.0 ) { + order.setStatus( Status.APPROVED ); + } else if ( total > 1100.0 ) { + order.setStatus( Status.REJECTED ); + } else { + int probability = (int) ((-100.0 + total) / 10.0); + Random approver = new Random(); + if ( approver.nextInt( 100 ) < probability ) + order.setStatus( Status.APPROVED ); + else + order.setStatus( Status.REJECTED ); + } + System.out.println( ">>> OrderService.reviewOrder return=" + order ); + + if ( myOutParam.value == null ) { + myOutParam.value = new Float("97"); + } else { + myOutParam.value = new Float("-1000"); + } + return returnVal; + } + + @Override + public String[] reviewOrderTwoInOuts(Holder myData, + Holder myOutParam) { + String[] returnVal = {"retval1", "retval2"}; + Order order = myData.value; + double total = order.getTotal(); + if ( total < 100.0 ) { + order.setStatus( Status.APPROVED ); + } else if ( total > 1100.0 ) { + order.setStatus( Status.REJECTED ); + } else { + int probability = (int) ((-100.0 + total) / 10.0); + Random approver = new Random(); + if ( approver.nextInt( 100 ) < probability ) + order.setStatus( Status.APPROVED ); + else + order.setStatus( Status.REJECTED ); + } + System.out.println( ">>> OrderService.reviewOrder return=" + order ); + + // Since this is an INOUT, expect "111" to signify test pass + if ( myOutParam.value.equals(new Float("111"))) { + myOutParam.value = new Float("97"); + } else { + myOutParam.value = new Float("-1000"); + } + return returnVal; + } + + @Override + public String[] reviewOrderTwoOutHolders(Holder myData, + Holder myOutParam) { + String[] returnVal = {"retval1", "retval2"}; + if (myData.value == null) { + myData.value = new Order(); + myData.value.setStatus(Status.REJECTED); + } else { + // Do nothing so test logic will fail + } + + // Use test logic to check it's truly treated as an OUT parm + if ( myOutParam.value == null ) { + myOutParam.value = new Float("97"); + } else { + myOutParam.value = new Float("-1000"); + } + return returnVal; + } + + @Override + public String[] reviewOrderTwoInOutsThenIn(Holder myData, + Holder myOutParam, + Integer myCode) { + String[] returnVal = {"retval1", "retval2"}; + Order order = myData.value; + double total = order.getTotal(); + if ( total < 50.1 && myCode.equals(new Integer("23")) ) { + order.setStatus( Status.APPROVED ); + } else { + order.setStatus( Status.REJECTED); + } + + // Use test logic to check it's truly treated as an INOUT parm + if ( myOutParam.value != null ) { + myOutParam.value = new Float("97"); + } else { + myOutParam.value = new Float("-1000"); + } + return returnVal; + } + +} diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Status.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Status.java new file mode 100644 index 0000000000..83b198ab35 --- /dev/null +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Status.java @@ -0,0 +1,75 @@ +/* + * 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.example.orderservice; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

    Java class for status. + * + *

    The following schema fragment specifies the expected content contained within this class. + *

    + *

    + * <simpleType name="status">
    + *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
    + *     <enumeration value="Created"/>
    + *     <enumeration value="Submitted"/>
    + *     <enumeration value="Approved"/>
    + *     <enumeration value="Rejected"/>
    + *   </restriction>
    + * </simpleType>
    + * 
    + * + */ +@XmlType(name = "status") +@XmlEnum +public enum Status { + + @XmlEnumValue("Created") + CREATED("Created"), + @XmlEnumValue("Submitted") + SUBMITTED("Submitted"), + @XmlEnumValue("Approved") + APPROVED("Approved"), + @XmlEnumValue("Rejected") + REJECTED("Rejected"); + private final String value; + + Status(String v) { + value = v; + } + + public String value() { + return value; + } + + public static Status fromValue(String v) { + for (Status c: Status.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite new file mode 100644 index 0000000000..ed8dbb1426 --- /dev/null +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.composite b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.composite new file mode 100644 index 0000000000..9d7d052472 --- /dev/null +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.composite @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java new file mode 100644 index 0000000000..f8d06697a6 --- /dev/null +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java @@ -0,0 +1,204 @@ +/* + * 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.example.orderservice; + +import static junit.framework.Assert.assertNotNull; +import static junit.framework.Assert.assertTrue; +import static org.junit.Assert.assertEquals; + +import java.io.IOException; + +import javax.xml.ws.Holder; + +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.ContributionLocationHelper; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** + * Tests that the order server responds. + */ +public class OrderServiceBareTestCase { + + private Node node; + + @Before + public void startServer() throws Exception { + try { + + NodeFactory factory = NodeFactory.newInstance(); + String contribution = ContributionLocationHelper.getContributionLocation(OrderServiceBare.class); + node = factory.createNode("ordersca.bare.composite", new Contribution("order.bare", contribution)).start(); + } catch (Exception e) { + e.printStackTrace(); + } + + } + + @Test + public void testOrderReviewBareApprovedSCA() throws IOException { + OrderServiceBare orderServiceBare = + node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare"); + assertNotNull(orderServiceBare); + testOrderReviewApproved(orderServiceBare); + } + + @Test + public void testOrderReviewBareApprovedWS() throws IOException { + OrderServiceBare orderServiceBare = + node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare"); + assertNotNull(orderServiceBare); + testOrderReviewApproved(orderServiceBare); + } + + @Test + public void testOrderReviewBareRejectedSCA() throws IOException { + OrderServiceBare orderServiceBare = + node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare"); + assertNotNull(orderServiceBare); + testOrderReviewRejected(orderServiceBare); + } + + @Test + public void testOrderReviewBareRejectedWS() throws IOException { + OrderServiceBare orderServiceBare = + node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare"); + assertNotNull(orderServiceBare); + testOrderReviewRejected(orderServiceBare); + } + + + @Test + public void testOrderReviewInOutBareApprovedSCA() throws IOException { + OrderServiceBare orderServiceBare = + node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare"); + assertNotNull(orderServiceBare); + testOrderReviewApprovedInOutHolder(orderServiceBare); + } + + @Test + public void testOrderReviewInOutBareApprovedWS() throws IOException { + OrderServiceBare orderServiceBare = + node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare"); + assertNotNull(orderServiceBare); + testOrderReviewApprovedInOutHolder(orderServiceBare); + } + + @Test + public void testOrderReviewInOutBareRejectedSCA() throws IOException { + OrderServiceBare orderServiceBare = + node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare"); + assertNotNull(orderServiceBare); + testOrderReviewRejectedInOutHolder(orderServiceBare); + } + + @Test + public void testOrderReviewInOutBareRejectedWS() throws IOException { + OrderServiceBare orderServiceBare = + node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare"); + assertNotNull(orderServiceBare); + testOrderReviewRejectedInOutHolder(orderServiceBare); + } + + @Test + public void testOrderReviewOutHolderSCA() throws IOException { + OrderServiceBare orderServiceBare = + node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare"); + assertNotNull(orderServiceBare); + testOrderReviewOutHolder(orderServiceBare); + } + + @Test + public void testOrderReviewOutHolderWS() throws IOException { + OrderServiceBare orderServiceBare = + node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare"); + assertNotNull(orderServiceBare); + testOrderReviewOutHolder(orderServiceBare); + } + + private void testOrderReviewApproved(OrderServiceBare orderServiceBare) throws IOException { + Order order = new Order(); + order.setStatus( Status.CREATED ); + order.setCustomerId("cust1234"); + order.setTotal( 50.0 ); + + Order returnValue = null; + returnValue = orderServiceBare.bareReviewOrder(order); + assertTrue( returnValue.getStatus() == Status.APPROVED ); + } + + private void testOrderReviewRejected(OrderServiceBare orderServiceBare) throws IOException { + Order order = new Order(); + order.setStatus( Status.CREATED ); + order.setCustomerId("cust1234"); + order.setTotal( 50000.0 ); + + Order returnValue = null; + returnValue = orderServiceBare.bareReviewOrder(order); + assertTrue( returnValue.getStatus() == Status.REJECTED ); + } + + private void testOrderReviewApprovedInOutHolder(OrderServiceBare orderServiceBare) throws IOException { + String customerId = "cust1234"; + Order order = new Order(); + order.setStatus( Status.CREATED ); + order.setCustomerId(customerId); + order.setTotal( 50.0 ); + + Holder holder = new Holder(order); + orderServiceBare.bareReviewOrderInOutHolder(holder); + assertTrue( holder.value.getStatus() == Status.APPROVED ); + assertTrue( holder.value.getCustomerId().equals(customerId)); + } + + private void testOrderReviewRejectedInOutHolder(OrderServiceBare orderServiceBare) throws IOException { + String customerId = "cust1234"; + Order order = new Order(); + order.setStatus( Status.CREATED ); + order.setCustomerId(customerId); + order.setTotal( 50000.0 ); + + Holder holder = new Holder(order); + orderServiceBare.bareReviewOrderInOutHolder(holder); + assertTrue( holder.value.getStatus() == Status.REJECTED ); + assertTrue( holder.value.getCustomerId().equals(customerId)); + } + + private void testOrderReviewOutHolder(OrderServiceBare orderServiceBare) throws IOException { + Order order = new Order(); + order.setStatus( Status.CREATED ); + order.setCustomerId("cust1234"); + order.setTotal( 50.0 ); + Holder holder = new Holder(order); + orderServiceBare.bareReviewOrderOutHolder(holder); + assertTrue( holder.value.getStatus() == Status.APPROVED ); + assertTrue( holder.value.getCustomerId().equals("approved.1234")); + } + + + @After + public void stopServer() throws Exception { + if (node != null) + node.stop(); + } + +} diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java new file mode 100644 index 0000000000..17db43b4e8 --- /dev/null +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java @@ -0,0 +1,305 @@ +/* + * 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.example.orderservice; + +import static junit.framework.Assert.assertNotNull; +import static junit.framework.Assert.assertTrue; +import static org.junit.Assert.assertEquals; + +import java.io.IOException; + +import javax.xml.ws.Holder; + +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.ContributionLocationHelper; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** + * Tests that the order server responds. + */ +public class OrderServiceTestCase { + + private Node node; + + @Before + public void startServer() throws Exception { + try { + + NodeFactory factory = NodeFactory.newInstance(); + String contribution = ContributionLocationHelper.getContributionLocation(OrderService.class); + node = factory.createNode("ordersca.composite", new Contribution("order", contribution)).start(); + } catch (Exception e) { + e.printStackTrace(); + } + + } + + @Test + public void testOrderReviewApprovedSCA() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceComponent/OrderService"); + assertNotNull(orderService); + Holder outParam = new Holder(new Float(57.4)); + testOrderReviewApproved(orderService, outParam); + } + + @Test + public void testOrderReviewApprovedWS() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService"); + assertNotNull(orderService); + Holder outParam = new Holder(new Float(57.4)); + testOrderReviewApproved(orderService, outParam); + } + + @Test + public void testOrderReviewRejectedSCA() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceComponent/OrderService"); + assertNotNull(orderService); + Holder outParam = new Holder(new Float(57.4)); + testOrderReviewRejected(orderService, outParam); + } + + @Test + public void testOrderReviewRejectedWS() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService"); + assertNotNull(orderService); + Holder outParam = new Holder(new Float(57.4)); + testOrderReviewRejected(orderService, outParam); + } + + @Test + public void testOrderReviewRandomSCA() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceComponent/OrderService"); + assertNotNull(orderService); + Holder outParam = new Holder(new Float(57.4)); + testOrderReviewRandom(orderService, outParam); + } + + @Test + public void testOrderReviewRandomWS() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService"); + assertNotNull(orderService); + Holder outParam = new Holder(new Float(57.4)); + testOrderReviewRandom(orderService, outParam); + } + + + + @Test + public void testOrderReviewApprovedTwoInOutsSCA() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceComponent/OrderService"); + assertNotNull(orderService); + Holder outParam = new Holder(new Float(111)); + testOrderReviewApproved(orderService, outParam); + } + + @Test + public void testOrderReviewApprovedTwoInOutsWS() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService"); + assertNotNull(orderService); + Holder outParam = new Holder(new Float(111)); + testOrderReviewApproved(orderService, outParam); + } + + @Test + public void testOrderReviewRejectedTwoInOutsSCA() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceComponent/OrderService"); + assertNotNull(orderService); + Holder outParam = new Holder(new Float(111)); + testOrderReviewRejected(orderService, outParam); + } + + @Test + public void testOrderReviewRejectedTwoInOutsWS() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService"); + assertNotNull(orderService); + Holder outParam = new Holder(new Float(111)); + testOrderReviewRejected(orderService, outParam); + } + + @Test + public void testOrderReviewRandomTwoInOutsSCA() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceComponent/OrderService"); + assertNotNull(orderService); + Holder outParam = new Holder(new Float(111)); + testOrderReviewRandom(orderService, outParam); + } + + @Test + public void testOrderReviewRandomTwoInOutsWS() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService"); + assertNotNull(orderService); + Holder outParam = new Holder(new Float(111)); + testOrderReviewRandom(orderService, outParam); + } + + @Test + public void testOrderReviewTwoOutHoldersSCA() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceComponent/OrderService"); + assertNotNull(orderService); + testOrderReviewTwoOutHolders(orderService); + } + + @Test + public void testOrderReviewTwoOutHoldersWS() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService"); + assertNotNull(orderService); + testOrderReviewTwoOutHolders(orderService); + } + + @Test + public void testOrderReviewTwoInOutsThenInSCA() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceComponent/OrderService"); + assertNotNull(orderService); + testOrderReviewOrderTwoInOutsThenIn(orderService); + } + + @Test + public void testOrderReviewTwoInOutsThenInWS() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService"); + assertNotNull(orderService); + testOrderReviewOrderTwoInOutsThenIn(orderService); + } + + private void testOrderReviewApproved(OrderService orderService, Holder outParam) throws IOException { + Order order = new Order(); + order.setStatus( Status.CREATED ); + order.setCustomerId("cust1234"); + order.setTotal( 50.0 ); + + System.out.println( ">>> Order submitted=" + order ); + Holder holder = new Holder( order ); + String[] returnValue = null; + if (outParam.value.equals(new Float("111"))) { + returnValue = orderService.reviewOrderTwoInOuts( holder, outParam ); + } else { + returnValue = orderService.reviewOrder( holder, outParam ); + } + System.out.println( ">>> Order returned=" + holder.value ); + assertTrue( holder.value.getStatus() == Status.APPROVED ); + assertEquals("retval1", returnValue[0]); + assertEquals("retval2", returnValue[1]); + assertTrue(outParam.value.floatValue() == 97); + } + + private void testOrderReviewRejected(OrderService orderService, Holder outParam) throws IOException { + Order order = new Order(); + order.setStatus( Status.CREATED ); + order.setCustomerId("cust2345"); + order.setTotal( 50000.0 ); + + System.out.println( ">>> Order submitted=" + order ); + Holder holder = new Holder( order ); + String[] returnValue = null; + if (outParam.value.equals(new Float("111"))) { + returnValue = orderService.reviewOrderTwoInOuts( holder, outParam ); + } else { + returnValue = orderService.reviewOrder( holder, outParam ); + } + System.out.println( ">>> Order returned=" + holder.value ); + System.out.println( ">>> return values: " + returnValue[0] + " " + returnValue[1]); + assertTrue( holder.value.getStatus() == Status.REJECTED ); + assertEquals("retval1", returnValue[0]); + assertEquals("retval2", returnValue[1]); + assertTrue(outParam.value.floatValue() == 97); + } + + private void testOrderReviewRandom(OrderService orderService, Holder outParam) throws IOException { + Order order = new Order(); + order.setStatus( Status.CREATED ); + order.setCustomerId("cust3456"); + order.setTotal( 600.0 ); + + System.out.println( ">>> Order submitted=" + order ); + Holder holder = new Holder( order ); + String[] returnValue = null; + if (outParam.value.equals(new Float("111"))) { + returnValue = orderService.reviewOrderTwoInOuts( holder, outParam ); + } else { + returnValue = orderService.reviewOrder( holder, outParam ); + } + System.out.println( ">>> Order returned=" + holder.value ); + assertTrue( holder.value.getStatus() != Status.CREATED ); + assertEquals("retval1", returnValue[0]); + assertEquals("retval2", returnValue[1]); + assertTrue(outParam.value.floatValue() == 97); + } + + private void testOrderReviewTwoOutHolders(OrderService orderService) throws IOException { + Order order = new Order(); + order.setStatus( Status.CREATED ); + order.setCustomerId("cust3456"); + order.setTotal( 600.0 ); + + System.out.println( ">>> Order submitted=" + order ); + Holder holder = new Holder( order ); + Holder outParam = new Holder(new Float(57.4)); + String[] returnValue = orderService.reviewOrderTwoOutHolders( holder, outParam ); + System.out.println( ">>> Order returned=" + holder.value ); + assertTrue( holder.value.getStatus() == Status.REJECTED ); + assertEquals("retval1", returnValue[0]); + assertEquals("retval2", returnValue[1]); + assertTrue(outParam.value.floatValue() == 97); + } + + private void testOrderReviewOrderTwoInOutsThenIn(OrderService orderService) throws IOException { + Order order = new Order(); + order.setStatus( Status.CREATED ); + order.setCustomerId("cust1234"); + order.setTotal( 50.0 ); + + System.out.println( ">>> Order submitted=" + order ); + Holder holder = new Holder( order ); + Holder outParam = new Holder( new Float("1820.234")); + String[] returnValue = null; + Integer checkForMe = new Integer("23"); + returnValue = orderService.reviewOrderTwoInOutsThenIn( holder, outParam, checkForMe); + System.out.println( ">>> Order returned=" + holder.value ); + assertTrue( holder.value.getStatus() == Status.APPROVED ); + assertEquals("retval1", returnValue[0]); + assertEquals("retval2", returnValue[1]); + assertTrue(outParam.value.floatValue() == 97); + } + + @After + public void stopServer() throws Exception { + if (node != null) + node.stop(); + } + +} diff --git a/testing/itest/ws/pom.xml b/testing/itest/ws/pom.xml index 526bbe76ea..7c984eb2eb 100644 --- a/testing/itest/ws/pom.xml +++ b/testing/itest/ws/pom.xml @@ -36,6 +36,7 @@ wsdl endpoints endpoint-references + holder-ws-service-multiple-outputs Wrapped @@ -172,6 +174,13 @@ public Object transform(Object response, TransformationContext context) { List childElements = wrapper.getOutputChildElements(); Class targetWrapperClass = wrapper != null ? wrapper.getOutputWrapperClass() : null; + Object[] outputs = null; + if ( !sourceOp.hasArrayWrappedOutput() ) { + outputs = new Object[] {response}; + } else { + outputs = (Object[])response; + } + // If the source can be wrapped, wrapped it first if (sourceWrapperHandler != null) { WrapperInfo sourceWrapperInfo = sourceOp.getWrapper(); @@ -186,13 +195,12 @@ public Object transform(Object response, TransformationContext context) { if (!childElements.isEmpty()) { // Set the return value sourceWrapperHandler.setChildren(sourceWrapper, - new Object[] {response}, + outputs, sourceOp, false); } - DataType> targetLogicalType = targetType.getLogical(); Object targetWrapper = - mediator.mediate(sourceWrapper, sourceWrapperType, targetLogicalType.getLogical().get(0), context + mediator.mediate(sourceWrapper, sourceWrapperType, targetType.getLogical().get(0), context .getMetadata()); return targetWrapper; } @@ -205,26 +213,21 @@ public Object transform(Object response, TransformationContext context) { return targetWrapper; } - DataType argType = wrapper.getUnwrappedOutputType(); - - if ( !sourceOp.hasHolders() ) { - Object child = response; - DataType> sourceLogicalType = sourceType.getLogical(); - child = mediator.mediate(response, sourceLogicalType.getLogical().get(0), argType, context.getMetadata()); - targetWrapperHandler.setChildren(targetWrapper, new Object[] {child}, targetOp, false); - return targetWrapper; - } else { - Object[] child = (Object[])response; - ArrayList children = new ArrayList(); - for ( int i=0; i < child.length; i++) { - DataType> sourceLogicalType = sourceType.getLogical(); - DataType childType = sourceLogicalType.getLogical().get(i); - if ( childType != null ) - children.add(mediator.mediate(child[i], childType, argType, context.getMetadata())); - } - targetWrapperHandler.setChildren(targetWrapper, children.toArray(), targetOp, false); - return targetWrapper; + // No source wrapper, so we want to transform the child and then wrap the child-level target with the + // target wrapper handler. + + Object[] targetChildren = new Object[outputs.length]; + for (int i = 0; i < outputs.length; i++) { + DataType targetOutputType = wrapper.getUnwrappedOutputType().getLogical().get(i); + targetChildren[i] = + mediator.mediate(outputs[i], sourceType.getLogical().get(i), targetOutputType, context.getMetadata()); } + targetWrapperHandler.setChildren(targetWrapper, + targetChildren, + targetOp, + false); + return targetWrapper; + } else if (sourceWrapped && (!targetWrapped && !targetBare)) { // Wrapped to Unwrapped Object sourceWrapper = response; @@ -245,48 +248,61 @@ public Object transform(Object response, TransformationContext context) { targetWrapperInfo != null ? targetWrapperInfo.getOutputWrapperType() : null; if (targetWrapperType != null && matches(sourceOp.getWrapper(), targetOp.getWrapper())) { - DataType> sourceLogicalType = sourceType.getLogical(); Object targetWrapper = - mediator.mediate(sourceWrapper, sourceLogicalType.getLogical().get(0), targetWrapperType, context + mediator.mediate(sourceWrapper, sourceType.getLogical().get(0), targetWrapperType, context .getMetadata()); - return targetWrapperHandler.getChildren(targetWrapper, targetOp, false).get(0); + List targetChildren = targetWrapperHandler.getChildren(targetWrapper, targetOp, false); + if (targetOp.hasArrayWrappedOutput()) { + return targetChildren.toArray(); + } else { + return targetChildren.get(0); + } } } } - if ( !targetOp.hasHolders()) { - Object child = sourceWrapperHandler.getChildren(sourceWrapper, sourceOp, false).get(0); - DataType childType = sourceOp.getWrapper().getUnwrappedOutputType(); - DataType> foo = targetType.getLogical(); - return mediator.mediate(child, childType, foo.getLogical().get(0), context.getMetadata()); + + // Otherwise we need to unwrap on the source side, and then transform each child + Object[] sourceChildren = sourceWrapperHandler.getChildren(sourceWrapper, sourceOp, false).toArray(); + Object[] target = new Object[sourceChildren.length]; + for (int i = 0; i < sourceChildren.length; i++) { + DataType childType = sourceOp.getWrapper().getUnwrappedOutputType().getLogical().get(i); + target[i] = + mediator.mediate(sourceChildren[i], childType, targetType.getLogical().get(i), context + .getMetadata()); + } + + if (targetOp.hasArrayWrappedOutput()) { + return target; + } else { + if (target.length > 1 ) { + throw new IllegalStateException("Expecting only one output based on Operation model, found: " + + target.length + " # of outputs."); + } + return target[0]; + } + } else { + Object[] outputs = null; + if ( !sourceOp.hasArrayWrappedOutput() ) { + outputs = new Object[] {response}; } else { - Object[] child = sourceWrapperHandler.getChildren(sourceWrapper, sourceOp, false).toArray(); - DataType childType = sourceOp.getWrapper().getUnwrappedOutputType(); - DataType> targetLogicalType = targetType.getLogical(); - - Object[] target = child; - if ( targetLogicalType.getLogical().get(0) == null ) { - target = new Object[child.length +1]; - target[0] = null; - for ( int i=1; i <= child.length; i++ ) { -// if ( targetLogicalType.getLogical().get(i).getDataBinding() == null ) -// targetLogicalType.getLogical().get(i).setDataBinding(targetDataBinding); - target[i] = mediator.mediate(child[i-1], childType, targetLogicalType.getLogical().get(i), context.getMetadata()); - } - } else { - for ( int i=0; i < child.length; i++) { -// if ( targetLogicalType.getLogical().get(i).getDataBinding() == null ) -// targetLogicalType.getLogical().get(i).setDataBinding(targetDataBinding); - target[i] = mediator.mediate(child[i], childType, targetLogicalType.getLogical().get(i) , context.getMetadata()); - } - } - return target; + outputs = (Object[])response; + } + Object[] target = new Object[outputs.length]; + for (int i = 0; i < outputs.length; i++) { + Object child = + mediator.mediate(outputs[i], sourceType.getLogical().get(i), targetType.getLogical().get(i), context + .getMetadata()); + target[i] = child; + } + if (targetOp.hasArrayWrappedOutput()) { + return target; + } else { + if (target.length > 1 ) { + throw new IllegalStateException("Expecting only one output based on Operation model, found: " + + target.length + " # of outputs."); + } + return target[0]; } - } else { - // FIXME: Do we want to handle wrapped to wrapped? - DataType> sourceLogical = sourceType.getLogical(); - DataType> targetLogical = targetType.getLogical(); - return mediator.mediate(response, sourceLogical.getLogical().get(0), targetLogical.getLogical().get(0), context - .getMetadata()); } } catch (Exception e) { throw new TransformationException(e); diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java index df378e55a0..5bb2354520 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java @@ -23,6 +23,7 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; +import java.util.ArrayList; import java.util.IdentityHashMap; import java.util.List; import java.util.Map; @@ -34,6 +35,7 @@ import org.apache.tuscany.sca.core.context.ServiceReferenceExt; import org.apache.tuscany.sca.interfacedef.DataType; import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.interfacedef.ParameterMode; import org.apache.tuscany.sca.interfacedef.java.JavaOperation; import org.apache.tuscany.sca.invocation.InvocationChain; import org.apache.tuscany.sca.invocation.Invoker; @@ -109,15 +111,29 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl // Holder pattern. Items stored in a Holder are promoted to T. // After the invoke, the returned data are placed back in Holder. - Object [] promotedArgs = promoteHolderArgs( args ); - + Object [] promotedArgs = promoteHolderArgs( args ); + + // Strip out OUT-only arguments. Not too sure if the presence + // of a sourceOperation is exactly the right check to use to + // know whether or not to do this, but will assume it is until + // learning otherwise. + Operation sourceOp = chain.getSourceOperation(); + if (sourceOp != null) { + promotedArgs = removeOutOnlyArgs(sourceOp, promotedArgs ); + } + Object result = invoke(chain, promotedArgs, source); + // TODO - Based on the code in JavaInterfaceIntrospectorImpl, it seems there are + // some cases involving generics that we're not taking into account. + boolean voidReturnType = (void.class == method.getReturnType() ? true : false); + // Returned Holder data are placed back in Holder. boolean holderPattern = false; Class [] parameters = method.getParameterTypes(); if ( parameters != null ) { - for ( int i = 0, resultIdx = 0; i < parameters.length; i++ ) { + int resultIdx = (voidReturnType ? 0 : 1); + for ( int i = 0; i < parameters.length; i++ ) { Class parameterType = parameters[ i ]; if ( isHolder( parameterType ) ) { holderPattern = true; @@ -126,15 +142,20 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl Object[] results = (Object[])result; if ( result != null ) { - holder.value = results[++resultIdx]; + holder.value = results[resultIdx++]; } } } } - if ( holderPattern && result != null) - return ((Object[])result)[0]; - else - return result; + if (holderPattern && result != null) { + if (voidReturnType) { + return null; + } else { + return ((Object[])result)[0]; + } + } else { + return result; + } } /** @@ -360,6 +381,24 @@ public void setCallableReference(ServiceReference callableReference) { return promotedArgs; } + /** + * Given an argument array, filters out (removes) OUT-only parameters + * @param sourceOp + * @return array of filtered arguments + */ + Object[] removeOutOnlyArgs(Operation sourceOp, Object[] args) { + if ( args == null ) + return args; + ArrayList retValList = new ArrayList(); + List parmList = sourceOp.getParameterModes(); + for (int i = 0; i < args.length; i++) { + if (parmList.get(i) != ParameterMode.OUT) { + retValList.add(args[i]); + } + } + return retValList.toArray(); + } + /** * Given a Class, tells if it is a Holder by comparing to "javax.xml.ws.Holder" * @param testClass diff --git a/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DataBinding.java b/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DataBinding.java index fd5cf4ac1d..46806c77f1 100644 --- a/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DataBinding.java +++ b/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DataBinding.java @@ -30,18 +30,7 @@ * @tuscany.spi.extension.asclient */ public interface DataBinding { - /** - * A special databinding for input message of an operation - */ - String IDL_INPUT = "idl:input"; - /** - * A special databinding for output message of an operation - */ - String IDL_OUTPUT = "idl:output"; - /** - * A special databinding for fault message of an operation - */ - String IDL_FAULT = "idl:fault"; + /** * The name of a databinding should be case-insensitive and unique * diff --git a/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java b/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java index d6d56e2711..6759edc992 100644 --- a/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java +++ b/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java @@ -18,8 +18,8 @@ */ package org.apache.tuscany.sca.databinding.impl; -import static org.apache.tuscany.sca.databinding.DataBinding.IDL_FAULT; -import static org.apache.tuscany.sca.databinding.DataBinding.IDL_OUTPUT; +import static org.apache.tuscany.sca.interfacedef.Operation.IDL_FAULT; +import static org.apache.tuscany.sca.interfacedef.Operation.IDL_OUTPUT; import java.io.Serializable; import java.lang.reflect.Array; @@ -51,6 +51,7 @@ import org.apache.tuscany.sca.interfacedef.FaultExceptionMapper; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.interfacedef.ParameterMode; import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl; import org.apache.tuscany.sca.interfacedef.util.FaultException; import org.apache.tuscany.sca.interfacedef.util.XMLType; @@ -390,8 +391,8 @@ public Object mediateOutput(Object output, Operation targetOperation, Map metadata) { - DataType sourceType = new DataTypeImpl(IDL_OUTPUT, Object.class, sourceOperation.getOutputType()); - DataType targetType = new DataTypeImpl(IDL_OUTPUT, Object.class, targetOperation.getOutputType()); + DataType sourceType = sourceOperation.getOutputType(); + DataType targetType = targetOperation.getOutputType(); if (sourceType == targetType || (sourceType != null && sourceType.equals(targetType))) { return output; @@ -558,24 +559,30 @@ public Object copyInput(Object input, Operation sourceOperation, Operation targe List inputTypesTarget = targetOperation == null ? null : targetOperation.getInputType().getLogical(); Object[] copy = new Object[data.length]; Map map = new IdentityHashMap(); - for (int i = 0, size = inputTypes.size(); i < size; i++) { - Object arg = data[i]; - if (arg == null) { - copy[i] = null; - } else { - Object copiedArg = map.get(arg); - if (copiedArg != null) { - copy[i] = copiedArg; + for (int i = 0, nextIndex = 0; i < inputTypes.size(); i++) { + // Account for OUT-only parameters. Would be more thorough to look at targetOperation + // and ensure it has the same parameter mode, but we'll let that go for now. + ParameterMode mode = sourceOperation.getParameterModes().get(i); + if (!mode.equals(ParameterMode.OUT)) { + Object arg = data[nextIndex]; + if (arg == null) { + copy[nextIndex] = null; } else { - copiedArg = - copy(arg, - inputTypes.get(i), - inputTypesTarget == null ? null : inputTypesTarget.get(i), - sourceOperation, - targetOperation); - map.put(arg, copiedArg); - copy[i] = copiedArg; + Object copiedArg = map.get(arg); + if (copiedArg != null) { + copy[nextIndex] = copiedArg; + } else { + copiedArg = + copy(arg, + inputTypes.get(i), + inputTypesTarget == null ? null : inputTypesTarget.get(i), + sourceOperation, + targetOperation); + map.put(arg, copiedArg); + copy[nextIndex] = copiedArg; + } } + nextIndex++; } } return copy; @@ -590,7 +597,7 @@ public Object copyOutput(Object data, Operation sourceOperation, Operation targe return null; Object[] output = null; - if ( !sourceOperation.hasHolders() ) { + if ( !sourceOperation.hasArrayWrappedOutput() ) { output = new Object[] {data}; } else { output = (Object[])data; @@ -620,7 +627,7 @@ public Object copyOutput(Object data, Operation sourceOperation, Operation targe } } } - if ( !targetOperation.hasHolders()) { + if ( !targetOperation.hasArrayWrappedOutput()) { return copy[0]; } else { return copy; diff --git a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java index 69da9019a8..ef325e4ae9 100644 --- a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java +++ b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java @@ -133,22 +133,28 @@ public Message invoke(Message msg) { // Only check Holder for remotable interfaces if (imethod != null && op.getInterface().isRemotable()) { List inputTypes = op.getInputType().getLogical(); - for (int i = 0, size = inputTypes.size(); i < size; i++) { - if (ParameterMode.IN != op.getParameterModes().get(i)) { - // Promote array params from [] to [Holder] - Object[] payloadArray = (Object[])payload; - - if ( ParameterMode.INOUT == op.getParameterModes().get(i)) { - Object item = payloadArray[i]; - payloadArray[i] = new Holder(item); - } else { - // Create an empty Holder since we should not pass values for OUT parameters - payloadArray[i] = new Holder(); - } - + Object[] payloadArray = (Object[])payload; + List payloadList = new ArrayList(); + for (int i = 0, nextIndex = 0; i < inputTypes.size(); i++) { + ParameterMode mode = op.getParameterModes().get(i); + if (ParameterMode.IN == mode ) { + payloadList.add(payloadArray[nextIndex++]); + } else if (ParameterMode.INOUT == mode ) { + // Promote array params from [] to [Holder] + Object item = payloadArray[nextIndex++]; + Holder itemHolder = new Holder(item); + payloadList.add(itemHolder); argumentHolderCount++; - } + } else { + // Create an empty Holder since we should not pass values for OUT parameters + payloadList.add(new Holder()); + argumentHolderCount++; + } } + + // Maybe a bit odd to do but this way I don't have to worry about how the invoke if/else + // immediately following might need to be changed. + payload = payloadList.toArray(); } Object ret; @@ -164,18 +170,47 @@ public Message invoke(Message msg) { if (argumentHolderCount > 0) { // Holder pattern. Any payload Holder types are returned as part of the message body. - Object[] payloadArray = (Object[])payload; + Object[] payloadArray = (Object[])payload; + + ArrayList holderOutputs = new ArrayList(); ArrayList result = new ArrayList(); - if (imethod != null) { - - result.add(ret); + if (imethod != null) { + for (int i = 0, size = op.getParameterModes().size(); i < size; i++) { if (ParameterMode.IN != op.getParameterModes().get(i)) { // Demote array params from Holder to . Holder item = (Holder)payloadArray[i]; payloadArray[i] = item.value; - result.add(payloadArray[i]); + holderOutputs.add(payloadArray[i]); + } + } + + // + // Now we account for the fact that we may have a null because of a void return type, + // which is not part of the output DataType, and so should not be returned with the array + // of outputs, or we may have a null as value returned + // from a method with signature with return type other than void, which should be returned + // in the output array. + // + // The logic here is if we already have as many outputs in holders as we have outputs + // altogether, then we don't worry about the return value (which should be null). Might + // be simpler to just check for void, but the code in the Java introspector has a lot + // of quirks for handling parameterized types, and this seems simpler for now. + // + int holderOutputSize = holderOutputs.size(); + int numberOperationOutputs = op.getOutputType().getLogical().size(); + if (holderOutputSize == numberOperationOutputs) { + if (ret != null) { + throw new IllegalStateException("Number of holder outputs equal to number of operations outputs." + + "\nNum = " + holderOutputSize + ", but non-null return value seen: " + ret); } + result = holderOutputs; + } else if (holderOutputSize == numberOperationOutputs - 1) { + result.add(ret); + result.addAll(1, holderOutputs); + } else { + throw new IllegalStateException("Number of holder outputs seen: " + holderOutputSize + + "\nNumber of operation outputs: " + numberOperationOutputs); } } diff --git a/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSAsyncInterfaceProcessor.java b/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSAsyncInterfaceProcessor.java index a57a0b4678..315054fc82 100644 --- a/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSAsyncInterfaceProcessor.java +++ b/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSAsyncInterfaceProcessor.java @@ -82,7 +82,7 @@ public void visitInterface(JavaInterface javaInterface) throws InvalidInterfaceE */ private static boolean isJAXWSAsyncPoolingOperation(Operation operation, Operation asyncOperation) { - if (asyncOperation.getOutputType().getLogical().get(0) == null || Response.class != asyncOperation.getOutputType().getLogical().get(0).getPhysical()) { + if (asyncOperation.getOutputType().getLogical().size() == 0 || Response.class != asyncOperation.getOutputType().getLogical().get(0).getPhysical()) { // The return type is not Response return false; } @@ -149,7 +149,7 @@ && primitiveAssignable(returnType, asyncActualReturnTypeClass)) { */ private static boolean isJAXWSAsyncCallbackOperation(Operation operation, Operation asyncOperation) { - if (asyncOperation.getOutputType().getLogical().get(0) == null || Future.class != asyncOperation.getOutputType().getLogical().get(0).getPhysical()) { + if (asyncOperation.getOutputType().getLogical().size() == 0 || Future.class != asyncOperation.getOutputType().getLogical().get(0).getPhysical()) { // The return type is not Future return false; } diff --git a/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java b/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java index 74b2b53543..da70b3ffba 100644 --- a/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java +++ b/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java @@ -276,27 +276,11 @@ public DataType run() { }); QName outputWrapper = outputWrapperDT.getLogical().getElementName(); - List inputElements = new ArrayList(); - for (int i = 0; i < method.getParameterTypes().length; i++) { - WebParam param = getAnnotation(method, i, WebParam.class); - ns = param != null ? param.targetNamespace() : ""; - // Default to "" for doc-lit-wrapped && non-header - ns = getValue(ns, documentStyle && (param == null || !param.header()) ? "" : tns); - name = param != null ? param.name() : ""; - name = getValue(name, "arg" + i); - QName element = new QName(ns, name); - Object logical = operation.getInputType().getLogical().get(i).getLogical(); - QName type = null; - if (logical instanceof XMLType) { - ((XMLType)logical).setElementName(element); - type = ((XMLType)logical).getTypeName(); - } - inputElements.add(new ElementInfo(element, new TypeInfo(type, false, null))); - if (param != null) { - operation.getParameterModes().set(i, getParameterMode(param.mode())); - } - } - + + // + // Since JAX-WS specifies that the output wrapper bean consists of the return type output first followed + // by any other outputs carried in Holder(s), let's look at the output first. + // List outputElements = new ArrayList(); WebResult result = method.getAnnotation(WebResult.class); // Default to "" for doc-lit-wrapped && non-header @@ -306,7 +290,8 @@ public DataType run() { name = getValue(name, "return"); QName element = new QName(ns, name); - if ((operation.getOutputType() != null) && ( operation.getOutputType().getLogical().get(0) != null)) { + // This must be a check for void? + if ((operation.getOutputType() != null) && (operation.getOutputType().getLogical().size() != 0)) { Object logical = operation.getOutputType().getLogical().get(0).getLogical(); QName type = null; if (logical instanceof XMLType) { @@ -315,7 +300,39 @@ public DataType run() { } outputElements.add(new ElementInfo(element, new TypeInfo(type, false, null))); } - + + List inputElements = new ArrayList(); + for (int i = 0; i < method.getParameterTypes().length; i++) { + WebParam param = getAnnotation(method, i, WebParam.class); + ns = param != null ? param.targetNamespace() : ""; + // Default to "" for doc-lit-wrapped && non-header + ns = getValue(ns, documentStyle && (param == null || !param.header()) ? "" : tns); + name = param != null ? param.name() : ""; + name = getValue(name, "arg" + i); + element = new QName(ns, name); + Object logical = operation.getInputType().getLogical().get(i).getLogical(); + QName type = null; + if (logical instanceof XMLType) { + ((XMLType)logical).setElementName(element); + type = ((XMLType)logical).getTypeName(); + } + + if (param != null) { + ParameterMode mode = getParameterMode(param.mode()); + operation.getParameterModes().set(i, mode); + } + ParameterMode mode = operation.getParameterModes().get(i); + + if (mode.equals(ParameterMode.INOUT)) { + inputElements.add(new ElementInfo(element, new TypeInfo(type, false, null))); + outputElements.add(new ElementInfo(element, new TypeInfo(type, false, null))); + } else if (mode.equals(ParameterMode.OUT)) { + outputElements.add(new ElementInfo(element, new TypeInfo(type, false, null))); + } else { + inputElements.add(new ElementInfo(element, new TypeInfo(type, false, null))); + } + } + String db = inputWrapperDT != null ? inputWrapperDT.getDataBinding() : JAXB_DATABINDING; WrapperInfo wrapperInfo = new WrapperInfo(db, new ElementInfo(inputWrapper, null), new ElementInfo(outputWrapper, null), diff --git a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java index ac12cf6bef..6979e1d6cd 100644 --- a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java +++ b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java @@ -44,6 +44,8 @@ import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; import org.apache.tuscany.sca.interfacedef.InvalidOperationException; import org.apache.tuscany.sca.interfacedef.Operation; +import static org.apache.tuscany.sca.interfacedef.Operation.IDL_INPUT; +import static org.apache.tuscany.sca.interfacedef.Operation.IDL_OUTPUT; import org.apache.tuscany.sca.interfacedef.OverloadedOperationException; import org.apache.tuscany.sca.interfacedef.ParameterMode; import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl; @@ -63,8 +65,6 @@ * @version $Rev$ $Date$ */ public class JavaInterfaceIntrospectorImpl { - public static final String IDL_INPUT = "idl:input"; - public static final String IDL_OUTPUT = "idl:output"; private static final String UNKNOWN_DATABINDING = null; @@ -216,7 +216,7 @@ private List getOperations(Class clazz, List operations = new ArrayList(methods.length); Set names = remotable ? new HashSet() : null; for (Method method : methods) { - boolean hasHolders = false; + boolean hasMultipleOutputs = false; if (method.getDeclaringClass() == Object.class) { // Skip the methods on the Object.class continue; @@ -279,7 +279,7 @@ private List getOperations(Class clazz, ParameterMode mode = ParameterMode.IN; // Holder pattern. Physical types of Holder classes are updated to to aid in transformations. if ( Holder.class == paramType) { - hasHolders = true; + hasMultipleOutputs = true; genericHolderTypes.add(genericParamTypes[i]); Type firstActual = getFirstActualType( genericParamTypes[ i ] ); if ( firstActual != null ) { @@ -293,26 +293,22 @@ private List getOperations(Class clazz, paramDataTypes.add( xmlDataType); operation.getParameterModes().add(mode); } - - - // Get Output Types - List outputDataTypes = new ArrayList(allOutputTypes.length); - Type genericReturnType = method.getGenericReturnType(); - - for ( int i=0; i <= genericHolderTypes.size(); i++ ) { - Class paramType = allOutputTypes[i]; - XMLType xmlOutputType = new XMLType(new QName(ns, "out" + i), null); - - if ( i == 0 ) { - outputDataTypes.add(returnDataType); - } else { - DataTypeImpl xmlDataType = xmlDataType = new DataTypeImpl( - UNKNOWN_DATABINDING, physicalHolderTypes.get(i-1), genericHolderTypes.get(i-1), xmlOutputType); - outputDataTypes.add(xmlDataType); - } - - } - + + // Get Output Types, but skip over void return type + List outputDataTypes = new ArrayList(); + if (returnDataType != null) { + outputDataTypes.add(returnDataType); + } + + // Start at 1, for the first holder, since we already accounted for the return type itself + for ( int i=1; i < allOutputTypes.length; i++ ) { + Class paramType = allOutputTypes[i]; + XMLType xmlOutputType = new XMLType(new QName(ns, "out" + i), null); + DataTypeImpl xmlDataType = xmlDataType = new DataTypeImpl( + UNKNOWN_DATABINDING, physicalHolderTypes.get(i-1), genericHolderTypes.get(i-1), xmlOutputType); + outputDataTypes.add(xmlDataType); + } + // Fault types List faultDataTypes = new ArrayList(faultTypes.length); Type[] genericFaultTypes = method.getGenericExceptionTypes(); @@ -344,7 +340,7 @@ private List getOperations(Class clazz, operation.setFaultTypes(faultDataTypes); operation.setNonBlocking(nonBlocking); operation.setJavaMethod(method); - operation.setHasHolders(hasHolders); + operation.setHasArrayWrappedOutput(hasMultipleOutputs); operations.add(operation); } return operations; @@ -352,15 +348,15 @@ private List getOperations(Class clazz, private Class[] getOutputTypes(Class returnType, Class[] parameterTypes) { - Class[] returnTypes = new Class[parameterTypes.length + 1]; - returnTypes[0] = returnType; - int idx = 1; + + ArrayList> returnTypes = new ArrayList>(); + returnTypes.add(returnType); for ( Class clazz : parameterTypes ) { if ( Holder.class == clazz ) - returnTypes[idx++] = clazz; + returnTypes.add(clazz); } - - return returnTypes; + Class[] arrayType = new Class[0]; + return returnTypes.toArray(arrayType); } diff --git a/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java b/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java index 67191cd43d..48aab67ded 100644 --- a/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java +++ b/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java @@ -38,6 +38,8 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.interfacedef.DataType; import org.apache.tuscany.sca.interfacedef.Operation; +import static org.apache.tuscany.sca.interfacedef.Operation.IDL_INPUT; +import static org.apache.tuscany.sca.interfacedef.Operation.IDL_OUTPUT; import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl; import org.apache.tuscany.sca.interfacedef.util.ElementInfo; import org.apache.tuscany.sca.interfacedef.util.FaultException; @@ -132,52 +134,29 @@ public Wrapper getWrapper() throws InvalidWSDLException { /** * @return - * @throws InvalidServiceContractException + * @throws InvalidWSDLException */ public DataType> getInputType() throws InvalidWSDLException { if (inputType == null) { Input input = operation.getInput(); Message message = (input == null) ? null : input.getMessage(); inputType = getMessageType(message); - inputType.setDataBinding("idl:input"); + inputType.setDataBinding(IDL_INPUT); } return inputType; } /** * @return - * @throws NotSupportedWSDLException + * @throws InvalidWSDLException */ @SuppressWarnings("unchecked") public DataType> getOutputType() throws InvalidWSDLException { if (outputType == null) { Output output = operation.getOutput(); Message outputMsg = (output == null) ? null : output.getMessage(); - - operation.getInput(); - List outputParts = (outputMsg == null) ? null : outputMsg.getOrderedParts(null); - ArrayList partTypes = new ArrayList(); - if (outputParts != null && outputParts.size() > 0) { -// if (outputParts.size() > 1) { -// // We don't support output with multiple parts -// if (logger.isLoggable(Level.WARNING)) { -// logger.warning("Multi-part output is not supported, please use BARE parameter style."); -// } -// // throw new InvalidWSDLException("Multi-part output is not supported"); -// } - for ( Part part : outputParts ) { - DataType partType = new WSDLPart(part, Object.class).getDataType(); - partTypes.add(partType); - } - - // outputType.setMetadata(WSDLOperation.class.getName(), this); - } else { - partTypes.add(null); - } - - - outputType = - new DataTypeImpl>(dataBinding, Object[].class, partTypes); + outputType = getMessageType(outputMsg); + outputType.setDataBinding(IDL_OUTPUT); } return outputType; } diff --git a/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLOperationIntrospectorTestCase.java b/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLOperationIntrospectorTestCase.java index f16ab9c73a..cb0b347ae4 100644 --- a/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLOperationIntrospectorTestCase.java +++ b/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLOperationIntrospectorTestCase.java @@ -79,7 +79,10 @@ public final void testWrappedOperation() throws Exception { DataType childType = childTypes.get(0); Assert.assertEquals(new QName(null, "tickerSymbol"), childType.getLogical().getElementName()); - childType = op.getWrapper().getUnwrappedOutputType(); + DataType> unwrappedOutputType = op.getWrapper().getUnwrappedOutputType(); + childTypes = unwrappedOutputType.getLogical(); + Assert.assertEquals(1, childTypes.size()); + childType = childTypes.get(0); Assert.assertEquals(new QName(null, "price"), childType.getLogical().getElementName()); } From 0ba75e19026f0af61b6184c2cad429a60bc6817a Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Thu, 20 Jan 2011 15:05:12 +0000 Subject: [PATCH 073/157] Manifest updates for package renames git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061332 13f79535-47bb-0310-9956-ffa450edef68 --- modules/shell/META-INF/MANIFEST.MF | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/shell/META-INF/MANIFEST.MF b/modules/shell/META-INF/MANIFEST.MF index a06b4d292e..11092b9b34 100644 --- a/modules/shell/META-INF/MANIFEST.MF +++ b/modules/shell/META-INF/MANIFEST.MF @@ -8,13 +8,13 @@ Bundle-ManifestVersion: 2 Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt Bundle-Description: Apache Tuscany SCA Domain Node Import-Package: + org.apache.tuscany.sca;version="2.0.0", org.apache.tuscany.sca.context;version="2.0.0", + org.apache.tuscany.sca.impl;version="2.0.0", org.apache.tuscany.sca.management;version="2.0.0", org.apache.tuscany.sca.node;version="2.0.0", org.apache.tuscany.sca.node.configuration;version="2.0.0", org.apache.tuscany.sca.node.impl;version="2.0.0", - org.apache.tuscany.sca.node2;version="2.0.0", - org.apache.tuscany.sca.node2.impl;version="2.0.0", org.apache.tuscany.sca.runtime;version="2.0.0", org.apache.tuscany.sca.work;version="2.0.0" Bundle-SymbolicName: org.apache.tuscany.sca.domain.node From e1c9e16ec421375af136b3661c3e9aa19af6dc8e Mon Sep 17 00:00:00 2001 From: Scott Kurz Date: Thu, 20 Jan 2011 15:29:57 +0000 Subject: [PATCH 074/157] Expedite test execution by doing static setup/teardown git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061343 13f79535-47bb-0310-9956-ffa450edef68 --- .../OrderServiceBareTestCase.java | 19 ++++++++++--------- .../orderservice/OrderServiceTestCase.java | 17 ++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java index f8d06697a6..903ac9f86b 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java @@ -30,8 +30,8 @@ import org.apache.tuscany.sca.node.ContributionLocationHelper; import org.apache.tuscany.sca.node.Node; import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; +import org.junit.AfterClass; +import org.junit.BeforeClass; import org.junit.Test; /** @@ -39,10 +39,10 @@ */ public class OrderServiceBareTestCase { - private Node node; + private static Node node; - @Before - public void startServer() throws Exception { + @BeforeClass + public static void startServer() throws Exception { try { NodeFactory factory = NodeFactory.newInstance(); @@ -120,7 +120,7 @@ public void testOrderReviewInOutBareRejectedWS() throws IOException { } @Test - public void testOrderReviewOutHolderSCA() throws IOException { + public void testOrderReviewBareOutHolderSCA() throws IOException { OrderServiceBare orderServiceBare = node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare"); assertNotNull(orderServiceBare); @@ -128,7 +128,7 @@ public void testOrderReviewOutHolderSCA() throws IOException { } @Test - public void testOrderReviewOutHolderWS() throws IOException { + public void testOrderReviewBareOutHolderWS() throws IOException { OrderServiceBare orderServiceBare = node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare"); assertNotNull(orderServiceBare); @@ -195,8 +195,9 @@ private void testOrderReviewOutHolder(OrderServiceBare orderServiceBare) throws } - @After - public void stopServer() throws Exception { + + @AfterClass + public static void stopServer() throws Exception { if (node != null) node.stop(); } diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java index 17db43b4e8..cb18d1f265 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java @@ -30,8 +30,8 @@ import org.apache.tuscany.sca.node.ContributionLocationHelper; import org.apache.tuscany.sca.node.Node; import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.After; -import org.junit.Before; +import org.junit.AfterClass; +import org.junit.BeforeClass; import org.junit.Test; /** @@ -39,12 +39,11 @@ */ public class OrderServiceTestCase { - private Node node; + private static Node node; - @Before - public void startServer() throws Exception { + @BeforeClass + public static void startServer() throws Exception { try { - NodeFactory factory = NodeFactory.newInstance(); String contribution = ContributionLocationHelper.getContributionLocation(OrderService.class); node = factory.createNode("ordersca.composite", new Contribution("order", contribution)).start(); @@ -295,9 +294,9 @@ private void testOrderReviewOrderTwoInOutsThenIn(OrderService orderService) thro assertEquals("retval2", returnValue[1]); assertTrue(outParam.value.floatValue() == 97); } - - @After - public void stopServer() throws Exception { + + @AfterClass + public static void stopServer() throws Exception { if (node != null) node.stop(); } From 1f5452943df43724e5836f2270c3aed11a270336 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Thu, 20 Jan 2011 16:50:18 +0000 Subject: [PATCH 075/157] Stage 1 of Axis2 binding-ws support of async callbacks, as described in TUSCANY-3821 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061384 13f79535-47bb-0310-9956-ffa450edef68 --- .../META-INF/MANIFEST.MF | 2 + .../Axis2ReferenceBindingInvoker.java | 58 +++++++++++++++++-- .../provider/TuscanyServiceProvider.java | 37 ++++++++++-- 3 files changed, 85 insertions(+), 12 deletions(-) diff --git a/modules/binding-ws-runtime-axis2/META-INF/MANIFEST.MF b/modules/binding-ws-runtime-axis2/META-INF/MANIFEST.MF index cfa5f0fd2b..7a0c6dc64a 100644 --- a/modules/binding-ws-runtime-axis2/META-INF/MANIFEST.MF +++ b/modules/binding-ws-runtime-axis2/META-INF/MANIFEST.MF @@ -102,6 +102,7 @@ Import-Package: javax.servlet, org.apache.tuscany.sca.assembly.xml;version="2.0.0", org.apache.tuscany.sca.binding.ws;version="2.0.0", org.apache.tuscany.sca.common.xml;version="2.0.0", + org.apache.tuscany.sca.context;version="2.0.0", org.apache.tuscany.sca.contribution.processor;version="2.0.0", org.apache.tuscany.sca.contribution.resolver;version="2.0.0", org.apache.tuscany.sca.core;version="2.0.0", @@ -132,3 +133,4 @@ Bundle-SymbolicName: org.apache.tuscany.sca.binding.ws.axis2 Bundle-DocURL: http://www.apache.org/ Bundle-RequiredExecutionEnvironment: J2SE-1.5, JavaSE-1.6 +Require-Bundle: org.apache.tuscany.sca.core diff --git a/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java b/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java index 32f6ee9ca5..3f3e63951b 100644 --- a/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java +++ b/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingInvoker.java @@ -49,13 +49,23 @@ import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; import org.apache.axis2.context.MessageContext; +import org.apache.tuscany.sca.assembly.AssemblyFactory; import org.apache.tuscany.sca.assembly.ComponentReference; import org.apache.tuscany.sca.assembly.Endpoint; import org.apache.tuscany.sca.binding.ws.WebServiceBinding; +import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory; +import org.apache.tuscany.sca.context.CompositeContext; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; +import org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory; +import org.apache.tuscany.sca.core.invocation.AsyncResponseInvoker; +import org.apache.tuscany.sca.core.invocation.Constants; import org.apache.tuscany.sca.interfacedef.util.FaultException; import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface; import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.invocation.Message; +import org.apache.tuscany.sca.invocation.MessageFactory; +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; import org.oasisopen.sca.ServiceRuntimeException; @@ -209,9 +219,16 @@ protected OperationClient createOperationClient(Message msg) throws AxisFault { // Axis2 operationClients can not be shared so create a new one for each request final OperationClient operationClient = serviceClient.createClient(wsdlOperationName); operationClient.setOptions(options); - - Endpoint callbackEndpoint = msg.getFrom().getCallbackEndpoint(); - + + Endpoint callbackEndpoint; + AsyncResponseInvoker respInvoker = (AsyncResponseInvoker) msg.getHeaders().get(Constants.ASYNC_RESPONSE_INVOKER); + if( respInvoker != null ) { + callbackEndpoint = createAsyncResponseEndpoint( msg, respInvoker ); + msg.setTo(callbackEndpoint); + } else { + callbackEndpoint = msg.getFrom().getCallbackEndpoint(); + } // end if + SOAPEnvelope sev = requestMC.getEnvelope(); SOAPHeader sh = sev.getHeader(); @@ -251,7 +268,36 @@ public Object run() throws AxisFault { return operationClient; } // end method createOperationClient - private String getToAddress( Message msg ) throws ServiceRuntimeException { + /** + * Create an Async Response Endpoint + * @param msg - the Tuscany message + * @param respInvoker - the AsyncResponseInvoker for the async response + * @return - an Endpoint which embodies the callback address + */ + private Endpoint createAsyncResponseEndpoint(Message msg, + AsyncResponseInvoker respInvoker) { + String callbackAddress = respInvoker.getResponseTargetAddress(); + if( callbackAddress == null ) return null; + + // Get the necessary factories + ExtensionPointRegistry registry = endpointReference.getCompositeContext().getExtensionPointRegistry(); + FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); + RuntimeAssemblyFactory assemblyFactory = (RuntimeAssemblyFactory)modelFactories.getFactory(AssemblyFactory.class); + WebServiceBindingFactory webServiceBindingFactory = (WebServiceBindingFactory)modelFactories.getFactory(WebServiceBindingFactory.class); + + // Create the endpoint + RuntimeEndpoint callbackEndpoint = (RuntimeEndpoint)assemblyFactory.createEndpoint(); + // Add a binding + WebServiceBinding cbBinding = webServiceBindingFactory.createWebServiceBinding(); + cbBinding.setURI(callbackAddress); + callbackEndpoint.setBinding(cbBinding); + // Embed the response Address URI + callbackEndpoint.setURI(callbackAddress); + callbackEndpoint.setUnresolved(true); + return callbackEndpoint; + } // end method createAsyncResponseEndpoint + + private String getToAddress( Message msg ) throws ServiceRuntimeException { String address = null; // if target endpoint was not specified when this invoker was created, @@ -292,11 +338,11 @@ private void addWSAFromHeader( SOAPHeader sh, EndpointReference fromEPR ) throws * @throws AxisFault - if an error occurs setting the wsa:From into the header */ private void addWSAMessageIDHeader( SOAPHeader sh, String msgID ) throws AxisFault { + if( msgID == null ) return; OMElement idHeader = sh.getOMFactory().createOMElement(QNAME_WSA_MESSAGEID); idHeader.setText( msgID ); sh.addChild(idHeader); - } // end method addWSAMessageIDHeader private static String WS_REF_PARMS = "WS_REFERENCE_PARAMETERS"; @@ -353,7 +399,7 @@ private void addWSAActionHeader( SOAPHeader sh ) { * @param msg - the message */ private void addWSARelatesTo( SOAPHeader sh, Message msg ) { - String idValue = (String) msg.getHeaders().get(WS_MESSAGE_ID); + String idValue = (String) msg.getHeaders().get("RELATES_TO"); if( idValue != null ){ OMElement relatesToOM = sh.getOMFactory().createOMElement( QNAME_WSA_RELATESTO ); OMAttribute relType = sh.getOMFactory().createOMAttribute("RelationshipType", null, SCA_CALLBACK_REL); diff --git a/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/TuscanyServiceProvider.java b/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/TuscanyServiceProvider.java index ba23e80d88..70875916df 100644 --- a/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/TuscanyServiceProvider.java +++ b/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/TuscanyServiceProvider.java @@ -46,10 +46,14 @@ import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory; +import org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl; +import org.apache.tuscany.sca.core.invocation.AsyncResponseInvoker; +import org.apache.tuscany.sca.core.invocation.Constants; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.invocation.MessageFactory; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; +import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; import org.oasisopen.sca.ServiceRuntimeException; public class TuscanyServiceProvider { @@ -151,6 +155,9 @@ public OMElement invoke(OMElement requestOM, MessageContext inMC) throws Invocat // Create a from EPR to hold the details of the callback endpoint, if any createCallbackEPR( callbackAddress, inMC, msg ); + + // Set up any async response EPR + setupAsyncResponse( msg, callbackAddress ); Message response = endpoint.invoke(msg); @@ -199,6 +206,26 @@ public OMElement invoke(OMElement requestOM, MessageContext inMC) throws Invocat } // end method /** + * Setup the necessary infrastructure for the Async response handling + * @param msg + * @param callbackAddress + */ + private void setupAsyncResponse(Message msg, String callbackAddress) { + if( !endpoint.isAsyncInvocation() ) return; + + endpoint.createAsyncServerCallback(); + RuntimeEndpointReference asyncCallback = endpoint.getAsyncServerCallback(); + + // Create a response invoker, containing the callback address and add it to the message headers + AsyncResponseInvoker respInvoker = + new AsyncResponseInvoker(endpoint, asyncCallback, + callbackAddress, + (String)msg.getHeaders().get(Constants.MESSAGE_ID), + msg.getOperation().getName(), messageFactory); + msg.getHeaders().put(Constants.ASYNC_RESPONSE_INVOKER, respInvoker); + } // end method setupAsyncResponse + + /** * If there is a callback address, create an EPR for the callback with a referenced endpoint that contains * the binding and the target callback address * @param callbackAddress - the callback address - may be null @@ -216,7 +243,7 @@ private void createCallbackEPR( String callbackAddress, MessageContext inMC, Mes from.setTargetEndpoint(fromEndpoint); from.setStatus(EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED); msg.setFrom(from); - Endpoint callbackEndpoint = assemblyFactory.createEndpoint(); + RuntimeEndpoint callbackEndpoint = (RuntimeEndpoint)assemblyFactory.createEndpoint(); // WebServiceBinding cbBinding = webServiceBindingFactory.createWebServiceBinding(); cbBinding.setURI(callbackAddress); @@ -262,7 +289,6 @@ private String handleCallbackAddress( SOAPHeader header, Message msg ) { return callbackAddress; } // end method handleCallbackAddress - private static String WS_MESSAGE_ID = "WS_MESSAGE_ID"; /** * Handle a SOAP wsa:MessageID header - place the contents into the Tuscany message for use by any callback * @param header - the SOAP Headers @@ -274,11 +300,10 @@ private void handleMessageIDHeader( SOAPHeader header, Message msg ) { if (messageID != null) { String idValue = messageID.getText(); // Store the value of the message ID element into the message under "WS_MESSAGE_ID"... - msg.getHeaders().put(WS_MESSAGE_ID, idValue); + msg.getHeaders().put(Constants.MESSAGE_ID, idValue); } // end if } // end method handleMessageID - private static String WS_RELATES_TO = "WS_RELATES_TO"; /** * Handle a SOAP wsa:RelatesTo header - place the contents into the Tuscany message for use by any callback * @param header - the SOAP Headers @@ -289,8 +314,8 @@ private void handleRelatesToHeader( SOAPHeader header, Message msg ) { OMElement messageID = header.getFirstChildWithName(QNAME_WSA_RELATESTO); if (messageID != null) { String idValue = messageID.getText(); - // Store the value of the message ID element into the message under "WS_MESSAGE_ID"... - msg.getHeaders().put(WS_MESSAGE_ID, idValue); + // Store the value of the message ID element into the message under "RELATES_TO"... + msg.getHeaders().put(Constants.RELATES_TO, idValue); } // end if } // end method handleMessageID } // end class AsyncResponseHandler From 6f37726a9336b10364129d2eabaad80db7fe7a48 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Thu, 20 Jan 2011 16:52:03 +0000 Subject: [PATCH 076/157] Stage 1 of Axis2 binding-ws support of async callbacks, as described in TUSCANY-3821 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061385 13f79535-47bb-0310-9956-ffa450edef68 --- .../assembly/impl/RuntimeEndpointImpl.java | 69 +++++++++++++------ .../impl/CallbackServiceReferenceImpl.java | 16 ++++- .../core/invocation/AsyncResponseInvoker.java | 61 ++++++++++++---- .../sca/core/invocation/Constants.java | 8 +-- .../impl/AsyncResponseHandlerImpl.java | 12 ++-- .../impl/JDKCallbackInvocationHandler.java | 64 ++++++++++++++++- 6 files changed, 181 insertions(+), 49 deletions(-) diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java index 263ba6a8c7..e598be277a 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java @@ -62,6 +62,7 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory; import org.apache.tuscany.sca.core.invocation.AsyncResponseService; +import org.apache.tuscany.sca.core.invocation.Constants; import org.apache.tuscany.sca.core.invocation.ExtensibleWireProcessor; import org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor; import org.apache.tuscany.sca.core.invocation.RuntimeInvoker; @@ -279,10 +280,11 @@ public Message invoke(Message msg) { // Deal with async callback // Ensure invocation chains are built... getInvocationChains(); - if ( !this.getCallbackEndpointReferences().isEmpty() ) { + // async callback handling + if( this.isAsyncInvocation() && !this.getCallbackEndpointReferences().isEmpty() ) { RuntimeEndpointReference asyncEPR = (RuntimeEndpointReference) this.getCallbackEndpointReferences().get(0); // Place a link to the callback EPR into the message headers... - msg.getHeaders().put("ASYNC_CALLBACK", asyncEPR ); + msg.getHeaders().put(Constants.ASYNC_CALLBACK, asyncEPR ); } // end of async callback handling return invoker.invokeBinding(msg); @@ -372,7 +374,7 @@ private void initInvocationChains() { // Handle cases where the operation is an async server if( targetOperation.isAsyncServer() ) { - createAsyncServerCallback( this, operation ); + createAsyncServerCallback(); } // end if } @@ -412,24 +414,32 @@ private void initInvocationChains() { } // end method initInvocationChains /** - * Creates the async callback for the supplied Endpoint and Operation, if it does not already exist + * Creates the async callback for this Endpoint, if it does not already exist * and stores it into the Endpoint - * @param endpoint - the Endpoint - * @param operation - the Operation */ - private void createAsyncServerCallback( RuntimeEndpoint endpoint, Operation operation ) { + public void createAsyncServerCallback( ) { // No need to create a callback if the Binding supports async natively... - if( hasNativeAsyncBinding(endpoint) ) return; + if( hasNativeAsyncBinding(this) ) return; // Check to see if the callback already exists - if( asyncCallbackExists( endpoint ) ) return; + if( asyncCallbackExists( this ) ) return; - RuntimeEndpointReference asyncEPR = createAsyncEPR( endpoint ); + RuntimeEndpointReference asyncEPR = createAsyncEPR( this ); // Store the new callback EPR into the Endpoint - endpoint.getCallbackEndpointReferences().add(asyncEPR); + this.getCallbackEndpointReferences().add(asyncEPR); + + // Also store the callback EPR into the EndpointRegistry + EndpointRegistry epReg = getEndpointRegistry( registry ); + if( epReg != null ) epReg.addEndpointReference(asyncEPR); } // end method createAsyncServerCallback + public RuntimeEndpointReference getAsyncServerCallback() { + + return (RuntimeEndpointReference) this.getCallbackEndpointReferences().get(0); + } // end method getAsyncServerCallback + + /** * Indicates if a given endpoint has a Binding that supports native async invocation * @param endpoint - the endpoint @@ -455,6 +465,9 @@ private RuntimeEndpointReference createAsyncEPR( RuntimeEndpoint endpoint ){ RuntimeEndpointReference epr = (RuntimeEndpointReference)assemblyFactory.createEndpointReference(); epr.bind( compositeContext ); + // Create pseudo-component + epr.setComponent(component); + // Create pseudo-reference ComponentReference reference = assemblyFactory.createComponentReference(); ExtensionPointRegistry registry = compositeContext.getExtensionPointRegistry(); @@ -487,8 +500,6 @@ private RuntimeEndpointReference createAsyncEPR( RuntimeEndpoint endpoint ){ // Need to establish policies here (binding has some...) epr.getRequiredIntents().addAll( endpoint.getRequiredIntents() ); epr.getPolicySets().addAll( endpoint.getPolicySets() ); - String eprURI = endpoint.getComponent().getName() + "#reference-binding(" + referenceName + "/" + referenceName + ")"; - epr.setURI(eprURI); // Attach a dummy endpoint to the epr RuntimeEndpoint ep = (RuntimeEndpoint)assemblyFactory.createEndpoint(); @@ -497,6 +508,10 @@ private RuntimeEndpointReference createAsyncEPR( RuntimeEndpoint endpoint ){ //epr.setStatus(EndpointReference.Status.RESOLVED_BINDING); epr.setStatus(EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED); epr.setUnresolved(false); + + // Set the URI for the EPR + String eprURI = endpoint.getComponent().getName() + "#reference-binding(" + referenceName + "/" + referenceName + ")"; + epr.setURI(eprURI); return epr; } // end method RuntimeEndpointReference @@ -536,10 +551,10 @@ private Binding createMatchingBinding( Binding matchBinding, RuntimeComponent co XMLStreamReader reader = inputFactory.createXMLStreamReader(source); reader.next(); Binding newBinding = (Binding) processor.read(reader, context ); - newBinding.setName("asyncCallback"); + newBinding.setName(reference.getName()); // Create a URI address for the callback based on the Component_Name/Reference_Name pattern - String callbackURI = "/" + component.getName() + "/" + reference.getName(); + //String callbackURI = "/" + component.getName() + "/" + reference.getName(); //newBinding.setURI(callbackURI); BuilderExtensionPoint builders = registry.getExtensionPoint(BuilderExtensionPoint.class); @@ -934,13 +949,7 @@ protected synchronized void resolve() { */ private RuntimeEndpointImpl findActualEP(RuntimeEndpointImpl ep, ExtensionPointRegistry registry) { - // Get the EndpointRegistry - DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry); - - if( domainRegistryFactory == null ) return null; - - // TODO: For the moment, just use the first (and only!) EndpointRegistry... - EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0]; + EndpointRegistry endpointRegistry = getEndpointRegistry( registry ); if( endpointRegistry == null ) return null; @@ -951,6 +960,22 @@ private RuntimeEndpointImpl findActualEP(RuntimeEndpointImpl ep, return null; } // end method findActualEP + + /** + * Get the EndpointRegistry + * @param registry - the ExtensionPoint registry + * @return the EndpointRegistry - will be null if the EndpointRegistry cannot be found + */ + private EndpointRegistry getEndpointRegistry( ExtensionPointRegistry registry) { + DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry); + + if( domainRegistryFactory == null ) return null; + + // TODO: For the moment, just use the first (and only!) EndpointRegistry... + EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0]; + + return endpointRegistry; + } // end method public InterfaceContract getBindingInterfaceContract() { resolve(); diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java index 542a80f926..6f5b0be0e7 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java @@ -24,6 +24,7 @@ import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.context.CompositeContext; import org.apache.tuscany.sca.context.ThreadMessageContext; +import org.apache.tuscany.sca.core.invocation.Constants; import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; import org.oasisopen.sca.ServiceRuntimeException; @@ -32,8 +33,18 @@ public class CallbackServiceReferenceImpl extends ServiceReferenceImpl { private RuntimeEndpointReference callbackEPR; private List callbackEPRs; private Endpoint resolvedEndpoint; + // Holds the ID of the Message that caused the creation of this CallbackServiceReference + private String msgID; - /* + /** + * Gets the message ID associated with this callback reference + * @return the message ID + */ + public String getMsgID() { + return msgID; + } + + /* * Public constructor for Externalizable serialization/deserialization */ public CallbackServiceReferenceImpl() { @@ -62,6 +73,9 @@ public void init() { throw new ServiceRuntimeException("No callback binding found for " + msgContext.getTo().toString()); } resolvedEndpoint = msgContext.getFrom().getCallbackEndpoint(); + + // Capture the Message ID from the message which caused the creation of this CallBackServiceReference + this.msgID = (String) msgContext.getHeaders().get(Constants.MESSAGE_ID); } @Override diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java index 8bcda4efb2..55c8d7fcab 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java @@ -23,6 +23,7 @@ import java.util.Iterator; import java.util.List; +import org.apache.tuscany.sca.assembly.Endpoint; import org.apache.tuscany.sca.context.CompositeContext; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; @@ -58,6 +59,7 @@ public class AsyncResponseInvoker implements InvokerAsyncResponse, Serializab private String operationName; private MessageFactory messageFactory; private String bindingType = ""; + private boolean isNativeAsync; public AsyncResponseInvoker(RuntimeEndpoint requestEndpoint, RuntimeEndpointReference responseEndpointReference, @@ -70,6 +72,13 @@ public AsyncResponseInvoker(RuntimeEndpoint requestEndpoint, this.relatesToMsgID = relatesToMsgID; this.operationName = operationName; this.messageFactory = messageFactory; + + if ((requestEndpoint.getBindingProvider() instanceof EndpointAsyncProvider) && + (((EndpointAsyncProvider)requestEndpoint.getBindingProvider()).supportsNativeAsync())){ + isNativeAsync = true; + } else { + isNativeAsync = false; + } // end if } // end constructor /** @@ -79,8 +88,7 @@ public void invokeAsyncResponse(Message responseMessage) { responseMessage.getHeaders().put(Constants.ASYNC_RESPONSE_INVOKER, this); responseMessage.getHeaders().put(Constants.RELATES_TO, relatesToMsgID); - if ((requestEndpoint.getBindingProvider() instanceof EndpointAsyncProvider) && - (((EndpointAsyncProvider)requestEndpoint.getBindingProvider()).supportsNativeAsync())){ + if (isNativeAsync){ // process the response as a native async response requestEndpoint.invokeAsyncResponse(responseMessage); } else { @@ -106,8 +114,8 @@ public void setRelatesToMsgID(String relatesToMsgID) { } /** - * If you have Java beans you can call this and we'll create - * a Tuscany message + * Invokes the async response where the parameter is Java bean(s) + * - this method creates a Tuscany message * * @param args the response data */ @@ -115,10 +123,22 @@ public void invokeAsyncResponse(Object args) { Message msg = messageFactory.createMessage(); - msg.setOperation(getOperation()); + msg.setOperation(getOperation( args )); + + // If this is not native async, then any Throwable is being passed as a parameter and + // requires wrapping + if( !isNativeAsync && args instanceof Throwable ) { + args = new AsyncFaultWrapper( (Throwable) args ); + } // end if - // on the the following will be null depending - // on whether this is native or non-native async + // If this is not native async, then the message must contain an array of args since + // this is what is expected when invoking an EPR for the async response... + if( !isNativeAsync ) { + Object[] objs = new Object[1]; + objs[0] = args; + args = objs; + } // end if + msg.setTo(requestEndpoint); msg.setFrom(responseEndpointReference); @@ -132,12 +152,22 @@ public void invokeAsyncResponse(Object args) { } // end method invokeAsyncResponse(Object) - private Operation getOperation() { - List ops = requestEndpoint.getService().getInterfaceContract().getInterface().getOperations(); - for (Operation op : ops) { - if( operationName.equals(op.getName()) ) return op; - } // end for - return null; + private Operation getOperation( Object args ) { + if( isNativeAsync ) { + List ops = requestEndpoint.getService().getInterfaceContract().getInterface().getOperations(); + for (Operation op : ops) { + if( operationName.equals(op.getName()) ) return op; + } // end for + return null; + } else { + operationName = "setResponse"; + if( args instanceof Throwable ) { operationName = "setWrappedFault"; } + List ops = responseEndpointReference.getReference().getInterfaceContract().getInterface().getOperations(); + for (Operation op : ops) { + if( operationName.equals(op.getName()) ) return op; + } // end for + return null; + } // end if } // end getOperation public void setBindingType(String bindingType) { @@ -155,4 +185,9 @@ public RuntimeEndpoint getRequestEndpoint() { public RuntimeEndpointReference getResponseEndpointReference() { return this.responseEndpointReference; } + + public void setResponseEndpointReference( + RuntimeEndpointReference responseEndpointReference) { + this.responseEndpointReference = responseEndpointReference; + } } // end class diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/Constants.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/Constants.java index 5534828b8a..d6f872d00a 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/Constants.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/Constants.java @@ -22,10 +22,10 @@ /** * Constants used during invocation in the runtime * - */ public interface Constants { - String MESSAGE_ID = "MESSAGE_ID"; - String RELATES_TO = "RELATES_TO"; - String ASYNC_RESPONSE_INVOKER = "ASYNC_RESPONSE_INVOKER"; + String MESSAGE_ID = "MESSAGE_ID"; + String RELATES_TO = "RELATES_TO"; + String ASYNC_RESPONSE_INVOKER = "ASYNC_RESPONSE_INVOKER"; + String ASYNC_CALLBACK = "ASYNC_CALLBACK"; } diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponseHandlerImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponseHandlerImpl.java index 1e49767880..9de1809200 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponseHandlerImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncResponseHandlerImpl.java @@ -30,6 +30,7 @@ import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper; import org.apache.tuscany.sca.core.invocation.AsyncResponseHandler; +import org.apache.tuscany.sca.core.invocation.Constants; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.invocation.Message; @@ -155,13 +156,10 @@ public void setResponse(V res) { } * @param msg - the Tuscany message containing the response from the async service invocation * which is either the Response message or an exception of some kind */ - private static final String WS_MESSAGE_ID = "WS_MESSAGE_ID"; - public Message invoke(Message msg) { - // Get the unique ID from the message header - String idValue = (String)msg.getHeaders().get(WS_MESSAGE_ID); - if (idValue == null){ - idValue = (String)msg.getHeaders().get("MESSAGE_ID"); - } + @SuppressWarnings({ "unchecked", "rawtypes" }) + public Message invoke(Message msg) { + // Get the unique ID from the RELATES_TO message header + String idValue = (String)msg.getHeaders().get(Constants.RELATES_TO); if( idValue == null ) { System.out.println( "Async message ID not found "); diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKCallbackInvocationHandler.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKCallbackInvocationHandler.java index 168af952db..9b51aefe39 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKCallbackInvocationHandler.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKCallbackInvocationHandler.java @@ -21,9 +21,15 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import org.apache.tuscany.sca.context.ThreadMessageContext; import org.apache.tuscany.sca.core.context.impl.CallbackServiceReferenceImpl; +import org.apache.tuscany.sca.core.invocation.Constants; +import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.InvocationChain; +import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.invocation.MessageFactory; +import org.apache.tuscany.sca.runtime.Invocable; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; import org.oasisopen.sca.ServiceReference; import org.oasisopen.sca.ServiceRuntimeException; @@ -43,7 +49,7 @@ public JDKCallbackInvocationHandler(MessageFactory messageFactory, ServiceRefere } @Override - @SuppressWarnings( {"unchecked"}) + @SuppressWarnings( {"unchecked", "rawtypes"}) public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (Object.class == method.getDeclaringClass()) { @@ -65,7 +71,8 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl } try { - return invoke(chain, args, wire); + String msgID = ((CallbackServiceReferenceImpl)callableReference).getMsgID(); + return invoke(chain, args, wire, msgID ); } catch (InvocationTargetException e) { Throwable t = e.getCause(); throw t; @@ -73,5 +80,58 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl // allow the cloned wire to be reused by subsequent callbacks } } + + /** + * Invoke the chain + * @param chain - the chain + * @param args - arguments to the invocation as an array of Objects + * @param source - the Endpoint or EndpointReference to which the chain relates + * @param msgID - ID of the message to which this invovation is a callback - ID ends up in "RELATES_TO" header + * @return - the Response message from the invocation + * @throws Throwable - if any exception occurs during the invocation + */ + @Override + protected Object invoke(InvocationChain chain, Object[] args, Invocable source, String msgID) + throws Throwable { + Message msg = messageFactory.createMessage(); + if (source instanceof RuntimeEndpointReference) { + msg.setFrom((RuntimeEndpointReference)source); + } + if (target != null) { + msg.setTo(target); + } else { + if (source instanceof RuntimeEndpointReference) { + msg.setTo(((RuntimeEndpointReference)source).getTargetEndpoint()); + } + } + Invoker headInvoker = chain.getHeadInvoker(); + Operation operation = chain.getTargetOperation(); + msg.setOperation(operation); + msg.setBody(args); + + Message msgContext = ThreadMessageContext.getMessageContext(); + + // Deal with header information that needs to be copied from the message context to the new message... + transferMessageHeaders( msg, msgContext); + + ThreadMessageContext.setMessageContext(msg); + + // If there is a supplied message ID, place its value into the Message Header under "RELATES_TO" + if( msgID != null ){ + msg.getHeaders().put(Constants.RELATES_TO, msgID); + } // end if + + try { + // dispatch the source down the chain and get the response + Message resp = headInvoker.invoke(msg); + Object body = resp.getBody(); + if (resp.isFault()) { + throw (Throwable)body; + } + return body; + } finally { + ThreadMessageContext.setMessageContext(msgContext); + } + } // end method invoke } From d0044f553e384aa427f7f24d06788b3eb87c1e6e Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Thu, 20 Jan 2011 16:52:59 +0000 Subject: [PATCH 077/157] Stage 1 of Axis2 binding-ws support of async callbacks, as described in TUSCANY-3821 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061389 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/runtime/RuntimeEndpoint.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpoint.java b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpoint.java index 78f2d9546c..92ae31d626 100644 --- a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpoint.java +++ b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpoint.java @@ -80,4 +80,16 @@ public interface RuntimeEndpoint extends Endpoint, Invocable, Serializable { */ public InterfaceContract getGeneratedWSDLContract(InterfaceContract interfaceContract); + /** + * Creates the async callback for this Endpoint, if it does not already exist + * and stores it into the Endpoint + */ + public void createAsyncServerCallback( ); + + /** + * Gets the async callback reference for this Endpoint, if it exists + * @return + */ + public RuntimeEndpointReference getAsyncServerCallback(); + } From e59c76cbd3fb6cc0d64aa94161a91522317ba730 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Thu, 20 Jan 2011 16:56:44 +0000 Subject: [PATCH 078/157] Stage 1 of Axis2 binding-ws support of async callbacks, as described in TUSCANY-3821 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061391 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/invocation/ResponseDispatchImpl.java | 56 +++++++++++-------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java index dcbf83262e..53dc708a30 100644 --- a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java +++ b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java @@ -39,6 +39,7 @@ import org.apache.tuscany.sca.core.invocation.AsyncResponseHandler; import org.apache.tuscany.sca.core.invocation.AsyncResponseInvoker; import org.apache.tuscany.sca.core.invocation.CallbackReferenceObjectFactory; +import org.apache.tuscany.sca.core.invocation.Constants; import org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory; import org.apache.tuscany.sca.core.invocation.ProxyFactory; import org.apache.tuscany.sca.invocation.Message; @@ -64,42 +65,47 @@ public class ResponseDispatchImpl implements ResponseDispatch, Serializabl * Generated serialVersionUID value */ private static final long serialVersionUID = 300158355992568592L; - private static String WS_MESSAGE_ID = "WS_MESSAGE_ID"; - private static String MESSAGE_ID = "MESSAGE_ID"; // A latch used to ensure that the sendResponse() and sendFault() operations are used at most once // The latch is initialized with the value "false" - private transient AtomicBoolean latch = new AtomicBoolean(); + private AtomicBoolean latch = new AtomicBoolean(); - private transient final Lock lock = new ReentrantLock(); - private transient final Condition completed = lock.newCondition(); + private final Lock lock = new ReentrantLock(); + private final Condition completed = lock.newCondition(); // The result private transient volatile T response = null; private transient volatile Throwable fault = null; - private ExtensionPointRegistry registry; + private transient ExtensionPointRegistry registry; + private MessageFactory msgFactory; // Service Reference used for the callback - private ServiceReference> callbackRef; + private volatile ServiceReference> callbackRef; private AsyncResponseInvoker respInvoker; private String messageID; + /** + * No-arg constructor for serialization purposes + */ + public ResponseDispatchImpl() { + super(); + } // end constructor + public ResponseDispatchImpl( Message msg ) { super(); - callbackRef = getAsyncCallbackRef( msg ); - respInvoker = (AsyncResponseInvoker)msg.getHeaders().get("ASYNC_RESPONSE_INVOKER"); + respInvoker = (AsyncResponseInvoker)msg.getHeaders().get(Constants.ASYNC_RESPONSE_INVOKER); //if( respInvoker == null ) throw new ServiceRuntimeException("Async Implementation invoked with no response invoker"); + + if( respInvoker == null ) { + callbackRef = getAsyncCallbackRef( msg ); + } // end if - // TODO - why is WS stuff bleeding into general code? - messageID = (String) msg.getHeaders().get(MESSAGE_ID); - if (messageID == null){ - messageID = (String) msg.getHeaders().get(WS_MESSAGE_ID); - } + messageID = (String) msg.getHeaders().get(Constants.MESSAGE_ID); } // end constructor - + public static ResponseDispatchImpl newInstance( Class type, Message msg ) { return new ResponseDispatchImpl( msg ); } @@ -160,16 +166,18 @@ public void sendResponse(T res) { throw new IllegalStateException("sendResponse() or sendFault() has been called previously"); } // end if + // Now dispatch the response to the callback, if present... + if( callbackRef != null ) { + AsyncResponseHandler handler = (AsyncResponseHandler) callbackRef.getService(); + setResponseHeaders(); + handler.setResponse(res); + } // end if + // Use response invoker if present if( respInvoker != null ) { respInvoker.invokeAsyncResponse(res); return; } // end if - - // Now dispatch the response to the callback... - AsyncResponseHandler handler = (AsyncResponseHandler) callbackRef.getService(); - setResponseHeaders(); - handler.setResponse(res); } // end method sendResponse public T get(long timeout, TimeUnit unit) throws Throwable { @@ -203,12 +211,13 @@ private boolean sendOK() { */ @SuppressWarnings("unchecked") private ServiceReference> getAsyncCallbackRef( Message msg ) { - RuntimeEndpointReference callbackEPR = (RuntimeEndpointReference) msg.getHeaders().get("ASYNC_CALLBACK"); + RuntimeEndpointReference callbackEPR = (RuntimeEndpointReference) msg.getHeaders().get(Constants.ASYNC_CALLBACK); if( callbackEPR == null ) return null; CompositeContext compositeContext = callbackEPR.getCompositeContext(); registry = compositeContext.getExtensionPointRegistry(); ProxyFactory proxyFactory = ExtensibleProxyFactory.getInstance(registry); + msgFactory = getMessageFactory(); List eprList = new ArrayList(); eprList.add(callbackEPR); ObjectFactory factory = new CallbackReferenceObjectFactory(AsyncResponseHandler.class, proxyFactory, eprList); @@ -225,12 +234,11 @@ private void setResponseHeaders() { Message msgContext = ThreadMessageContext.getMessageContext(); if( msgContext == null ) { // Create a message context - msgContext = getMessageFactory().createMessage(); + msgContext = msgFactory.createMessage(); } // end if // Add in the header for the RelatesTo Message ID - msgContext.getHeaders().put(WS_MESSAGE_ID, messageID); - msgContext.getHeaders().put(MESSAGE_ID, messageID); + msgContext.getHeaders().put(Constants.RELATES_TO, messageID); ThreadMessageContext.setMessageContext(msgContext); } // end method setResponseHeaders From ce0b78c1606952ebf55adff24db3f8ea8954392f Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Thu, 20 Jan 2011 16:58:38 +0000 Subject: [PATCH 079/157] Stage 1 of Axis2 binding-ws support of async callbacks, as described in TUSCANY-3821 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061392 13f79535-47bb-0310-9956-ffa450edef68 --- .../testing/service/mocks/TestRuntimeWire.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestRuntimeWire.java b/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestRuntimeWire.java index d1c7c325c5..fdf3348809 100644 --- a/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestRuntimeWire.java +++ b/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestRuntimeWire.java @@ -41,6 +41,7 @@ import org.apache.tuscany.sca.provider.ServiceBindingProvider; import org.apache.tuscany.sca.runtime.EndpointRegistry; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; +import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; /** * Mock RuntimeWire implementation. Only few methods needs to be implemented. @@ -324,4 +325,18 @@ public void invokeAsync(Message msg) { // TODO Auto-generated method stub } + + + @Override + public void createAsyncServerCallback() { + // TODO Auto-generated method stub + + } + + + @Override + public RuntimeEndpointReference getAsyncServerCallback() { + // TODO Auto-generated method stub + return null; + } } From 78837e1f8d25769887fbb5d58acbf3754247fa57 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Thu, 20 Jan 2011 17:09:19 +0000 Subject: [PATCH 080/157] Adding new group of Itests for Async Services git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061396 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/async-services/pom.xml | 69 +++++++ .../tuscany/sca/itest/ASM_0002_Client.java | 77 ++++++++ .../tuscany/sca/itest/BusinessFault1.java | 34 ++++ .../tuscany/sca/itest/BusinessFault2.java | 34 ++++ .../apache/tuscany/sca/itest/Service1.java | 26 +++ .../sca/itest/Service1AsyncServer.java | 38 ++++ .../sca/itest/Service1AsyncServerImpl.java | 168 ++++++++++++++++++ .../tuscany/sca/itest/TestException.java | 27 +++ .../tuscany/sca/itest/TestInvocation.java | 32 ++++ .../src/main/resources/TestClient.wsdl | 115 ++++++++++++ .../src/main/resources/TestInvocation.wsdl | 68 +++++++ .../main/resources/Test_Async_001.composite | 51 ++++++ .../main/resources/Test_Async_002.composite | 51 ++++++ .../main/resources/Test_Async_003.composite | 51 ++++++ .../main/resources/oasis-sca-tests.properties | 20 +++ .../tuscany-oasis-sca-tests-errors.properties | 91 ++++++++++ .../tuscany/sca/itest/Async_001_TestCase.java | 73 ++++++++ .../tuscany/sca/itest/Async_002_TestCase.java | 71 ++++++++ .../tuscany/sca/itest/Async_003_TestCase.java | 71 ++++++++ testing/itest/pom.xml | 1 + 20 files changed, 1168 insertions(+) create mode 100644 testing/itest/async-services/pom.xml create mode 100644 testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java create mode 100644 testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java create mode 100644 testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java create mode 100644 testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java create mode 100644 testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java create mode 100644 testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java create mode 100644 testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java create mode 100644 testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java create mode 100644 testing/itest/async-services/src/main/resources/TestClient.wsdl create mode 100644 testing/itest/async-services/src/main/resources/TestInvocation.wsdl create mode 100644 testing/itest/async-services/src/main/resources/Test_Async_001.composite create mode 100644 testing/itest/async-services/src/main/resources/Test_Async_002.composite create mode 100644 testing/itest/async-services/src/main/resources/Test_Async_003.composite create mode 100644 testing/itest/async-services/src/main/resources/oasis-sca-tests.properties create mode 100644 testing/itest/async-services/src/main/resources/tuscany-oasis-sca-tests-errors.properties create mode 100644 testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java create mode 100644 testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java create mode 100644 testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java diff --git a/testing/itest/async-services/pom.xml b/testing/itest/async-services/pom.xml new file mode 100644 index 0000000000..0e5ac16fcb --- /dev/null +++ b/testing/itest/async-services/pom.xml @@ -0,0 +1,69 @@ + + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 2.0-SNAPSHOT + ../pom.xml + + itest-async-services + Apache Tuscany SCA iTest Asynchronous Services + + + + + + org.oasis-open.sca.j + sca-caa-apis + 1.1-CD04 + + + + org.apache.tuscany.sca + tuscany-base-runtime-pom + pom + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-binding-ws-runtime-axis2 + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-binding-jms-runtime + 2.0-SNAPSHOT + + + + org.mortbay.jetty + jetty + 6.1.19 + + + + diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java new file mode 100644 index 0000000000..880fd3cb9e --- /dev/null +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java @@ -0,0 +1,77 @@ +/* + * + * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. + * OASIS trademark, IPR and other policies apply. + * + */ +package org.apache.tuscany.sca.itest; + +import org.oasisopen.sca.annotation.Service; +import org.oasisopen.sca.annotation.Reference; +import org.oasisopen.sca.annotation.Property; +import org.apache.tuscany.sca.itest.Service1; +import org.apache.tuscany.sca.itest.TestException; +import org.apache.tuscany.sca.itest.TestInvocation; + + +/** + * Test initiation class with a single reference of multiplicity 1..1 + * @author MikeEdwards + * + */ +@Service(TestInvocation.class) +public class ASM_0002_Client implements org.apache.tuscany.sca.itest.TestInvocation { + + @Property + public String testName = "ASM_xxxx"; + + // required=false implies a multiplicity of 0..1 so that this component need not be wired + @Reference(required=false) + public Service1 reference1; + + /** + * This method is offered as a service and is + * invoked by the test client to run the test + */ + public String invokeTest( String input ) throws TestException { + String response = null; + + try { + response = runTest( input ); + } catch( Exception e ) { + System.out.println("TestInvocation: Test service got an exception during execution:" + e.getClass().getName()+ " " + e.getMessage() ); + e.printStackTrace(); + throw new TestException("Test service got an exception during execution: " + e.getClass().getName()+ " " + e.getMessage() ); + } // end try + return response; + } // end method invokeTest + + /** + * This method actually runs the test - and is subclassed by classes that run other tests. + * @param input - an input string + * @return - a response string = "ASM_0001 inputString xxxxx" where xxxxx depends on the invoked service + * + */ + public String runTest( String input ){ + String response = null; + // Deals with cases where this component reference is not wired + if( reference1 != null ) { + String response1 = reference1.operation1(input); + + response = testName + " " + input + " " + response1; + } else { + response = testName + " " + input + " no invocation"; + } // end if + + return response; + } // end method runTest + + /** + * Sets the name of the test + * @param name - the test name + */ + protected void setTestName( String name ) { + testName = name; + } + +} // diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java new file mode 100644 index 0000000000..b2fea7a4dd --- /dev/null +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java @@ -0,0 +1,34 @@ +/* + * + * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. + * OASIS trademark, IPR and other policies apply. + * + */ + package org.apache.tuscany.sca.itest; + +/** + * A business exception + * + */ +public class BusinessFault1 extends Exception { + + // Serialization UID + private static final long serialVersionUID = 44240525335368929L; + + public BusinessFault1() { + super(); + } + + public BusinessFault1(String arg0) { + super(arg0); + } + + public BusinessFault1(Throwable arg0) { + super(arg0); + } + + public BusinessFault1(String arg0, Throwable arg1) { + super(arg0, arg1); + } + +} // end class BusinessFault1 diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java new file mode 100644 index 0000000000..fac4f58c75 --- /dev/null +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java @@ -0,0 +1,34 @@ +/* + * + * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. + * OASIS trademark, IPR and other policies apply. + * + */ + package org.apache.tuscany.sca.itest; + +/** + * A business exception + * + */ +public class BusinessFault2 extends Exception { + + // Serialization UID + private static final long serialVersionUID = 44240525335368929L; + + public BusinessFault2() { + super(); + } + + public BusinessFault2(String arg0) { + super(arg0); + } + + public BusinessFault2(Throwable arg0) { + super(arg0); + } + + public BusinessFault2(String arg0, Throwable arg1) { + super(arg0, arg1); + } + +} // end class BusinessFault1 diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java new file mode 100644 index 0000000000..6c45fa3c03 --- /dev/null +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java @@ -0,0 +1,26 @@ +/* + * + * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. + * OASIS trademark, IPR and other policies apply. + * + */ +package org.apache.tuscany.sca.itest; + +import org.oasisopen.sca.annotation.Remotable; + +/** + * A test service interface + * @author MikeEdwards + * + */ +@Remotable +public interface Service1 { + + /** + * Method for invoking testcase service + * @param input - input parameter(s) as a String + * @return - output data as a String + */ + public String operation1( String input ); + +} diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java new file mode 100644 index 0000000000..80bdba955e --- /dev/null +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java @@ -0,0 +1,38 @@ +/* + * + * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. + * OASIS trademark, IPR and other policies apply. + * + */ +package org.apache.tuscany.sca.itest; + +import org.oasisopen.sca.ResponseDispatch; +import org.oasisopen.sca.annotation.AsyncFault; +import org.oasisopen.sca.annotation.AsyncInvocation; +import org.oasisopen.sca.annotation.Remotable; + +/** + * Service1 service interface + * - Asynchronous server version + */ +@AsyncInvocation +@Remotable +public interface Service1AsyncServer { + + /** + * Synchronous method for invoking testcase service + * @param input - input parameter as a String + * @return - output data as a String + * Listed here for documentation purposes - this is the operation that the async server operation maps to + */ + // public String operation1( String input ); + + /** + * Async server version of the synchronous operation1 method + * @param input - input parameter as a String + * @param handler - the ResponseDispatch handler used to send the response message (a String in this case) + */ + @AsyncFault( {BusinessFault1.class, BusinessFault2.class} ) + public void operation1Async( String input, ResponseDispatch handler ); + +} // end interface Service1AsyncServer diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java new file mode 100644 index 0000000000..16c513bbf3 --- /dev/null +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java @@ -0,0 +1,168 @@ +/* + * + * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. + * OASIS trademark, IPR and other policies apply. + * + */ +package org.apache.tuscany.sca.itest; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + +import org.oasisopen.sca.ResponseDispatch; +import org.oasisopen.sca.ServiceUnavailableException; +import org.oasisopen.sca.annotation.*; + + +/** + * Java component implementation + * 1 service with interface Service1AsyncServer + * 0 references + * + * Async server implementation of the Service1 service + * + */ +@Service(Service1AsyncServer.class) +public class Service1AsyncServerImpl implements Service1AsyncServer { + + private volatile ResponseDispatch responseHandler = null; + + private volatile String tmpFilePath = null; + + @Property(required=true) + public volatile String serviceName = "service1"; + + /* + public String operation1(String input) { + return serviceName + " operation1 invoked"; + } + */ + + public void operation1Async(String input, ResponseDispatch handler) { + // Store the ResponseDispatch object + responseHandler = handler; + + serializeResponseHandler(responseHandler); + + // Now kick off processing on a separate thread that will dispatch the response some time after this + // initial method returns... + runResponseThread( input ); + + // return + return; + } // end method operation1Async + + /** + * Serialize the response handler to a file + * @param responseHandler2 + */ + private void serializeResponseHandler( + ResponseDispatch responseHandler2) { + if( responseHandler2 instanceof Serializable ) { + Serializable obj = (Serializable)responseHandler2; + FileOutputStream fos; + try { + File tmpFile = File.createTempFile("Async_Server", null); + tmpFilePath = tmpFile.getCanonicalPath(); + fos = new FileOutputStream(tmpFile); + ObjectOutputStream oos = new ObjectOutputStream(fos); + + oos.writeObject(obj); + + oos.close(); + } catch (FileNotFoundException e) { + } catch (IOException e) { + e.printStackTrace(); + } // end try + + } // end if + } // end method serializeResponseHandler + + @SuppressWarnings("unchecked") + public ResponseDispatch deserializeResponseHandler() { + try { + if( tmpFilePath == null ) return null; + FileInputStream fis = new FileInputStream( tmpFilePath ); + ObjectInputStream ois = new ObjectInputStream(fis); + + ResponseDispatch responseDispatch = (ResponseDispatch) ois.readObject(); + + ois.close(); + return responseDispatch; + } catch (Exception e) { + e.printStackTrace(); + } // end try + + return null; + } // end method deserializeResponseHandler + + /** + * Method used to run a separate thread, to invoke the ResponseDispatch + */ + private void runResponseThread( String input ) { + + int invocationCount = 2; // # of threads to use + long maxWaitTime = 5000; // Max wait time for completion = 5sec + + // Run the tests using a ThreadPoolExecutor + ThreadPoolExecutor theExecutor = new ThreadPoolExecutor( invocationCount, invocationCount, + maxWaitTime, TimeUnit.MILLISECONDS, + new ArrayBlockingQueue( invocationCount ) ); + + + + // Perform the invocations on separate thread... + theExecutor.execute( new separateThreadInvoker( input ) ); + + } // end method runResponseThread + + /** + * An inner class which acts as a runnable task for invoking APIs on threads that are not processing + * either a service operation or a callback operation + */ + private class separateThreadInvoker implements Runnable { + + private long pauseTime = 1000; // Pause interval to allow initiating thread to complete + private String input; // Input parameter + + public separateThreadInvoker( String input ) { + super(); + this.input = input; + } // end constructor + + public void run() { + + // Wait for a short time to ensure that the invoking thread has time to return + try { + Thread.sleep(pauseTime); + } catch (InterruptedException e) { + // Nothing to do here... + } // end try + + ResponseDispatch responseHandler2 = deserializeResponseHandler(); + if( responseHandler2 != null ) { + responseHandler = responseHandler2; + } // end if + + if( "exception".equals(input) ) { + // Invoke the response dispatch object to return a an exception + responseHandler.sendFault( new BusinessFault1(serviceName + " operation1 invoked asynchronously")); + + } else { + // Invoke the response dispatch object to return a response + responseHandler.sendResponse( serviceName + " operation1 invoked asynchronously"); + } // end if + } // end method run + + } // end class separateThreadInvoker + +} diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java new file mode 100644 index 0000000000..456ed2ba02 --- /dev/null +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java @@ -0,0 +1,27 @@ +/* + * + * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. + * OASIS trademark, IPR and other policies apply. + * + */ +package org.apache.tuscany.sca.itest; + +/* + * Exception thrown by SCA Test services + */ +public class TestException extends Exception { + + /** + * Required serialVersionUID field + */ + private static final long serialVersionUID = -6978058912756564824L; + + public TestException() { super(); }; + + public TestException( String msg ) { super( msg ); }; + + public TestException( String msg, Throwable cause ) { super( msg, cause); }; + + public TestException( Throwable cause ) { super( cause ); }; + +} diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java new file mode 100644 index 0000000000..a0233946b5 --- /dev/null +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java @@ -0,0 +1,32 @@ +/* + * + * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. + * OASIS trademark, IPR and other policies apply. + * + */ +package org.apache.tuscany.sca.itest; + +import javax.jws.WebMethod; +import org.oasisopen.sca.annotation.Remotable; +import org.apache.tuscany.sca.itest.TestException; + + +/** + * Basic interface to invoke testcases + * 1 operation + * - "invokeTest", string input, string output + * + */ +@Remotable +public interface TestInvocation { + + /** + * Method for invoking testcase + * @param input - input parameter(s) as a String + * @return - output data as a String + * @throws - a TestException is thrown in cases where the test service fails internally + */ + @WebMethod + public String invokeTest( String input ) throws TestException ; + +} diff --git a/testing/itest/async-services/src/main/resources/TestClient.wsdl b/testing/itest/async-services/src/main/resources/TestClient.wsdl new file mode 100644 index 0000000000..c67d651fae --- /dev/null +++ b/testing/itest/async-services/src/main/resources/TestClient.wsdl @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/itest/async-services/src/main/resources/TestInvocation.wsdl b/testing/itest/async-services/src/main/resources/TestInvocation.wsdl new file mode 100644 index 0000000000..a8a7210496 --- /dev/null +++ b/testing/itest/async-services/src/main/resources/TestInvocation.wsdl @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/itest/async-services/src/main/resources/Test_Async_001.composite b/testing/itest/async-services/src/main/resources/Test_Async_001.composite new file mode 100644 index 0000000000..5c51f4a7b6 --- /dev/null +++ b/testing/itest/async-services/src/main/resources/Test_Async_001.composite @@ -0,0 +1,51 @@ + + + + + + + + + + + + + Async_001 + + + + + + + + + service1 + + + \ No newline at end of file diff --git a/testing/itest/async-services/src/main/resources/Test_Async_002.composite b/testing/itest/async-services/src/main/resources/Test_Async_002.composite new file mode 100644 index 0000000000..1eee9501d6 --- /dev/null +++ b/testing/itest/async-services/src/main/resources/Test_Async_002.composite @@ -0,0 +1,51 @@ + + + + + + + + + + + + + Async_002 + + + + + + + + + service1 + + + \ No newline at end of file diff --git a/testing/itest/async-services/src/main/resources/Test_Async_003.composite b/testing/itest/async-services/src/main/resources/Test_Async_003.composite new file mode 100644 index 0000000000..ae56034ccf --- /dev/null +++ b/testing/itest/async-services/src/main/resources/Test_Async_003.composite @@ -0,0 +1,51 @@ + + + + + + + + + + + + + Async_003 + + + + + + + + + service1 + + + \ No newline at end of file diff --git a/testing/itest/async-services/src/main/resources/oasis-sca-tests.properties b/testing/itest/async-services/src/main/resources/oasis-sca-tests.properties new file mode 100644 index 0000000000..742566fd5a --- /dev/null +++ b/testing/itest/async-services/src/main/resources/oasis-sca-tests.properties @@ -0,0 +1,20 @@ +# +# Copyright(C) OASIS(R) 2009, 2010. All Rights Reserved. +# OASIS trademark, IPR and other policies apply. +# + +# OASIS SCA Assembly test properties +# The implementation type to use for Assembly test suite +# Examples: "Java" "BPEL" "CPP" "C" +org.oasis.sca.tests.assembly.lang=Java + +# The class to use as the Runtime Bridge for the SCA runtime under test +org.oasis.sca.tests.assembly.runtime_bridge=org.apache.tuscany.sca.itest.TuscanyRuntimeBridge + +# The location of the contributions for the test suite +# %1 represents the placement of the name of each contribution into the location URI +# Following uses directories for the contributions +org.oasis.sca.tests.assembly.contribution.location=file:/target/classes/ +# Following uses ZIP files for the contributions +#org.oasis.sca.tests.assembly.contribution.location=file:/C:/OASIS_TESTS/SCA-Assembly/TestCases/%1/target/%1.zip + diff --git a/testing/itest/async-services/src/main/resources/tuscany-oasis-sca-tests-errors.properties b/testing/itest/async-services/src/main/resources/tuscany-oasis-sca-tests-errors.properties new file mode 100644 index 0000000000..ea9a5efdfb --- /dev/null +++ b/testing/itest/async-services/src/main/resources/tuscany-oasis-sca-tests-errors.properties @@ -0,0 +1,91 @@ +# 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. + +ASM_4002=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40003,ASM60003] Duplicate implementation service name: Component = TestComponent1 Service = Service1 +ASM_4003=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40004,ASM50007,ASM60006] Duplicate implementation reference name: Component = TestComponent1 Reference = Reference1 +ASM_4004=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40005,ASM60014] Duplicate implementation property name: Component = TestComponent1 Property = propertyName +ASM_4007=org.apache.tuscany.sca.contribution.processor.ContributionReadException: [ASM40010,ASM60040] Error: property has both @type and @element attribute values - propertyName +ASM_4008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40011,ASM60034] No value configured on a mustSupply property: Component = TestComponent1 Property = propertyName +ASM_5004=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient] - [ASM50022] Too many targets on reference: reference1 +ASM_5005=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: Test_ASM_5005Component1] - [ASM40003,ASM60003] Duplicate implementation service name: Component = Test_ASM_5005Component1 Service = Service1 +ASM_5006=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Component type service not found for component service (missing @Remotable annotation?): Component = TestComponent1 Service = InvalidName +ASM_5007=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: Test_ASM_5007Component1] - [ASM40004,ASM50007,ASM60006] Duplicate implementation reference name: Component = Test_ASM_5007Component1 Reference = Reference1 +ASM_5008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50008] Component type reference not found for component reference: Component = TestComponent1 Reference = InvalidName +ASM_5009=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}] - [ASM50001] Duplicate component name: Composite = {http://docs.oasis-open.org/ns/opencsa/sca/200912} Component = TestComponent1 +ASM_5010=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50004] Component service interface incompatible with implementation service interface: Component = TestComponent1 Service = Service1 +ASM_5014=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50009] Component reference multiplicity incompatible with reference multiplicity: Component = TestComponent1 Reference = Reference1 +ASM_5023=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite11, Component: Composite11Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite4, Component: Composite4Component1] - [ASM50022] Too many targets on reference: reference1 +ASM_5024=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Reference: Reference1] - [ASM50026] Composite {http://docs.oasis-open.org/ns/opencsa/sca/200912} Component TestComponent1 Reference Reference1 must not specify endpoints using both target attribute and with a binding child element +ASM_5027=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Duplicate component property name: Component = TestComponent1 Property = serviceName +ASM_5028=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50031] Property not found for component property: Component = TestComponent1 Property = randomName +ASM_5029=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50032] The property component TestComponent1 property complexType has many values but its "many" attribute is set to false +ASM_5030=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_5030, Artifact: Test_ASM_5030.composite] - ASM50033: value attribute exists for the property element +ASM_5035=org.apache.tuscany.sca.contribution.processor.ContributionReadException: [ASM40010,ASM60040] Error: property has both @type and @element attribute values - complexType +ASM_5036=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5036Component1] - [ASM_5036] The property component TEST_ASM_5036Component1 property complexType has XSD type {http://docs.oasis-open.org/ns/opencsa/scatests/200903}ComplexType2 while its component type property has the XSD type {http://docs.oasis-open.org/ns/opencsa/scatests/200903}ComplexType1 +ASM_5037=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5037Component1] - [ASM50031] Property not found for component property: Component = TEST_ASM_5037Component1 Property = bogusName +ASM_5038=unknown +ASM_5039=unknown +ASM_5040=unknown +ASM_6001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_6001, Artifact: TestDuplicate1.composite] - [ASM_6001] More than one composite with the same name {http://docs.oasis-open.org/ns/opencsa/scatests/200903}DuplicateComposite found in contribution +ASM_6002=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40003,ASM60003] Duplicate implementation service name: Component = TestComponent1 Service = Service1 +ASM_6003=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite17] - [ASM60004,ASM60032] Promoted component service not found: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite17 Service = SpuriousComponent/SpuriousService +ASM_6005=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40004,ASM50007,ASM60006] Duplicate implementation reference name: Component = TestComponent1 Reference = Reference1 +ASM_6006=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite20] - [ASM60007] Promoted component reference not found: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite20 Reference = Composite20Componentz/Reference1 +ASM_6008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_6008Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite22] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference. Operation operation2 not found on target +ASM_6012=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_6012TestComponent1] - [ASM40005,ASM60014] Duplicate implementation property name: Component = TEST_ASM_6012TestComponent1 Property = propertyName +ASM_6016=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite30, Component: TestComponent1, Reference: Reference1] - [ASM60028] No target services found for the component reference to be autowired: Reference1 +ASM_6020=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Reference: Reference1] - [ASM60028] No target services found for the component reference to be autowired: Reference1 +ASM_6021=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_6021TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite31] - [ASM60004,ASM60032] Promoted component service not found: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite31 Service = Not_A_URI_of_a_Component +ASM_6022=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite32, Component: TestComponent1] - [ASM60033] No targets for reference: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite32 Reference = Reference1 +ASM_6023=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40011,ASM60034] No value configured on a mustSupply property: Component = TestComponent1 Property = simpleType +ASM_6024=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM60030] Component implementation not resolved: Component = TestComponent1 Uri = TestComponent1 +ASM_6025=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}] - [ASM50001] Duplicate component name: Composite = {http://docs.oasis-open.org/ns/opencsa/sca/200912} Component = TestComponent1 +ASM_6028=org.apache.tuscany.sca.contribution.processor.ContributionReadException: [ASM40010,ASM60040] Error: property has both @type and @element attribute values - InvalidProperty +ASM_6029=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: [ASM60041] Error: Composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_ASM_6029 can only include another composite with the identical @local attribute value +ASM_6030=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: [ASM60042] Error: Composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}Invalid_composite_name is not a valid composite within the domain +ASM_6031=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite39] - [POL40009,ASM60009,ASM60010] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}suspendsTransaction and {http://docs.oasis-open.org/ns/opencsa/sca/200912}propagatesTransaction are mutually exclusive +ASM_6032=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite40] - [POL40009,ASM60009,ASM60010] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}suspendsTransaction and {http://docs.oasis-open.org/ns/opencsa/sca/200912}propagatesTransaction are mutually exclusive +ASM_6033=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite41] - [ASM60011] Composite reference multiplicity incompatible with component reference multiplicity: Composite = TestComposite41.composite Composite reference = Reference1 Component reference = Reference1 +ASM_6036=unknown +ASM_6039=unknown +ASM_8006=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_8006, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_ASM_8006] - The interface.wsdl element has a forward interface with a callback declared in the WSDL {http://test.sca.oasisopen.org/}Service9Callback and a callback interface also declared using the callbackInterface attribute {http://test.sca.oasisopen.org/}Service8Callback but the callback interfaces are not equal. +ASM_8007=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent2] - [ASM50004] Component service interface incompatible with implementation service interface: Component = TestComponent2 Service = Service1 +ASM_8008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Component reference interface incompatible with implementation reference interface: Component = TestComponent1 Reference = Reference1 +ASM_8009=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8009Component1] - Component reference interface incompatible with implementation reference interface: Component = TEST_ASM_8009Component1 Reference = Reference1 +ASM_8010=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8010Component2, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite63] - Interface of composite service Service1 must be subset of the interface declared by promoted component service. Callback operation not found on target +ASM_8011=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite62] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference. Callback operation not found on target +ASM_8012=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8012Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite64] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference. +ASM_8017=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8017Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite72] - Interface of composite service Service1a must be subset of the interface declared by promoted component service. Callback interface doesn't match +ASM_8018= org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TestClient Service = TestInvocation Callback interface doesn't match as one of the callback interfaces is null +ASM_8019=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_8019, Artifact: Test_ASM_8019.composite] - The interface.wsdl interface {http://test.sca.oasisopen.org/}Service1 element can only have a remotable attribute with the value "true" as WSDL interface are assumed to be remotable by default. The value that was found is: false. +ASM_9002=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Multiple bindings with the same name for a service: Service = Service1 Binding name = Fred +ASM_9005=unknown +ASM_10001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_10001, Artifact: META-INF/definitions.xml, Definitions: jar:file:***ASM_10001***.zip!/META-INF/definitions.xml] - [ASM10001,POL30002] Duplicate intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}Fred found in domain +ASM_10003=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_10003, Artifact: META-INF/definitions.xml, Definitions: jar:file:***ASM_10003***.zip!/META-INF/definitions.xml] - XMLSchema validation error occured in: Test_ASM_10003.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'component'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":intent, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySet, "http://docs.oasis-open.org/ns/opencsa/sca/200912":bindingType, "http://docs.oasis-open.org/ns/opencsa/sca/200912":implementationType, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected. +ASM_12003=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: Invalid interface when resolving +ASM_12007=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50004] Component service interface incompatible with implementation service interface: Component = TestComponent1 Service = Service1 Operation operation1 not found on target +ASM_12008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_12008TestComponent1] - [ASM50004] Component service interface incompatible with implementation service interface: Component = TEST_ASM_12008TestComponent1 Service = Service1 Operation operation1 not found on target +ASM_12011=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM60030] Component implementation not resolved: Component = TestComponent1 Uri = TestComponent1 +ASM_12012=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_12012, Artifact: META-INF/sca-contribution.xml] - XMLSchema validation error occured in: jar:file:***ASM_12012***.zip!/META-INF/sca-contribution.xml ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'component'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":deployable, "http://docs.oasis-open.org/ns/opencsa/sca/200912":importBase, "http://docs.oasis-open.org/ns/opencsa/sca/200912":exportBase, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected. +ASM_13001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13001, Artifact: Test_ASM_13001.composite] - XMLSchema validation error occured in: Test_ASM_13001.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'sevrice'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":service, "http://docs.oasis-open.org/ns/opencsa/sca/200912":reference, "http://docs.oasis-open.org/ns/opencsa/sca/200912":property, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected. +ASM_13002=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13002, Artifact: Test_ASM_13002.composite] - XMLSchema validation error occured in: Test_ASM_13002.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'operation'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":binding, "http://docs.oasis-open.org/ns/opencsa/sca/200912":callback, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected. +ASM_13003=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13003, Artifact: Test_ASM_13003.composite] - XMLSchema validation error occured in: Test_ASM_13003.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'binding.ws'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":include, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment, "http://docs.oasis-open.org/ns/opencsa/sca/200912":service, "http://docs.oasis-open.org/ns/opencsa/sca/200912":property, "http://docs.oasis-open.org/ns/opencsa/sca/200912":component, "http://docs.oasis-open.org/ns/opencsa/sca/200912":reference, "http://docs.oasis-open.org/ns/opencsa/sca/200912":wire, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected. +ASM_13004=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestClient_0002, Component: TestClient_0002TestClient] - [ASM40011,ASM60034] No value configured on a mustSupply property +ASM_13005=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13005, Artifact: Test_ASM_13005.composite] - XMLSchema validation error occured in: Test_ASM_13005.composite ,line = ***, column = ***, Message = cvc-elt.2: The value of {abstract} in the element declaration for 'implementation' must be false. +ASM_13006=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13006, Artifact: Test_ASM_13006.composite] - XMLSchema validation error occured in: Test_ASM_13006.composite ,line = ***, column = ***, Message = cvc-complex-type.3.2.2: Attribute 'callback' is not allowed to appear in element 'interface.java'. +ASM_13007=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13007, Artifact: Test_ASM_13007.composite] - XMLSchema validation error occured in: Test_ASM_13007.composite ,line = ***, column = ***, Message = cvc-complex-type.3.2.2: Attribute 'mulplicity' is not allowed to appear in element 'reference'. +ASM_13008=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13008, Artifact: Test_ASM_13008.composite] - XMLSchema validation error occured in: Test_ASM_13008.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'operation'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":wireFormat, "http://docs.oasis-open.org/ns/opencsa/sca/200912":operationSelector, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment}' is expected. \ No newline at end of file diff --git a/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java b/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java new file mode 100644 index 0000000000..d28d7ae113 --- /dev/null +++ b/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java @@ -0,0 +1,73 @@ +/* + * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. + * OASIS trademark, IPR and other policies apply. + */ +package org.apache.tuscany.sca.itest; + +import static org.junit.Assert.assertEquals; + +//import org.apache.tuscany.sca.node.equinox.launcher.Contribution; +//import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.Ignore; + +import org.apache.tuscany.sca.itest.TestInvocation; + +/** + * Client for Async_001_TestCase + * Async service invocation test #001 + * Tests that an async service can be invoked over the JMS Binding + */ +public class Async_001_TestCase { + + //protected NodeLauncher launcher; + protected Node node; + + private String testName = this.getClass().getSimpleName().substring(0, 9); + private String input = "request"; + private String[] output = new String[] { "Async_001 request service1 operation1 invoked asynchronously" }; + private String composite = "Test_" + testName + ".composite"; + private String[] contributionNames = new String[] { "Async_001" }; + + @Before + public void setUp() throws Exception { + + final NodeFactory nf = NodeFactory.newInstance(); + String here = ASM_0002_Client.class.getProtectionDomain().getCodeSource().getLocation().toString(); + // Create the node using the pattern "name of composite file to start" / Contribution to use + node = nf.createNode(this.composite, new Contribution("test", here)); + + node.start(); + } + + @After + public void tearDown() throws Exception { + node.stop(); + } + + @Test + public void testReference() { + TestInvocation test = node.getService(TestInvocation.class, "TestClient/TestInvocation"); + try { + final String response = test.invokeTest(this.input); + System.out.println(response); + assertEquals(this.output[0], response); + } catch (Throwable t) { + assertEquals("exception", this.output[0]); + } // end try + } // end testReference + + /** + * Dummy method to ensure that things work with JUnit 3 eg within Eclipse Ganymede + */ + @Ignore + @Test + public void testFoo() throws Exception { + } + +} // end class Async_001_TestCase diff --git a/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java b/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java new file mode 100644 index 0000000000..9581a8e35c --- /dev/null +++ b/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java @@ -0,0 +1,71 @@ +/* + * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. + * OASIS trademark, IPR and other policies apply. + */ +package org.apache.tuscany.sca.itest; + +import static org.junit.Assert.assertEquals; + +//import org.apache.tuscany.sca.node.equinox.launcher.Contribution; +//import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.Ignore; + +import org.apache.tuscany.sca.itest.TestInvocation; + +/** + * Client for Async_002_TestCase + * Async service invocation test #001 + * Tests that an async service can be invoked over the SCA Binding + */ +public class Async_002_TestCase { + + //protected NodeLauncher launcher; + protected Node node; + + private String input = "request"; + private String[] output = new String[] { "Async_002 request service1 operation1 invoked asynchronously" }; + private String composite = "Test_Async_002.composite"; + + @Before + public void setUp() throws Exception { + + final NodeFactory nf = NodeFactory.newInstance(); + String here = ASM_0002_Client.class.getProtectionDomain().getCodeSource().getLocation().toString(); + // Create the node using the pattern "name of composite file to start" / Contribution to use + node = nf.createNode(this.composite, new Contribution("test", here)); + + node.start(); + } + + @After + public void tearDown() throws Exception { + node.stop(); + } + + @Test + public void testReference() { + TestInvocation test = node.getService(TestInvocation.class, "TestClient/TestInvocation"); + try { + final String response = test.invokeTest(this.input); + System.out.println(response); + assertEquals(this.output[0], response); + } catch (Throwable t) { + assertEquals("exception", this.output[0]); + } // end try + } // end testReference + + /** + * Dummy method to ensure that things work with JUnit 3 eg within Eclipse Ganymede + */ + @Ignore + @Test + public void testFoo() throws Exception { + } + +} // end class Async_001_TestCase diff --git a/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java b/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java new file mode 100644 index 0000000000..0525c32322 --- /dev/null +++ b/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java @@ -0,0 +1,71 @@ +/* + * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. + * OASIS trademark, IPR and other policies apply. + */ +package org.apache.tuscany.sca.itest; + +import static org.junit.Assert.assertEquals; + +//import org.apache.tuscany.sca.node.equinox.launcher.Contribution; +//import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.Ignore; + +import org.apache.tuscany.sca.itest.TestInvocation; + +/** + * Client for Async_003_TestCase + * Async service invocation test #003 + * Tests that an async service can be invoked over the Web services Binding + */ +public class Async_003_TestCase { + + //protected NodeLauncher launcher; + protected Node node; + + private String input = "request"; + private String[] output = new String[] { "Async_003 request service1 operation1 invoked asynchronously" }; + private String composite = "Test_Async_003.composite"; + + @Before + public void setUp() throws Exception { + + final NodeFactory nf = NodeFactory.newInstance(); + String here = ASM_0002_Client.class.getProtectionDomain().getCodeSource().getLocation().toString(); + // Create the node using the pattern "name of composite file to start" / Contribution to use + node = nf.createNode(this.composite, new Contribution("test", here)); + + node.start(); + } + + @After + public void tearDown() throws Exception { + node.stop(); + } + + @Test + public void testReference() { + TestInvocation test = node.getService(TestInvocation.class, "TestClient/TestInvocation"); + try { + final String response = test.invokeTest(this.input); + System.out.println(response); + assertEquals(this.output[0], response); + } catch (Throwable t) { + assertEquals("exception", this.output[0]); + } // end try + } // end testReference + + /** + * Dummy method to ensure that things work with JUnit 3 eg within Eclipse Ganymede + */ + @Ignore + @Test + public void testFoo() throws Exception { + } + +} // end class Async_001_TestCase diff --git a/testing/itest/pom.xml b/testing/itest/pom.xml index db9e21c3df..537b53e389 100644 --- a/testing/itest/pom.xml +++ b/testing/itest/pom.xml @@ -38,6 +38,7 @@ + async-services base builder bpel From 49b55366b822a5da768cfe71372a7be4c8ae8477 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Thu, 20 Jan 2011 17:17:49 +0000 Subject: [PATCH 081/157] Correcting license headers of various files git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061402 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/itest/ASM_0002_Client.java | 18 +++- .../tuscany/sca/itest/BusinessFault1.java | 18 +++- .../tuscany/sca/itest/BusinessFault2.java | 18 +++- .../apache/tuscany/sca/itest/Service1.java | 18 +++- .../sca/itest/Service1AsyncServer.java | 18 +++- .../sca/itest/Service1AsyncServerImpl.java | 18 +++- .../tuscany/sca/itest/TestException.java | 18 +++- .../tuscany/sca/itest/TestInvocation.java | 18 +++- .../src/main/resources/TestClient.wsdl | 18 +++- .../src/main/resources/TestInvocation.wsdl | 19 +++- .../main/resources/oasis-sca-tests.properties | 20 ---- .../tuscany-oasis-sca-tests-errors.properties | 91 ------------------- .../tuscany/sca/itest/Async_001_TestCase.java | 18 +++- .../tuscany/sca/itest/Async_002_TestCase.java | 18 +++- .../tuscany/sca/itest/Async_003_TestCase.java | 18 +++- 15 files changed, 199 insertions(+), 147 deletions(-) delete mode 100644 testing/itest/async-services/src/main/resources/oasis-sca-tests.properties delete mode 100644 testing/itest/async-services/src/main/resources/tuscany-oasis-sca-tests-errors.properties diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java index 880fd3cb9e..2fb9c069ad 100644 --- a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java @@ -1,8 +1,20 @@ /* + * 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 * - * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. - * OASIS trademark, IPR and other policies apply. - * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.apache.tuscany.sca.itest; diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java index b2fea7a4dd..01446c88e5 100644 --- a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java @@ -1,8 +1,20 @@ /* + * 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 * - * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. - * OASIS trademark, IPR and other policies apply. - * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.apache.tuscany.sca.itest; diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java index fac4f58c75..7f9d965820 100644 --- a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java @@ -1,8 +1,20 @@ /* + * 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 * - * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. - * OASIS trademark, IPR and other policies apply. - * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.apache.tuscany.sca.itest; diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java index 6c45fa3c03..84ba75e0e2 100644 --- a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java @@ -1,8 +1,20 @@ /* + * 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 * - * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. - * OASIS trademark, IPR and other policies apply. - * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.apache.tuscany.sca.itest; diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java index 80bdba955e..1500cbdb07 100644 --- a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java @@ -1,8 +1,20 @@ /* + * 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 * - * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. - * OASIS trademark, IPR and other policies apply. - * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.apache.tuscany.sca.itest; diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java index 16c513bbf3..e4e17ca860 100644 --- a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java @@ -1,8 +1,20 @@ /* + * 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 * - * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. - * OASIS trademark, IPR and other policies apply. - * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.apache.tuscany.sca.itest; diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java index 456ed2ba02..1de688dfcd 100644 --- a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java @@ -1,8 +1,20 @@ /* + * 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 * - * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. - * OASIS trademark, IPR and other policies apply. - * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.apache.tuscany.sca.itest; diff --git a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java index a0233946b5..5b624d4712 100644 --- a/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java +++ b/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java @@ -1,8 +1,20 @@ /* + * 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 * - * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved. - * OASIS trademark, IPR and other policies apply. - * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.apache.tuscany.sca.itest; diff --git a/testing/itest/async-services/src/main/resources/TestClient.wsdl b/testing/itest/async-services/src/main/resources/TestClient.wsdl index c67d651fae..92cabda65d 100644 --- a/testing/itest/async-services/src/main/resources/TestClient.wsdl +++ b/testing/itest/async-services/src/main/resources/TestClient.wsdl @@ -1,9 +1,21 @@ Date: Thu, 20 Jan 2011 20:12:30 +0000 Subject: [PATCH 082/157] Update to use as the default the network interface set as default on the machine, which users can change as necessary git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061488 13f79535-47bb-0310-9956-ffa450edef68 --- .../endpoint/hazelcast/RegistryConfig.java | 46 +------------------ 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/RegistryConfig.java b/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/RegistryConfig.java index 79bffd3b21..bd44e69867 100644 --- a/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/RegistryConfig.java +++ b/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/RegistryConfig.java @@ -19,10 +19,7 @@ package org.apache.tuscany.sca.endpoint.hazelcast; -import java.net.InetAddress; -import java.net.NetworkInterface; import java.util.ArrayList; -import java.util.Enumeration; import java.util.List; import java.util.Properties; @@ -30,8 +27,7 @@ /** * Utility to parse the config properties. * - * bind - ip[:port] - defines the local bind address and port, it defaults to the network interface with the widest - * class (ie class A is wider than class B) on port 14820 and if that port in use it will try + * bind - ip[:port] - defines the local bind address and port, it defaults port 14820 and if that port in use it will try * incrementing by one till a free port is found. * * multicast - groupip:port | off - defines if multicast discovery is used and if so what multicast ip group and port is used @@ -65,12 +61,7 @@ public RegistryConfig(Properties properties) { private void init(Properties properties) { String bindValue = properties.getProperty("bind"); - if (bindValue == null) { - InetAddress addr = chooseLocalAddress(); - if (addr != null) { - this.bindAddress = addr.getHostAddress(); - } - } else { + if (bindValue != null) { if (bindValue.indexOf(":") == -1) { this.bindAddress = bindValue; } else { @@ -143,37 +134,4 @@ public String getUserid() { public String getPassword() { return password; } - - /** - * Use the NIC address with the widest class, ie class A instead of class B or C. - * Bit crude but in a lot of environments a class A address (eg 10.x.x.x) is likely - * a better choice than a class C address (eg 192.x.x.x). And the alternative to - * this is to just choose the first address of the first network interface which - * likely isn't a better choice than this approach. - */ - protected InetAddress chooseLocalAddress() { - InetAddress chosen = null; - try { - Enumeration nis = NetworkInterface.getNetworkInterfaces(); - while (nis.hasMoreElements()) { - NetworkInterface ni = nis.nextElement(); - Enumeration ips = ni.getInetAddresses(); - while (ips.hasMoreElements()) { - InetAddress addr = ips.nextElement(); - if (!addr.isLoopbackAddress()) { - if (chosen == null) { - chosen = addr; - } else { - if (((int) addr.getAddress()[0] & 0xFF) < ((int) chosen.getAddress()[0] & 0xFF)) { - chosen = addr; - } - } - } - } - } - } catch (Exception e) { - // ignore - } - return chosen; - } } From 41d1204e3300d0f941b9b5f55cfb6576eb5004bd Mon Sep 17 00:00:00 2001 From: Scott Kurz Date: Thu, 20 Jan 2011 21:34:57 +0000 Subject: [PATCH 083/157] Fix IndexOutOfBoundsException from TUSCANY-3819 fix. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061531 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/interfacedef/impl/OperationImpl.java | 6 +++--- .../sca/interfacedef/java/impl/JavaInterfaceImpl.java | 10 +++++----- .../wsdl/impl/WSDLOperationIntrospectorImpl.java | 9 ++++++++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java b/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java index c1fa4d4e4c..95256101d0 100644 --- a/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java +++ b/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java @@ -64,7 +64,7 @@ public class OperationImpl implements Operation { private List requiredIntents = new ArrayList(); private ExtensionType type; private DataType> outputType; - private boolean hasMultipleOutputs; + private boolean hasArrayWrappedOutput; /** * @param name @@ -301,11 +301,11 @@ public List getParameterModes() { } public boolean hasArrayWrappedOutput() { - return this.hasMultipleOutputs; + return this.hasArrayWrappedOutput; } public void setHasArrayWrappedOutput(boolean value) { - this.hasMultipleOutputs = value; + this.hasArrayWrappedOutput = value; } } diff --git a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java index 1dcd89ce2a..0b0a6cdee6 100644 --- a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java +++ b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java @@ -298,13 +298,13 @@ private List prepareSyncFaults( JavaOperation operation ) { */ private boolean isAsyncServerOperation( Operation operation ) { // Async form operations have: - // 1) void return type + // 1) void return type (equivalent to an output logical List of size '0') // 2) name ending in "Async" // 3) final parameter which is of ResponseDispatch type - DataType response = operation.getOutputType().getLogical().get(0); - if( response != null ) { - if ( response.getPhysical() != void.class ) return false; - } // end if + int size = operation.getOutputType().getLogical().size(); + if (size != 0) { + return false; + } if ( !operation.getName().endsWith("Async") ) return false; diff --git a/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java b/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java index 48aab67ded..739cf4af75 100644 --- a/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java +++ b/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java @@ -38,6 +38,8 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.interfacedef.DataType; import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.interfacedef.ParameterMode; + import static org.apache.tuscany.sca.interfacedef.Operation.IDL_INPUT; import static org.apache.tuscany.sca.interfacedef.Operation.IDL_OUTPUT; import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl; @@ -209,7 +211,12 @@ public Operation getOperation() throws InvalidWSDLException { operationModel.setName(operation.getName()); operationModel.setFaultTypes(getFaultTypes()); operationModel.setNonBlocking(oneway); - operationModel.setInputType(getInputType()); + DataType> inputType = getInputType(); + operationModel.setInputType(inputType); + List modes = operationModel.getParameterModes(); + for (DataType dt : inputType.getLogical()) { + modes.add(ParameterMode.IN); + } operationModel.setOutputType(getOutputType()); operationModel.setWrapperStyle(isWrapperStyle()); From e54fd456694890fd8efec7dcfa7e2993762b7791 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Thu, 20 Jan 2011 23:42:12 +0000 Subject: [PATCH 084/157] Partially fix TUSCANY-3675 to get some distributed domain functions working again git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061571 13f79535-47bb-0310-9956-ffa450edef68 --- .../HazelcastDomainRegistryFactory.java | 2 +- .../hazelcast/HazelcastEndpointRegistry.java | 6 +-- .../endpoint/hazelcast/RegistryConfig.java | 40 +++++++++++++++++++ .../endpoint/hazelcast/MultiRegTestCase.java | 10 ++--- .../tuscany/sca/runtime/TwoNodesTestCase.java | 6 +-- .../src/test/java/itest/ClientTestCase.java | 11 +++-- 6 files changed, 56 insertions(+), 19 deletions(-) diff --git a/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastDomainRegistryFactory.java b/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastDomainRegistryFactory.java index 87c60e4b38..291553705b 100644 --- a/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastDomainRegistryFactory.java +++ b/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastDomainRegistryFactory.java @@ -40,7 +40,7 @@ public HazelcastDomainRegistryFactory(ExtensionPointRegistry registry) { protected EndpointRegistry createEndpointRegistry(String endpointRegistryURI, String domainURI) { Properties properties = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(RuntimeProperties.class).getProperties(); - return new HazelcastEndpointRegistry(registry, properties, domainURI); + return new HazelcastEndpointRegistry(registry, properties, endpointRegistryURI, domainURI); } public String[] getSupportedSchemes() { diff --git a/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java b/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java index 004aa81816..aa97ff3a1b 100644 --- a/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java +++ b/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java @@ -72,8 +72,8 @@ public class HazelcastEndpointRegistry extends BaseEndpointRegistry implements E protected Object shutdownMutex = new Object(); protected Properties properties; - public HazelcastEndpointRegistry(ExtensionPointRegistry registry, Properties properties, String domainURI) { - super(registry, null, null, domainURI); + public HazelcastEndpointRegistry(ExtensionPointRegistry registry, Properties properties, String endpointRegistryURI, String domainURI) { + super(registry, null, endpointRegistryURI, domainURI); this.assemblyFactory = registry.getExtensionPoint(FactoryExtensionPoint.class).getFactory(AssemblyFactory.class); this.properties = properties; } @@ -157,7 +157,7 @@ protected Config getHazelcastConfig() { // TUSCANY-3675 - domainRegistryURI properties don't seem to be copied into the // properties collection anywhere config = new XmlConfigBuilder().build(); - RegistryConfig rc = new RegistryConfig(properties); + RegistryConfig rc = RegistryConfig.parseConfigURI(domainRegistryURI); config.setPort(rc.getBindPort()); //config.setPortAutoIncrement(false); diff --git a/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/RegistryConfig.java b/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/RegistryConfig.java index bd44e69867..4bf3d6c73a 100644 --- a/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/RegistryConfig.java +++ b/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/RegistryConfig.java @@ -20,7 +20,9 @@ package org.apache.tuscany.sca.endpoint.hazelcast; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Properties; @@ -134,4 +136,42 @@ public String getUserid() { public String getPassword() { return password; } + + /** + * Parse the config string into a Properties object. + * The config URI has the following format: + * uri:?name=value&... + */ + public static RegistryConfig parseConfigURI(String configURI) { + Properties properties = new Properties(); + int c = configURI.indexOf(':'); + if (c > -1) { + configURI = configURI.substring(c+1); + } + int qm = configURI.indexOf('?'); + if (qm < 0) { + properties.setProperty("defaultDomainName", configURI); + } else { + if (qm == 0) { + properties.setProperty("defaultDomainName", "default"); + } else { + properties.setProperty("defaultDomainName", configURI.substring(0, qm)); + } + if (configURI.length() > qm+1) { + Map params = new HashMap(); + for (String param : configURI.substring(qm+1).split("&")) { + String[] px = param.split("="); + if (px.length == 2) { + params.put(px[0], px[1]); + } else { + params.put(px[0], ""); + } + } + for (String name : params.keySet()) { + properties.setProperty(name, params.get(name)); + } + } + } + return new RegistryConfig(properties); + } } diff --git a/modules/domain-hazelcast/src/test/java/org/apache/tuscany/sca/endpoint/hazelcast/MultiRegTestCase.java b/modules/domain-hazelcast/src/test/java/org/apache/tuscany/sca/endpoint/hazelcast/MultiRegTestCase.java index 67ce2bb50b..c4f51d1675 100644 --- a/modules/domain-hazelcast/src/test/java/org/apache/tuscany/sca/endpoint/hazelcast/MultiRegTestCase.java +++ b/modules/domain-hazelcast/src/test/java/org/apache/tuscany/sca/endpoint/hazelcast/MultiRegTestCase.java @@ -55,7 +55,7 @@ public static void init() { public void testReplication() throws Exception { System.out.println("Starting reg1"); - HazelcastEndpointRegistry reg1 = new HazelcastEndpointRegistry(extensionPoints, null, null, "bar"); + HazelcastEndpointRegistry reg1 = new HazelcastEndpointRegistry(extensionPoints, (Properties)null, "tuscany:foo?bind=127.0.0.1:9876&multicast=off", "bar"); reg1.start(); System.out.println("Adding ep1"); @@ -64,11 +64,11 @@ public void testReplication() throws Exception { reg1.addEndpoint(ep1); System.out.println("Starting reg3"); - HazelcastEndpointRegistry reg2 = new HazelcastEndpointRegistry(extensionPoints, null, "tuscany:foo?listen=127.0.0.1:9877&multicast=off&remotes=127.0.0.1:9876", "bar"); + HazelcastEndpointRegistry reg2 = new HazelcastEndpointRegistry(extensionPoints, (Properties)null, "tuscany:foo?bind=127.0.0.1:9877&multicast=off&wka=127.0.0.1:9876", "bar"); reg2.start(); System.out.println("Starting reg2"); - HazelcastEndpointRegistry reg3 = new HazelcastEndpointRegistry(extensionPoints, null, "tuscany:foo?listen=127.0.0.1:9878&multicast=off&remotes=127.0.0.1:9877", "bar"); + HazelcastEndpointRegistry reg3 = new HazelcastEndpointRegistry(extensionPoints, (Properties)null, "tuscany:foo?bind=127.0.0.1:9878&multicast=off&wka=127.0.0.1:9877", "bar"); reg3.start(); assertExists(reg1, "ep1uri"); @@ -116,13 +116,13 @@ public void testReplication() throws Exception { @Test public void testDuplicates() throws Exception { - HazelcastEndpointRegistry reg1 = new HazelcastEndpointRegistry(extensionPoints, null, "tuscany:foo?listen=127.0.0.1:9876&multicast=off", "bar"); + HazelcastEndpointRegistry reg1 = new HazelcastEndpointRegistry(extensionPoints, (Properties)null, "tuscany:foo?bind=127.0.0.1:9876&multicast=off", "bar"); reg1.start(); RuntimeEndpoint ep1 = createEndpoint("ep1uri"); ep1.bind(extensionPoints, reg1); reg1.addEndpoint(ep1); - HazelcastEndpointRegistry reg2 = new HazelcastEndpointRegistry(extensionPoints, null, "tuscany:foo?listen=127.0.0.1:9877&multicast=off&remotes=127.0.0.1:9876", "bar"); + HazelcastEndpointRegistry reg2 = new HazelcastEndpointRegistry(extensionPoints, (Properties)null, "tuscany:foo?bind=127.0.0.1:9877&multicast=off&wka=127.0.0.1:9876", "bar"); reg2.start(); try { diff --git a/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java index b59683b138..6205b26a8a 100644 --- a/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java +++ b/modules/domain-node/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java @@ -34,12 +34,10 @@ public class TwoNodesTestCase { @Test public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException { -// Node node1 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44331"); - Node node1 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase"); + Node node1 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44331"); node1.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true); -// Node node2 = NodeFactory.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44332&wka=127.0.0.1:44331"); - Node node2 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase"); + Node node2 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44332&wka=127.0.0.1:44331"); Helloworld helloworldService = node2.getService(Helloworld.class, "HelloworldComponent"); Assert.assertEquals("Hello petra", helloworldService.sayHello("petra")); diff --git a/testing/itest/nodes/one-jvm-hazelcast-client/src/test/java/itest/ClientTestCase.java b/testing/itest/nodes/one-jvm-hazelcast-client/src/test/java/itest/ClientTestCase.java index cf99c970db..a00c84edb6 100644 --- a/testing/itest/nodes/one-jvm-hazelcast-client/src/test/java/itest/ClientTestCase.java +++ b/testing/itest/nodes/one-jvm-hazelcast-client/src/test/java/itest/ClientTestCase.java @@ -24,11 +24,9 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import java.net.URI; - +import org.apache.tuscany.sca.Node; +import org.apache.tuscany.sca.TuscanyRuntime; import org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -46,8 +44,9 @@ public class ClientTestCase{ @BeforeClass public static void setUpBeforeClass() throws Exception { - node = NodeFactory.newInstance(domainURI).createNode((String)null, new String[]{"../helloworld-service/target/classes", "../helloworld-client/target/classes"}); - node.start(); + node = TuscanyRuntime.newInstance().createNode(domainURI); + node.installContribution("../helloworld-service/target/classes"); + node.installContribution("../helloworld-client/target/classes"); } @Test From c4fce089f48fa985752953183712de75d7892882 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Fri, 21 Jan 2011 11:38:07 +0000 Subject: [PATCH 085/157] Add some ignores git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061760 13f79535-47bb-0310-9956-ffa450edef68 From bf3b6af9842843f1204b1ec1765825f4aeaf2e04 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Fri, 21 Jan 2011 11:41:11 +0000 Subject: [PATCH 086/157] Add another ignore git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061761 13f79535-47bb-0310-9956-ffa450edef68 From 3f553ef2273aae09fa86739fb75c20abd4657204 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Fri, 21 Jan 2011 11:46:42 +0000 Subject: [PATCH 087/157] Change itests to depend on base pom rather than base jar so that we can sensibly use/updates itests in eclipse without having to rebuilt the jar all the time. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061763 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/async-interactions/pom.xml | 3 ++- testing/itest/bpel/helloworld/pom.xml | 3 ++- testing/itest/builder/pom.xml | 5 +++-- testing/itest/callback-api/pom.xml | 5 +++-- testing/itest/callback-basic/pom.xml | 3 ++- testing/itest/callback-complex-type/pom.xml | 5 +++-- testing/itest/callback-multiple-wires/pom.xml | 5 +++-- testing/itest/callback-separatethread/pom.xml | 5 +++-- testing/itest/callback-two-composites/pom.xml | 5 +++-- testing/itest/component-type/pom.xml | 5 +++-- testing/itest/contribution-folder/pom.xml | 5 +++-- testing/itest/contribution-zip/pom.xml | 5 +++-- testing/itest/databindings/jaxb-bottom-up/pom.xml | 5 +++-- testing/itest/databindings/jaxb-top-down/pom.xml | 5 +++-- testing/itest/exceptions/pom.xml | 5 +++-- testing/itest/implementation-spring/pom.xml | 3 ++- testing/itest/import-export/tests/pom.xml | 3 ++- testing/itest/interfaces/pom.xml | 5 +++-- testing/itest/nodes/binding-sca-hazelcast/pom.xml | 3 ++- testing/itest/nodes/one-jvm-hazelcast-client/pom.xml | 3 ++- testing/itest/nodes/one-jvm-hazelcast/pom.xml | 3 ++- testing/itest/oneway/pom.xml | 5 +++-- testing/itest/policies/pom.xml | 5 +++-- testing/itest/policy-transaction/pom.xml | 5 +++-- testing/itest/policy/matching/pom.xml | 7 ++++--- testing/itest/policy/wspolicy/pom.xml | 7 ++++--- testing/itest/recursive-multi-level/pom.xml | 5 +++-- testing/itest/references/pom.xml | 5 +++-- testing/itest/scaclient-api-remote/pom.xml | 3 ++- testing/itest/scaclient-api/pom.xml | 5 +++-- testing/itest/scopes/pom.xml | 5 +++-- testing/itest/service-reference/pom.xml | 5 +++-- testing/itest/services/pom.xml | 5 +++-- testing/itest/wires/pom.xml | 5 +++-- testing/itest/ws-jaxws/contribution-java-first/pom.xml | 7 ++++--- testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml | 7 ++++--- testing/itest/ws-jaxws/external-client/pom.xml | 7 ++++--- testing/itest/ws-jaxws/launcher-ri/pom.xml | 7 ++++--- testing/itest/ws/authentication-basic/pom.xml | 7 ++++--- testing/itest/ws/contribution-callback-forwardspec/pom.xml | 7 ++++--- testing/itest/ws/contribution-callback-fullspec/pom.xml | 7 ++++--- testing/itest/ws/contribution-callback-promotion/pom.xml | 7 ++++--- testing/itest/ws/contribution-callback/pom.xml | 7 ++++--- testing/itest/ws/contribution-doc-lit-wrapped/pom.xml | 7 ++++--- testing/itest/ws/contribution-doc-lit/pom.xml | 7 ++++--- testing/itest/ws/contribution-java-first/pom.xml | 7 ++++--- testing/itest/ws/contribution-rpc-lit/pom.xml | 7 ++++--- testing/itest/ws/contribution-wsdl-first/pom.xml | 7 ++++--- testing/itest/ws/defaults/pom.xml | 7 ++++--- testing/itest/ws/endpoint-references/pom.xml | 7 ++++--- testing/itest/ws/endpoints/pom.xml | 7 ++++--- testing/itest/ws/http-ssl/pom.xml | 7 ++++--- testing/itest/ws/launcher-axis2/pom.xml | 7 ++++--- testing/itest/ws/wsdl/pom.xml | 7 ++++--- 54 files changed, 175 insertions(+), 121 deletions(-) diff --git a/testing/itest/async-interactions/pom.xml b/testing/itest/async-interactions/pom.xml index ee83f4f533..c61bf5dc7b 100644 --- a/testing/itest/async-interactions/pom.xml +++ b/testing/itest/async-interactions/pom.xml @@ -32,7 +32,8 @@ org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/bpel/helloworld/pom.xml b/testing/itest/bpel/helloworld/pom.xml index 1d86415f5f..56f27c3c0d 100644 --- a/testing/itest/bpel/helloworld/pom.xml +++ b/testing/itest/bpel/helloworld/pom.xml @@ -39,7 +39,8 @@ org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/builder/pom.xml b/testing/itest/builder/pom.xml index 121adefffe..66ac4cd5dc 100644 --- a/testing/itest/builder/pom.xml +++ b/testing/itest/builder/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Builder - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/callback-api/pom.xml b/testing/itest/callback-api/pom.xml index 93d48ac5db..5b3340f723 100644 --- a/testing/itest/callback-api/pom.xml +++ b/testing/itest/callback-api/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Callback API - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/callback-basic/pom.xml b/testing/itest/callback-basic/pom.xml index 7f0f3b5e54..5f44414fc1 100644 --- a/testing/itest/callback-basic/pom.xml +++ b/testing/itest/callback-basic/pom.xml @@ -31,7 +31,8 @@ org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/callback-complex-type/pom.xml b/testing/itest/callback-complex-type/pom.xml index 3cdbbb05aa..a49fcfd510 100644 --- a/testing/itest/callback-complex-type/pom.xml +++ b/testing/itest/callback-complex-type/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Callback Complex Type - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/callback-multiple-wires/pom.xml b/testing/itest/callback-multiple-wires/pom.xml index 634e035039..d84bf3749e 100644 --- a/testing/itest/callback-multiple-wires/pom.xml +++ b/testing/itest/callback-multiple-wires/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Callback With Mutiple Wires - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/callback-separatethread/pom.xml b/testing/itest/callback-separatethread/pom.xml index 993c7b8302..b1c64a218f 100644 --- a/testing/itest/callback-separatethread/pom.xml +++ b/testing/itest/callback-separatethread/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Callback Using Separate Thread - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/callback-two-composites/pom.xml b/testing/itest/callback-two-composites/pom.xml index 08ab03471c..a813fe19a8 100644 --- a/testing/itest/callback-two-composites/pom.xml +++ b/testing/itest/callback-two-composites/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Callback Two Composites - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/component-type/pom.xml b/testing/itest/component-type/pom.xml index 416f0067aa..a8a525c6ea 100644 --- a/testing/itest/component-type/pom.xml +++ b/testing/itest/component-type/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Component Type - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/contribution-folder/pom.xml b/testing/itest/contribution-folder/pom.xml index fa44acc36f..cd2dfb276a 100644 --- a/testing/itest/contribution-folder/pom.xml +++ b/testing/itest/contribution-folder/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Contribution Folder - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/contribution-zip/pom.xml b/testing/itest/contribution-zip/pom.xml index 1957564c58..58daf0d499 100644 --- a/testing/itest/contribution-zip/pom.xml +++ b/testing/itest/contribution-zip/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Contribution ZIP - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/databindings/jaxb-bottom-up/pom.xml b/testing/itest/databindings/jaxb-bottom-up/pom.xml index 2749152253..df9036fbe7 100644 --- a/testing/itest/databindings/jaxb-bottom-up/pom.xml +++ b/testing/itest/databindings/jaxb-bottom-up/pom.xml @@ -57,9 +57,10 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/databindings/jaxb-top-down/pom.xml b/testing/itest/databindings/jaxb-top-down/pom.xml index 42f0228c90..1138b5c6ec 100644 --- a/testing/itest/databindings/jaxb-top-down/pom.xml +++ b/testing/itest/databindings/jaxb-top-down/pom.xml @@ -58,9 +58,10 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/exceptions/pom.xml b/testing/itest/exceptions/pom.xml index 9c2be5113a..570f3aed42 100644 --- a/testing/itest/exceptions/pom.xml +++ b/testing/itest/exceptions/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Exceptions - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/implementation-spring/pom.xml b/testing/itest/implementation-spring/pom.xml index d73eacbbc4..c4f1743500 100644 --- a/testing/itest/implementation-spring/pom.xml +++ b/testing/itest/implementation-spring/pom.xml @@ -31,7 +31,8 @@ org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/import-export/tests/pom.xml b/testing/itest/import-export/tests/pom.xml index 1c115fb423..e6f96c6bbc 100644 --- a/testing/itest/import-export/tests/pom.xml +++ b/testing/itest/import-export/tests/pom.xml @@ -32,7 +32,8 @@ org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/interfaces/pom.xml b/testing/itest/interfaces/pom.xml index 00c2e503b3..a157492a4a 100644 --- a/testing/itest/interfaces/pom.xml +++ b/testing/itest/interfaces/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Interface - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/nodes/binding-sca-hazelcast/pom.xml b/testing/itest/nodes/binding-sca-hazelcast/pom.xml index 0547e9bb10..31bff9a388 100644 --- a/testing/itest/nodes/binding-sca-hazelcast/pom.xml +++ b/testing/itest/nodes/binding-sca-hazelcast/pom.xml @@ -31,7 +31,8 @@ org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml b/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml index 0597f2d3da..2eb8acfbaa 100644 --- a/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml +++ b/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml @@ -36,7 +36,8 @@ org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/nodes/one-jvm-hazelcast/pom.xml b/testing/itest/nodes/one-jvm-hazelcast/pom.xml index df9cbe9139..49d18bf3b4 100644 --- a/testing/itest/nodes/one-jvm-hazelcast/pom.xml +++ b/testing/itest/nodes/one-jvm-hazelcast/pom.xml @@ -41,7 +41,8 @@ org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/oneway/pom.xml b/testing/itest/oneway/pom.xml index 15297d7968..909220d7b2 100644 --- a/testing/itest/oneway/pom.xml +++ b/testing/itest/oneway/pom.xml @@ -30,9 +30,10 @@ 2.0-SNAPSHOT - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/policies/pom.xml b/testing/itest/policies/pom.xml index 3c784fef62..98ea6b016a 100644 --- a/testing/itest/policies/pom.xml +++ b/testing/itest/policies/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Policies - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/policy-transaction/pom.xml b/testing/itest/policy-transaction/pom.xml index 25ec35ff12..a2b18c6a51 100644 --- a/testing/itest/policy-transaction/pom.xml +++ b/testing/itest/policy-transaction/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Policy Transaction - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/policy/matching/pom.xml b/testing/itest/policy/matching/pom.xml index d2e02c04ce..7ef3edbb77 100644 --- a/testing/itest/policy/matching/pom.xml +++ b/testing/itest/policy/matching/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/policy/wspolicy/pom.xml b/testing/itest/policy/wspolicy/pom.xml index 8980166b57..d6f692d00f 100644 --- a/testing/itest/policy/wspolicy/pom.xml +++ b/testing/itest/policy/wspolicy/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/recursive-multi-level/pom.xml b/testing/itest/recursive-multi-level/pom.xml index 954e531ba3..0006664647 100644 --- a/testing/itest/recursive-multi-level/pom.xml +++ b/testing/itest/recursive-multi-level/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Builder Recusive Multi-Level - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/references/pom.xml b/testing/itest/references/pom.xml index c9869383a2..f21d7095f6 100644 --- a/testing/itest/references/pom.xml +++ b/testing/itest/references/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest References - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/scaclient-api-remote/pom.xml b/testing/itest/scaclient-api-remote/pom.xml index 3b43c282bf..dc3aaee271 100644 --- a/testing/itest/scaclient-api-remote/pom.xml +++ b/testing/itest/scaclient-api-remote/pom.xml @@ -31,7 +31,8 @@ org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/scaclient-api/pom.xml b/testing/itest/scaclient-api/pom.xml index 0ab8951521..f872d3721b 100644 --- a/testing/itest/scaclient-api/pom.xml +++ b/testing/itest/scaclient-api/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest SCAClient API - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/scopes/pom.xml b/testing/itest/scopes/pom.xml index f0f7e0e33d..ed25620489 100644 --- a/testing/itest/scopes/pom.xml +++ b/testing/itest/scopes/pom.xml @@ -29,9 +29,10 @@ itest-scopes - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/service-reference/pom.xml b/testing/itest/service-reference/pom.xml index 03fa8c106b..c55f04e369 100644 --- a/testing/itest/service-reference/pom.xml +++ b/testing/itest/service-reference/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest ServiceReference - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/services/pom.xml b/testing/itest/services/pom.xml index e2cef5f11b..606960351d 100644 --- a/testing/itest/services/pom.xml +++ b/testing/itest/services/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Services - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/wires/pom.xml b/testing/itest/wires/pom.xml index 29be85bdff..f77ae68fd1 100644 --- a/testing/itest/wires/pom.xml +++ b/testing/itest/wires/pom.xml @@ -29,9 +29,10 @@ Apache Tuscany SCA iTest Wires Basic - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT diff --git a/testing/itest/ws-jaxws/contribution-java-first/pom.xml b/testing/itest/ws-jaxws/contribution-java-first/pom.xml index 8a6777a673..e584372593 100644 --- a/testing/itest/ws-jaxws/contribution-java-first/pom.xml +++ b/testing/itest/ws-jaxws/contribution-java-first/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml b/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml index 6766a2514e..77c83f27c6 100644 --- a/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml +++ b/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws-jaxws/external-client/pom.xml b/testing/itest/ws-jaxws/external-client/pom.xml index 830d2acea5..356fb26193 100644 --- a/testing/itest/ws-jaxws/external-client/pom.xml +++ b/testing/itest/ws-jaxws/external-client/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws-jaxws/launcher-ri/pom.xml b/testing/itest/ws-jaxws/launcher-ri/pom.xml index 52f3a9b14d..c8e7ca8fbf 100644 --- a/testing/itest/ws-jaxws/launcher-ri/pom.xml +++ b/testing/itest/ws-jaxws/launcher-ri/pom.xml @@ -30,11 +30,12 @@ Apache Tuscany SCA iTest WS JAXWS Launcher RI - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + diff --git a/testing/itest/ws/authentication-basic/pom.xml b/testing/itest/ws/authentication-basic/pom.xml index 92ff953edd..277648687d 100644 --- a/testing/itest/ws/authentication-basic/pom.xml +++ b/testing/itest/ws/authentication-basic/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/contribution-callback-forwardspec/pom.xml b/testing/itest/ws/contribution-callback-forwardspec/pom.xml index 0c279ca1f4..7274efeb3c 100644 --- a/testing/itest/ws/contribution-callback-forwardspec/pom.xml +++ b/testing/itest/ws/contribution-callback-forwardspec/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/contribution-callback-fullspec/pom.xml b/testing/itest/ws/contribution-callback-fullspec/pom.xml index f6badffbce..57fbf5f5f9 100644 --- a/testing/itest/ws/contribution-callback-fullspec/pom.xml +++ b/testing/itest/ws/contribution-callback-fullspec/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/contribution-callback-promotion/pom.xml b/testing/itest/ws/contribution-callback-promotion/pom.xml index 6b2549e95d..4b1b4b5e77 100644 --- a/testing/itest/ws/contribution-callback-promotion/pom.xml +++ b/testing/itest/ws/contribution-callback-promotion/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/contribution-callback/pom.xml b/testing/itest/ws/contribution-callback/pom.xml index e716ab7a47..5a1d0b9780 100644 --- a/testing/itest/ws/contribution-callback/pom.xml +++ b/testing/itest/ws/contribution-callback/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml b/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml index e4247dbeb4..bcf322afcc 100644 --- a/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml +++ b/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/contribution-doc-lit/pom.xml b/testing/itest/ws/contribution-doc-lit/pom.xml index 0e0ae606c6..8c800cae47 100644 --- a/testing/itest/ws/contribution-doc-lit/pom.xml +++ b/testing/itest/ws/contribution-doc-lit/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/contribution-java-first/pom.xml b/testing/itest/ws/contribution-java-first/pom.xml index 63dc9cde67..0711bd3ca0 100644 --- a/testing/itest/ws/contribution-java-first/pom.xml +++ b/testing/itest/ws/contribution-java-first/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/contribution-rpc-lit/pom.xml b/testing/itest/ws/contribution-rpc-lit/pom.xml index ca631b05ec..3acc03c10f 100644 --- a/testing/itest/ws/contribution-rpc-lit/pom.xml +++ b/testing/itest/ws/contribution-rpc-lit/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/contribution-wsdl-first/pom.xml b/testing/itest/ws/contribution-wsdl-first/pom.xml index 5190f5d2fe..8eb95dddef 100644 --- a/testing/itest/ws/contribution-wsdl-first/pom.xml +++ b/testing/itest/ws/contribution-wsdl-first/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/defaults/pom.xml b/testing/itest/ws/defaults/pom.xml index f96fba29ee..5ee464b519 100644 --- a/testing/itest/ws/defaults/pom.xml +++ b/testing/itest/ws/defaults/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/endpoint-references/pom.xml b/testing/itest/ws/endpoint-references/pom.xml index ed5dee78fe..09dc74a4fa 100644 --- a/testing/itest/ws/endpoint-references/pom.xml +++ b/testing/itest/ws/endpoint-references/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/endpoints/pom.xml b/testing/itest/ws/endpoints/pom.xml index 9bf6b21f50..16aaf26e46 100644 --- a/testing/itest/ws/endpoints/pom.xml +++ b/testing/itest/ws/endpoints/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/http-ssl/pom.xml b/testing/itest/ws/http-ssl/pom.xml index e9599a38af..8aae935732 100644 --- a/testing/itest/ws/http-ssl/pom.xml +++ b/testing/itest/ws/http-ssl/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/launcher-axis2/pom.xml b/testing/itest/ws/launcher-axis2/pom.xml index bca9cf004f..6689781d26 100644 --- a/testing/itest/ws/launcher-axis2/pom.xml +++ b/testing/itest/ws/launcher-axis2/pom.xml @@ -30,11 +30,12 @@ Apache Tuscany SCA iTest WS Launcher Axis2 - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca diff --git a/testing/itest/ws/wsdl/pom.xml b/testing/itest/ws/wsdl/pom.xml index c42a0def7e..72375853e3 100644 --- a/testing/itest/ws/wsdl/pom.xml +++ b/testing/itest/ws/wsdl/pom.xml @@ -31,11 +31,12 @@ - + org.apache.tuscany.sca - tuscany-base-runtime + tuscany-base-runtime-pom + pom 2.0-SNAPSHOT - + org.apache.tuscany.sca From bc49abafd72400e709fccfaad781b491664fa83c Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Fri, 21 Jan 2011 11:47:43 +0000 Subject: [PATCH 088/157] Make module name consistent with the other itests git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061765 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml b/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml index e01106ffb5..5920ea0fbe 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml @@ -27,7 +27,7 @@ jar - holder-ws-service-multiple-outputs + itest-holder-ws-service-multiple-outputs Apache Tuscany SCA Itest - Holder Input/MultipleOutputs From 9ec0ed20cc3de01ad4b83ecb9542b937715666cd Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Fri, 21 Jan 2011 11:49:20 +0000 Subject: [PATCH 089/157] TUSCANY-3675 - Ignore the base tests while the bare/holder function is sorted out git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061767 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/example/orderservice/OrderServiceBareTestCase.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java index 903ac9f86b..804455f055 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java @@ -32,11 +32,13 @@ import org.apache.tuscany.sca.node.NodeFactory; import org.junit.AfterClass; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; /** * Tests that the order server responds. */ +@Ignore public class OrderServiceBareTestCase { private static Node node; From 6fae3b5e768da3ac93acae0d3c93a56b3f04a154 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Fri, 21 Jan 2011 12:04:42 +0000 Subject: [PATCH 090/157] Fixes to the JavaInterface code dealing with the type of the response parameter for an async service method - needed fixup after changes caused by the new Holders code. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061775 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/interfacedef/java/impl/JavaInterfaceImpl.java | 9 ++++++--- .../java/impl/JavaInterfaceIntrospectorImpl.java | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java index 0b0a6cdee6..4a2d9a5dd5 100644 --- a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java +++ b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java @@ -38,6 +38,9 @@ import org.apache.tuscany.sca.interfacedef.util.XMLType; import org.apache.tuscany.sca.policy.Intent; +import static org.apache.tuscany.sca.interfacedef.Operation.IDL_INPUT; +import static org.apache.tuscany.sca.interfacedef.Operation.IDL_OUTPUT; + import org.oasisopen.sca.ResponseDispatch; /** @@ -246,7 +249,8 @@ private DataType> prepareSyncInputParams( DataType * @param requestParams - - async method input parameters * @return - the sync method return parameter */ - private DataType> prepareSyncReturnParam( DataType> requestParams ) { + @SuppressWarnings("rawtypes") + private DataType> prepareSyncReturnParam( DataType> requestParams ) { List requestLogical = requestParams.getLogical(); int paramCount = requestLogical.size(); @@ -275,8 +279,7 @@ private DataType> prepareSyncReturnParam( DataType returnTypes.add(returnDataType); DataType> outputType = - new DataTypeImpl>(requestParams.getDataBinding(), - requestParams.getPhysical(), returnTypes); + new DataTypeImpl>(IDL_OUTPUT, requestParams.getPhysical(), returnTypes); return outputType; } // end method prepareSyncReturnParam diff --git a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java index 6979e1d6cd..0d1325e6a8 100644 --- a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java +++ b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java @@ -192,7 +192,8 @@ private Class getActualType(Type type, Class rawType, Map ty return rawType; } - private List getOperations(Class clazz, + @SuppressWarnings("rawtypes") + private List getOperations(Class clazz, boolean remotable, String ns) throws InvalidInterfaceException { From 69d39e9ae7769e4eed58bde9bef1f2b799517e7d Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Fri, 21 Jan 2011 14:33:50 +0000 Subject: [PATCH 091/157] Adding the OASIS MVN Repo to the list of repos in the base POM - used for some OASIS standard JARs git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061823 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pom.xml b/pom.xml index e4d9ce78b7..3721d961b1 100644 --- a/pom.xml +++ b/pom.xml @@ -105,6 +105,18 @@ false + + + oasis.svn + http://tools.oasis-open.org/version-control/svn/sca-j/Release/ + + true + + + true + + + apache.ws.zone Apache WS Zone Repository From 6d183ad52272335b06ee666792392acd77175905 Mon Sep 17 00:00:00 2001 From: Scott Kurz Date: Fri, 21 Jan 2011 15:08:45 +0000 Subject: [PATCH 092/157] Fix itest module name. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061838 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml b/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml index 5920ea0fbe..0c240d9096 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml @@ -28,7 +28,7 @@ jar itest-holder-ws-service-multiple-outputs - Apache Tuscany SCA Itest - Holder Input/MultipleOutputs + Apache Tuscany SCA itest WS Holder Input/MultipleOutputs From 7d794fbff2592bc944a6083cc3c4764df006cbbc Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Fri, 21 Jan 2011 15:39:42 +0000 Subject: [PATCH 093/157] TUSCANY-3783 - Fix a hole in the AsyncReponseInvoker serialization to cover the case there invoker is de-serialized inside the same context that serialized it. Update the sample to demonstrate a stop/start scenario. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061851 13f79535-47bb-0310-9956-ffa450edef68 --- .../assembly/impl/RuntimeEndpointImpl.java | 1 + .../core/invocation/AsyncResponseInvoker.java | 34 ++++++++- .../main/java/sample/impl/SampleProvider.java | 4 +- .../java/sample/impl/SampleWSDLInvoker.java | 69 +++++++++++++++---- .../sample/UpperSampleAsyncReferenceImpl.java | 24 ++++--- .../impl/SampleNativeAsyncTestCase.java | 67 +++++++++++++++++- 6 files changed, 171 insertions(+), 28 deletions(-) diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java index e598be277a..0f86ee79ba 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java @@ -308,6 +308,7 @@ public void invokeAsync(Operation operation, Message msg){ } // end method invokeAsync(Operation, Message) public void invokeAsyncResponse(Message msg){ + resolve(); invoker.invokeAsyncResponse(msg); } diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java index 55c8d7fcab..38727d4670 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java @@ -19,11 +19,15 @@ package org.apache.tuscany.sca.core.invocation; +import java.io.IOException; +import java.io.ObjectInputStream; import java.io.Serializable; +import java.util.Collection; import java.util.Iterator; import java.util.List; import org.apache.tuscany.sca.assembly.Endpoint; +import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.context.CompositeContext; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; @@ -32,7 +36,11 @@ import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.invocation.MessageFactory; +import org.apache.tuscany.sca.node.NodeFactory; import org.apache.tuscany.sca.provider.EndpointAsyncProvider; +import org.apache.tuscany.sca.runtime.DomainRegistryFactory; +import org.apache.tuscany.sca.runtime.EndpointRegistry; +import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; import org.oasisopen.sca.ComponentContext; @@ -189,5 +197,29 @@ public RuntimeEndpointReference getResponseEndpointReference() { public void setResponseEndpointReference( RuntimeEndpointReference responseEndpointReference) { this.responseEndpointReference = responseEndpointReference; - } + } + + private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException + { + in.defaultReadObject(); + + // find the real endpoint + ExtensionPointRegistry extensionPointRegistry = NodeFactory.getInstance().getExtensionPointRegistry(); + DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(extensionPointRegistry); + Collection endpointRegistries = domainRegistryFactory.getEndpointRegistries(); + EndpointRegistry endpointRegistry = endpointRegistries.iterator().next(); + List endpoints = endpointRegistry.findEndpoint(requestEndpoint.getURI()); + requestEndpoint = (RuntimeEndpoint)endpoints.get(0); + + if (responseTargetAddress instanceof EndpointReference){ + // fix the target as in this case it will be an EPR + EndpointReference epr = (EndpointReference)responseTargetAddress; + List endpointReferences = endpointRegistry.getEndpointReferences(); + for (EndpointReference endpointReference : endpointReferences){ + if (endpointReference.getURI().equals(epr.getURI())){ + responseTargetAddress = (T)endpointReference; + } + } + } + } } // end class diff --git a/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleProvider.java b/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleProvider.java index a7e68cfee6..7186c0a0d2 100644 --- a/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleProvider.java +++ b/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleProvider.java @@ -49,7 +49,9 @@ class SampleProvider implements ImplementationAsyncProvider { final ProxyFactory pxf; final ExtensionPointRegistry ep; Object instance; - Map asyncMessageMap = new HashMap(); + + // make this static rather than worrying about persistence on the reference side + static Map asyncMessageMap = new HashMap(); SampleProvider(final RuntimeComponent comp, final SampleImplementation impl, ProxyFactory pf, ExtensionPointRegistry ep) { this.comp = comp; diff --git a/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLInvoker.java b/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLInvoker.java index 41e53d90b7..5c76cfd90a 100644 --- a/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLInvoker.java +++ b/samples/extending-tuscany/implementation-sample/src/main/java/sample/impl/SampleWSDLInvoker.java @@ -19,6 +19,10 @@ package sample.impl; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.lang.reflect.Method; import org.apache.tuscany.sca.core.invocation.AsyncResponseInvoker; @@ -57,23 +61,58 @@ public Message invoke(final Message msg) { } public void invokeAsyncRequest(Message msg) { - // Retrieve the async callback information - AsyncResponseInvoker respInvoker = (AsyncResponseInvoker)msg.getHeaders().get("ASYNC_RESPONSE_INVOKER"); - if( respInvoker == null ) throw new ServiceRuntimeException("Async Implementation invoked with no response invoker"); - - Message responseMsg = processRequest(msg); + if (msg.getOperation().getName().equals("upper")){ + // Retrieve the async callback information + AsyncResponseInvoker respInvoker = (AsyncResponseInvoker)msg.getHeaders().get("ASYNC_RESPONSE_INVOKER"); + if( respInvoker == null ) throw new ServiceRuntimeException("Async Implementation invoked with no response invoker"); + + Message responseMsg = processRequest(msg); + + // in this sample programming model we make the async + // response from the implementation provider. The + // component implementation itself doesn't get a chance to + // do async responses. - // in this sample programming model we make the async - // response from the implementation provider. The - // component implementation itself doesn't get a chance to - // do async responses. - - // At this point we could serialize the AsyncResponseInvoker and pick it up again - // later to send the async response - - if (responseMsg.getBody() != null){ - respInvoker.invokeAsyncResponse(responseMsg); + // At this point we could serialize the AsyncResponseInvoker and pick it up again + // later to send the async response + + try { + FileOutputStream fos = new FileOutputStream("ari.dat"); + ObjectOutputStream oos = new ObjectOutputStream(fos); + oos.writeObject(respInvoker); + oos.close(); + respInvoker.invokeAsyncResponse(responseMsg); + } catch (Exception ex) { + ex.printStackTrace(); + } + + } else if (msg.getOperation().getName().equals("upper2")){ + Message responseMsg = processRequest(msg); + + // read the async response invoker back in and call it + FileInputStream fis = null; + ObjectInputStream ois = null; + try { + fis = new FileInputStream("ari.dat"); + ois = new ObjectInputStream(fis); + AsyncResponseInvoker respInvoker = (AsyncResponseInvoker) ois.readObject(); + ois.close(); + respInvoker.invokeAsyncResponse(responseMsg); + } catch (Exception ex) { + ex.printStackTrace(); + } + } else { + // Retrieve the async callback information + AsyncResponseInvoker respInvoker = (AsyncResponseInvoker)msg.getHeaders().get("ASYNC_RESPONSE_INVOKER"); + if( respInvoker == null ) throw new ServiceRuntimeException("Async Implementation invoked with no response invoker"); + + Message responseMsg = processRequest(msg); + + if (responseMsg.getBody() != null){ + respInvoker.invokeAsyncResponse(responseMsg); + } } + } // end method invokeAsyncRequest public Message processRequest(Message msg) { diff --git a/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncReferenceImpl.java b/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncReferenceImpl.java index 4bfc8356c4..e21ab5ac90 100644 --- a/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncReferenceImpl.java +++ b/samples/extending-tuscany/implementation-sample/src/test/java/sample/UpperSampleAsyncReferenceImpl.java @@ -62,14 +62,17 @@ public String upper(String s) { upper.callAsync("upper", ureq); try { - Thread.sleep(500); - latch.await(500, TimeUnit.SECONDS); + //Thread.sleep(500); + latch.await(5, TimeUnit.SECONDS); } catch (Exception ex) { // do nothing } - if( response != null ) return response.getTextContent(); - else return "upper did not get called back"; + if( response != null ) { + return response.getTextContent(); + } else { + return "upper did not get called back"; + } } /** @@ -95,14 +98,19 @@ public String upper2(String s) { upper.callAsync("upper2", ureq); try { - Thread.sleep(500); - latch.await(500, TimeUnit.SECONDS); + //Thread.sleep(500); + latch.await(5, TimeUnit.SECONDS); } catch (Exception ex) { // do nothing } - if( response2 != null ) return response2.getTextContent(); - else return "upper did not get called back"; + // because we serialize the upper request and re-use it in upper2 + // the response to upper2 comes back to the upper callback + if( response != null ) { + return response.getTextContent(); + } else { + return "upper2 did not get called back"; + } } /** diff --git a/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/SampleNativeAsyncTestCase.java b/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/SampleNativeAsyncTestCase.java index 28d54647c5..9667150063 100644 --- a/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/SampleNativeAsyncTestCase.java +++ b/samples/extending-tuscany/implementation-sample/src/test/java/sample/impl/SampleNativeAsyncTestCase.java @@ -24,7 +24,9 @@ import org.apache.tuscany.sca.node.Contribution; import org.apache.tuscany.sca.node.Node; import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.After; import org.junit.AfterClass; +import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; @@ -39,9 +41,10 @@ public class SampleNativeAsyncTestCase { static Node node; +/* @BeforeClass public static void setUp() throws Exception { - final NodeFactory nf = NodeFactory.newInstance(); + final NodeFactory nf = NodeFactory.getInstance(); String here = SampleNativeAsyncTestCase.class.getProtectionDomain().getCodeSource().getLocation().toString(); // Create the node using the pattern "name of composite file to start" / Contribution to use node = nf.createNode("testnativeasync.composite", new Contribution("test", here)); @@ -52,7 +55,25 @@ public static void setUp() throws Exception { public static void tearDown() throws Exception { node.stop(); } +*/ + + @Before + public void setUp() throws Exception { + final NodeFactory nf = NodeFactory.getInstance(); + String here = SampleNativeAsyncTestCase.class.getProtectionDomain().getCodeSource().getLocation().toString(); + // Create the node using the pattern "name of composite file to start" / Contribution to use + node = nf.createNode("testnativeasync.composite", new Contribution("test", here)); + node.start(); + } + @After + public void tearDown() throws Exception { + node.stop(); + } + + /** + * Show that we can make a basic call + */ @Test public void testUpper() { System.out.println("SampleNaiveAsyncTestCase.testUpper"); @@ -62,15 +83,55 @@ public void testUpper() { assertEquals("ASYNC", r); } + /** + * Show that we can make a call that requires us to persist the + * AsyncResponseInvoker + */ @Test - public void testUpper2() { + public void testPersistAsyncResponseInvoker() { System.out.println("SampleNaiveAsyncTestCase.testUpper2"); Upper upper = node.getService(Upper.class, "SampleNativeAsyncReference"); - final String r = upper.upper2("async2"); + // call upper to write out the async response invoker + String r = upper.upper("async"); + // call upper2 to read it back in again + r = upper.upper2("async2"); System.out.println(r); assertEquals("ASYNC2", r); } + /** + * Show that we can make a call that works over service restarts + */ + @Test + public void testServiceRestart() { + System.out.println("SampleNaiveAsyncTestCase.testUpper2"); + System.out.println("Starting first node"); + Upper upper = node.getService(Upper.class, "SampleNativeAsyncReference"); + String r = upper.upper("async"); + System.out.println(r); + assertEquals("ASYNC", r); + + System.out.println("Stopping first node"); + node.stop(); + + // now start another node and try call back in to get the + // async response to come back + + System.out.println("Starting second node"); + final NodeFactory nf = NodeFactory.getInstance(); + String here = SampleNativeAsyncTestCase.class.getProtectionDomain().getCodeSource().getLocation().toString(); + // Create the node using the pattern "name of composite file to start" / Contribution to use + node = nf.createNode("testnativeasync.composite", new Contribution("test", here)); + node.start(); + upper = node.getService(Upper.class, "SampleNativeAsyncReference"); + r = upper.upper2("async2"); + System.out.println(r); + assertEquals("ASYNC2", r); + } + + /** + * Show that one-way operations work in the async case + */ @Test public void testVoid() { System.out.println("SampleNaiveAsyncTestCase.testUpperVoid"); From 4c8ca1c3770b21c472321191bbc5a43f51a8e5d8 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Fri, 21 Jan 2011 15:41:26 +0000 Subject: [PATCH 094/157] TUSCANY-3783 - don't wrap exceptions unnecessarily git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1061855 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/core/invocation/RuntimeInvoker.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java index 1c0941f26d..a9b93ae2e8 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java @@ -174,11 +174,13 @@ public void invokeAsync(Message msg) { try { try { ((InvokerAsyncRequest)headInvoker).invokeAsyncRequest(msg); - } catch (Throwable ex) { + } catch (ServiceRuntimeException ex) { + throw ex; + } catch (Throwable ex) { // temporary fix to swallow the dummy exception that's // thrown back to get past the response chain processing. if (!(ex instanceof AsyncResponseException)){ - throw new ServiceRuntimeException(ex); + throw new ServiceRuntimeException(ex); } } } finally { From 989bd0df3626ddb358bb33c81e466aa84d745088 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Mon, 24 Jan 2011 14:57:26 +0000 Subject: [PATCH 095/157] Fixing serialization of AsyncResponseInvoker in support of async services under TUSCANY-3783 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1062814 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/runtime/BaseEndpointRegistry.java | 17 ++ .../tuscany/sca/runtime/EndpointRegistry.java | 8 + .../core/invocation/AsyncResponseInvoker.java | 152 +++++++++++++++--- .../java/invocation/ResponseDispatchImpl.java | 5 +- 4 files changed, 161 insertions(+), 21 deletions(-) diff --git a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseEndpointRegistry.java b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseEndpointRegistry.java index 65c1f8815b..1e7e1751a6 100644 --- a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseEndpointRegistry.java +++ b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseEndpointRegistry.java @@ -111,6 +111,23 @@ public List findEndpoint(EndpointReference endpointReference) { public List findEndpointReference(Endpoint endpoint) { return endpointreferences; } + + /** + * Returns a list of EndpointReferences that have a URI that matches a given URI + * @param uri - the URI to match + * @return a List of EndpointReferences that match the supplied URI - if there are none + * an *empty* list is returned (not null) + */ + public List findEndpointReferences( String uri ) { + List theRefs = new ArrayList(); + if( uri == null ) return theRefs; + + for( EndpointReference ref : endpointreferences ) { + if( uri.equals(ref.getURI()) ) theRefs.add(ref); + } // end for + + return theRefs; + } // end method findEndpointReference public abstract Endpoint getEndpoint(String uri); diff --git a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointRegistry.java b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointRegistry.java index 2c01eb115a..ed2d6894c0 100644 --- a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointRegistry.java +++ b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointRegistry.java @@ -63,6 +63,14 @@ public interface EndpointRegistry { void removeEndpointReference(EndpointReference endpointReference); // List findEndpointReference(Endpoint endpoint); List getEndpointReferences(); + + /** + * Returns a list of EndpointReferences that have a URI that matches a given URI + * @param uri - the URI to match + * @return a List of EndpointReferences that match the supplied URI - if there are none + * an *empty* list is returned (not null) + */ + public List findEndpointReferences( String uri ); void addListener(EndpointListener listener); void removeListener(EndpointListener listener); diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java index 38727d4670..2e675c5e7a 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java @@ -25,12 +25,16 @@ import java.util.Collection; import java.util.Iterator; import java.util.List; +import java.util.Map; import org.apache.tuscany.sca.assembly.Endpoint; import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.context.CompositeContext; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; +import org.apache.tuscany.sca.core.UtilityExtensionPoint; +import org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl; +import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; @@ -40,6 +44,7 @@ import org.apache.tuscany.sca.provider.EndpointAsyncProvider; import org.apache.tuscany.sca.runtime.DomainRegistryFactory; import org.apache.tuscany.sca.runtime.EndpointRegistry; +import org.apache.tuscany.sca.runtime.EndpointSerializer; import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; @@ -60,8 +65,8 @@ public class AsyncResponseInvoker implements InvokerAsyncResponse, Serializab */ private static final long serialVersionUID = -7992598227671386588L; - private RuntimeEndpoint requestEndpoint; - private RuntimeEndpointReference responseEndpointReference; + private transient RuntimeEndpoint requestEndpoint; + private transient RuntimeEndpointReference responseEndpointReference; private T responseTargetAddress; private String relatesToMsgID; private String operationName; @@ -69,6 +74,12 @@ public class AsyncResponseInvoker implements InvokerAsyncResponse, Serializab private String bindingType = ""; private boolean isNativeAsync; + private String endpointURI; + private String endpointReferenceURI; + private String domainURI; + + private transient EndpointRegistry endpointRegistry; + public AsyncResponseInvoker(RuntimeEndpoint requestEndpoint, RuntimeEndpointReference responseEndpointReference, T responseTargetAddress, String relatesToMsgID, @@ -81,6 +92,20 @@ public AsyncResponseInvoker(RuntimeEndpoint requestEndpoint, this.operationName = operationName; this.messageFactory = messageFactory; + CompositeContext context = null; + if(requestEndpoint != null ) { + endpointURI = requestEndpoint.getURI(); + context = requestEndpoint.getCompositeContext(); + } // end if + if(responseEndpointReference != null ) { + endpointReferenceURI = responseEndpointReference.getURI(); + context = responseEndpointReference.getCompositeContext(); + } + + if( context != null ) { + domainURI = context.getDomainURI(); + } // end if + if ((requestEndpoint.getBindingProvider() instanceof EndpointAsyncProvider) && (((EndpointAsyncProvider)requestEndpoint.getBindingProvider()).supportsNativeAsync())){ isNativeAsync = true; @@ -126,8 +151,9 @@ public void setRelatesToMsgID(String relatesToMsgID) { * - this method creates a Tuscany message * * @param args the response data + * @param headers - any header */ - public void invokeAsyncResponse(Object args) { + public void invokeAsyncResponse(Object args, Map headers) { Message msg = messageFactory.createMessage(); @@ -150,6 +176,10 @@ public void invokeAsyncResponse(Object args) { msg.setTo(requestEndpoint); msg.setFrom(responseEndpointReference); + if( headers != null ) { + msg.getHeaders().putAll(headers); + } + if( args instanceof Throwable ) { msg.setFaultBody(args); } else { @@ -199,27 +229,111 @@ public void setResponseEndpointReference( this.responseEndpointReference = responseEndpointReference; } - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException + @SuppressWarnings("unchecked") + private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); - // find the real endpoint - ExtensionPointRegistry extensionPointRegistry = NodeFactory.getInstance().getExtensionPointRegistry(); - DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(extensionPointRegistry); - Collection endpointRegistries = domainRegistryFactory.getEndpointRegistries(); - EndpointRegistry endpointRegistry = endpointRegistries.iterator().next(); - List endpoints = endpointRegistry.findEndpoint(requestEndpoint.getURI()); - requestEndpoint = (RuntimeEndpoint)endpoints.get(0); + requestEndpoint = retrieveEndpoint(endpointURI); + responseEndpointReference = retrieveEndpointReference(endpointReferenceURI); if (responseTargetAddress instanceof EndpointReference){ // fix the target as in this case it will be an EPR EndpointReference epr = (EndpointReference)responseTargetAddress; - List endpointReferences = endpointRegistry.getEndpointReferences(); - for (EndpointReference endpointReference : endpointReferences){ - if (endpointReference.getURI().equals(epr.getURI())){ - responseTargetAddress = (T)endpointReference; - } - } - } - } + responseTargetAddress = (T)retrieveEndpointReference(epr.getURI()); + } // end if + } // end method readObject + + /** + * Fetches the EndpointReference identified by an endpoint reference URI + * @param uri - the URI of the endpoint reference + * @return - the EndpointReference matching the supplied URI - null if no EPR is found which + * matches the URI + */ + private RuntimeEndpointReference retrieveEndpointReference(String uri) { + if( uri == null ) return null; + if( endpointRegistry == null ) return null; + List refs = endpointRegistry.findEndpointReferences( uri ); + // If there is more than EndpointReference with the uri... + if( refs.isEmpty() ) return null; + // TODO: what if there is more than 1 EPR with the given URI? + return (RuntimeEndpointReference) refs.get(0); + } // end method retrieveEndpointReference + + /** + * Fetches the Endpoint identified by an endpoint URI + * - the Endpoint is retrieved from the EndpointRegistry + * @param uri - the URI of the Endpoint + * @return - the Endpoint corresponding to the URI, or null if no Endpoint is found which has the + * supplied URI + */ + private RuntimeEndpoint retrieveEndpoint(String uri) { + if( uri == null ) return null; + if( endpointRegistry == null ) endpointRegistry = getEndpointRegistry( uri ); + if( endpointRegistry == null ) return null; + // TODO what if more than one Endpoint gets returned?? + return (RuntimeEndpoint) endpointRegistry.findEndpoint(uri).get(0); + } // end method retrieveEndpoint + + /** + * Gets the EndpointRegistry which contains an Endpoint with the supplied URI + * @param uri - The URI of an Endpoint + * @return - the EndpointRegistry containing the Endpoint with the supplied URI - null if no + * such EndpointRegistry can be found + */ + private EndpointRegistry getEndpointRegistry(String uri) { + ExtensionPointRegistry registry = null; + EndpointRegistry endpointRegistry = null; + + CompositeContext context = CompositeContext.getCurrentCompositeContext(); + if( context == null && requestEndpoint != null ) context = requestEndpoint.getCompositeContext(); + if( context != null ) { + registry = context.getExtensionPointRegistry(); + endpointRegistry = getEndpointRegistry( registry ); + if( endpointRegistry != null ) return endpointRegistry; + } // end if + + // Deal with the case where there is no context available + for( NodeFactory factory : NodeFactory.getNodeFactories() ) { + registry = factory.getExtensionPointRegistry(); + if( registry != null ) { + // Find the actual Endpoint in the EndpointRegistry + endpointRegistry = getEndpointRegistry( registry ); + + if( endpointRegistry != null ) { + for( Endpoint endpoint : endpointRegistry.findEndpoint(uri) ) { + // TODO: For the present, simply return the first registry with a matching endpoint + return endpointRegistry; + } // end for + } // end if + } // end if + } // end for + + return null; + } // end method getEndpointRegistry + + /** + * Get the EndpointRegistry + * @param registry - the ExtensionPoint registry + * @return the EndpointRegistry - will be null if the EndpointRegistry cannot be found + */ + private EndpointRegistry getEndpointRegistry( ExtensionPointRegistry registry) { + DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry); + + if( domainRegistryFactory == null ) return null; + + // Find the first endpoint registry that matches the domain name + if( domainURI != null ) { + for( EndpointRegistry endpointRegistry : domainRegistryFactory.getEndpointRegistries() ) { + if( domainURI.equals( endpointRegistry.getDomainURI() ) ) return endpointRegistry; + } // end for + } // end if + + // if there was no domainName to match, simply return the first EndpointRegistry... + EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0]; + + + return endpointRegistry; + } // end method + } // end class diff --git a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java index 53dc708a30..343682d8b1 100644 --- a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java +++ b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java @@ -138,7 +138,7 @@ public void sendFault(Throwable e) { // Use response invoker if present if( respInvoker != null ) { //respInvoker.invokeAsyncResponse(new AsyncFaultWrapper(e)); - respInvoker.invokeAsyncResponse(e); + respInvoker.invokeAsyncResponse(e, null); return; } // end if @@ -153,6 +153,7 @@ public void sendFault(Throwable e) { * @throws IllegalStateException if either the sendResponse method or the sendFault method have been called previously * @param res - the response message, which is of type T */ + @SuppressWarnings("unchecked") public void sendResponse(T res) { if( sendOK() ) { lock.lock(); @@ -175,7 +176,7 @@ public void sendResponse(T res) { // Use response invoker if present if( respInvoker != null ) { - respInvoker.invokeAsyncResponse(res); + respInvoker.invokeAsyncResponse(res, null); return; } // end if } // end method sendResponse From c83d6cdf539783e433fc383b1759a589a0895eb1 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Mon, 24 Jan 2011 20:02:06 +0000 Subject: [PATCH 096/157] Fixing serialization of AsyncResponseInvoker in support of async services under TUSCANY-3783 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1062950 13f79535-47bb-0310-9956-ffa450edef68 --- .../core/invocation/AsyncResponseInvoker.java | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java index 2e675c5e7a..da1c7f365e 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java @@ -70,7 +70,7 @@ public class AsyncResponseInvoker implements InvokerAsyncResponse, Serializab private T responseTargetAddress; private String relatesToMsgID; private String operationName; - private MessageFactory messageFactory; + private transient MessageFactory messageFactory; private String bindingType = ""; private boolean isNativeAsync; @@ -79,6 +79,7 @@ public class AsyncResponseInvoker implements InvokerAsyncResponse, Serializab private String domainURI; private transient EndpointRegistry endpointRegistry; + private transient ExtensionPointRegistry registry; public AsyncResponseInvoker(RuntimeEndpoint requestEndpoint, RuntimeEndpointReference responseEndpointReference, @@ -104,6 +105,7 @@ public AsyncResponseInvoker(RuntimeEndpoint requestEndpoint, if( context != null ) { domainURI = context.getDomainURI(); + registry = context.getExtensionPointRegistry(); } // end if if ((requestEndpoint.getBindingProvider() instanceof EndpointAsyncProvider) && @@ -237,6 +239,8 @@ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundE requestEndpoint = retrieveEndpoint(endpointURI); responseEndpointReference = retrieveEndpointReference(endpointReferenceURI); + messageFactory = getMessageFactory(); + if (responseTargetAddress instanceof EndpointReference){ // fix the target as in this case it will be an EPR EndpointReference epr = (EndpointReference)responseTargetAddress; @@ -245,6 +249,14 @@ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundE } // end method readObject /** + * Gets a message factory + * @return + */ + private MessageFactory getMessageFactory() { + return registry.getExtensionPoint(FactoryExtensionPoint.class).getFactory(MessageFactory.class); + } // end method getMessageFactory + + /** * Fetches the EndpointReference identified by an endpoint reference URI * @param uri - the URI of the endpoint reference * @return - the EndpointReference matching the supplied URI - null if no EPR is found which @@ -290,7 +302,10 @@ private EndpointRegistry getEndpointRegistry(String uri) { if( context != null ) { registry = context.getExtensionPointRegistry(); endpointRegistry = getEndpointRegistry( registry ); - if( endpointRegistry != null ) return endpointRegistry; + if( endpointRegistry != null ) { + this.registry = registry; + return endpointRegistry; + } // end if } // end if // Deal with the case where there is no context available @@ -303,6 +318,7 @@ private EndpointRegistry getEndpointRegistry(String uri) { if( endpointRegistry != null ) { for( Endpoint endpoint : endpointRegistry.findEndpoint(uri) ) { // TODO: For the present, simply return the first registry with a matching endpoint + this.registry = registry; return endpointRegistry; } // end for } // end if From bce78b2fb873afe2f1fd54e74b6cdc8bfb8357c3 Mon Sep 17 00:00:00 2001 From: Scott Kurz Date: Mon, 24 Jan 2011 20:07:38 +0000 Subject: [PATCH 097/157] Add some tests (@Ignore'd) showing problems in void return type + Holder case. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1062956 13f79535-47bb-0310-9956-ffa450edef68 --- .../example/orderservice/OrderService.java | 8 ++ .../orderservice/OrderServiceForwardImpl.java | 61 ++++++++------- .../orderservice/OrderServiceImpl.java | 13 ++++ .../orderservice/OrderServiceTestCase.java | 76 +++++++++++++++++++ 4 files changed, 130 insertions(+), 28 deletions(-) diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java index d3a8fce8c0..d738dd58fc 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java @@ -55,4 +55,12 @@ public String[] reviewOrderTwoInOutsThenIn( @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.INOUT) Holder myOutParam, Integer myCode); + + public void reviewOrderTwoInOutsVoid( + @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT) + Holder myData, + @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.INOUT) + Holder myOutParam); + + } diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java index eb9b355dfa..4c89fd59a7 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java @@ -8,34 +8,39 @@ @Service(OrderService.class) public class OrderServiceForwardImpl implements OrderService { - @Reference - public OrderService ref; - - public String[] reviewOrder(Holder myData, Holder myOutParam) { - String[] retVal = ref.reviewOrder(myData, myOutParam); - return retVal; - } - - @Override - public String[] reviewOrderTwoInOuts(Holder myData, - Holder myOutParam) { - String[] retVal = ref.reviewOrderTwoInOuts(myData, myOutParam); - return retVal; - } - - @Override - public String[] reviewOrderTwoOutHolders(Holder myData, - Holder myOutParam) { - String[] retVal = ref.reviewOrderTwoOutHolders(myData, myOutParam); - return retVal; - } - - @Override - public String[] reviewOrderTwoInOutsThenIn(Holder myData, - Holder myOutParam, Integer myCode) { - String[] retVal = ref.reviewOrderTwoInOutsThenIn(myData, myOutParam, myCode); - return retVal; - } + @Reference + public OrderService ref; + + public String[] reviewOrder(Holder myData, Holder myOutParam) { + String[] retVal = ref.reviewOrder(myData, myOutParam); + return retVal; + } + + @Override + public String[] reviewOrderTwoInOuts(Holder myData, + Holder myOutParam) { + String[] retVal = ref.reviewOrderTwoInOuts(myData, myOutParam); + return retVal; + } + + @Override + public String[] reviewOrderTwoOutHolders(Holder myData, + Holder myOutParam) { + String[] retVal = ref.reviewOrderTwoOutHolders(myData, myOutParam); + return retVal; + } + + @Override + public String[] reviewOrderTwoInOutsThenIn(Holder myData, + Holder myOutParam, Integer myCode) { + String[] retVal = ref.reviewOrderTwoInOutsThenIn(myData, myOutParam, myCode); + return retVal; + } + + @Override + public void reviewOrderTwoInOutsVoid(Holder myData, Holder myOutParam) { + ref.reviewOrderTwoInOutsVoid(myData, myOutParam); + } } diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java index c6c471c872..46eb8a6307 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java @@ -142,4 +142,17 @@ public String[] reviewOrderTwoInOutsThenIn(Holder myData, return returnVal; } + @Override + public void reviewOrderTwoInOutsVoid(Holder myData, Holder myOutParam) { + double total = myData.value.getTotal(); + Order retOrder = new Order(); + if (total < 50.1 && myOutParam.value < 50) { + myOutParam.value = new Float("1"); + retOrder.setStatus(Status.APPROVED); + } else { + myOutParam.value = new Float("-1"); + retOrder.setStatus(Status.REJECTED); + } + myData.value = retOrder; + } } diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java index cb18d1f265..0f6b858720 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java @@ -32,6 +32,7 @@ import org.apache.tuscany.sca.node.NodeFactory; import org.junit.AfterClass; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; /** @@ -195,6 +196,44 @@ public void testOrderReviewTwoInOutsThenInWS() throws IOException { testOrderReviewOrderTwoInOutsThenIn(orderService); } + @Ignore + @Test + public void testOrderReviewVoidApprovedSCA() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceComponent/OrderService"); + assertNotNull(orderService); + testOrderReviewVoidApproved(orderService); + } + + @Ignore + @Test + public void testOrderReviewVoidApprovedWS() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService"); + assertNotNull(orderService); + testOrderReviewVoidApproved(orderService); + } + + @Ignore + @Test + public void testOrderReviewVoidRejectedSCA() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceComponent/OrderService"); + assertNotNull(orderService); + testOrderReviewVoidRejected(orderService); + } + + @Ignore + @Test + public void testOrderReviewVoidRejectedWS() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService"); + assertNotNull(orderService); + testOrderReviewVoidRejected(orderService); + } + + + private void testOrderReviewApproved(OrderService orderService, Holder outParam) throws IOException { Order order = new Order(); order.setStatus( Status.CREATED ); @@ -295,6 +334,43 @@ private void testOrderReviewOrderTwoInOutsThenIn(OrderService orderService) thro assertTrue(outParam.value.floatValue() == 97); } + private void testOrderReviewVoidApproved(OrderService orderService) throws IOException { + Order order = new Order(); + order.setStatus( Status.CREATED ); + order.setCustomerId("cust1234"); + order.setTotal( 50.0 ); + + System.out.println( ">>> Order submitted=" + order ); + Holder holder = new Holder(order); + + Float parm2 = new Float("45"); + Holder outParam = new Holder(parm2); + + orderService.reviewOrderTwoInOutsVoid(holder, outParam ); + + assertTrue( holder.value.getStatus() == Status.APPROVED ); + assertEquals(outParam.value, new Float("1")); + } + + private void testOrderReviewVoidRejected(OrderService orderService) throws IOException { + Order order = new Order(); + order.setStatus( Status.CREATED ); + order.setCustomerId("cust2345"); + order.setTotal( 50000.0 ); + + System.out.println( ">>> Order submitted=" + order ); + Holder holder = new Holder(order); + + Float parm2 = new Float("76"); + Holder outParam = new Holder(parm2); + + orderService.reviewOrderTwoInOutsVoid(holder, outParam ); + + assertTrue( holder.value.getStatus() == Status.REJECTED ); + assertEquals(outParam.value, new Float("-1")); + } + + @AfterClass public static void stopServer() throws Exception { if (node != null) From 72d951bea2ddabf2b3be86e0a789f8d188e25051 Mon Sep 17 00:00:00 2001 From: Scott Kurz Date: Tue, 25 Jan 2011 03:38:57 +0000 Subject: [PATCH 098/157] Fix bare+JAXB wsdlgen case. Fix Holder+void_return_type case. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1063125 13f79535-47bb-0310-9956-ffa450edef68 --- .../binding/ws/wsdlgen/TestJavaInterface.java | 5 + .../sca/databinding/jaxb/JAXBDataBinding.java | 10 +- .../jaxws/JAXWSJavaInterfaceProcessor.java | 18 +- .../sca/interfacedef/java/JavaOperation.java | 12 ++ .../impl/JavaInterfaceIntrospectorImpl.java | 169 +++++++++--------- .../java/impl/JavaOperationImpl.java | 13 +- 6 files changed, 137 insertions(+), 90 deletions(-) diff --git a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaInterface.java b/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaInterface.java index 69265c1528..d60234fe7d 100644 --- a/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaInterface.java +++ b/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/TestJavaInterface.java @@ -23,6 +23,7 @@ import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.ParameterStyle; +import org.apache.tuscany.sca.binding.ws.other.Other; import org.oasisopen.sca.annotation.OneWay; import org.oasisopen.sca.annotation.Remotable; @@ -64,4 +65,8 @@ public interface TestJavaInterface { @WebMethod @SOAPBinding(parameterStyle=ParameterStyle.BARE) int m9(String str); + + @WebMethod + @SOAPBinding(parameterStyle=ParameterStyle.BARE) + Other m10(Other other); } diff --git a/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java b/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java index 4d3302cffa..9088066443 100644 --- a/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java +++ b/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBDataBinding.java @@ -92,7 +92,15 @@ public boolean introspect(DataType dataType, Operation operation) { if (xmlType == null) { return false; } - dataType.setLogical(xmlType); + + // If DataType is already an XMLType it might have an element name that we wish to preserve + Object logical = dataType.getLogical(); + if (logical instanceof XMLType) { + ((XMLType)logical).setTypeName(xmlType.getTypeName()); + } else { + dataType.setLogical(xmlType); + } + dataType.setDataBinding(NAME); return true; } diff --git a/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java b/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java index da70b3ffba..8e65cca7e6 100644 --- a/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java +++ b/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java @@ -184,16 +184,25 @@ public void visitInterface(JavaInterface contract) throws InvalidInterfaceExcept } operation.getParameterModes().set(i, getParameterMode(param.mode())); } + ParameterMode mode = operation.getParameterModes().get(i); } + + // + // Note for BARE mapping this will NOT be WS-I compliant, but let's assume this is not the place to + // worry about non-compliance, and keep on going. + // WebResult result = method.getAnnotation(WebResult.class); if (result != null) { String ns = getValue(result.targetNamespace(), tns); // Default to Response for doc-bare String name = getValue(result.name(), documentStyle ? operationName + "Response" : "return"); QName element = new QName(ns, name); - Object logical = operation.getOutputType().getLogical(); - if (logical instanceof XMLType) { - ((XMLType)logical).setElementName(element); + if (!operation.hasReturnTypeVoid()) { + List outputDataTypes = operation.getOutputType().getLogical(); + DataType returnDataType = outputDataTypes.get(0); + if (returnDataType instanceof XMLType) { + ((XMLType)returnDataType).setElementName(element); + } } } // FIXME: [rfeng] For the BARE mapping, do we need to create a Wrapper? @@ -290,8 +299,7 @@ public DataType run() { name = getValue(name, "return"); QName element = new QName(ns, name); - // This must be a check for void? - if ((operation.getOutputType() != null) && (operation.getOutputType().getLogical().size() != 0)) { + if (!operation.hasReturnTypeVoid()) { Object logical = operation.getOutputType().getLogical().get(0).getLogical(); QName type = null; if (logical instanceof XMLType) { diff --git a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaOperation.java b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaOperation.java index e894ac279b..ee8cea8740 100644 --- a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaOperation.java +++ b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/JavaOperation.java @@ -66,5 +66,17 @@ public interface JavaOperation extends Operation { * @return - true if the operation is async server style */ public boolean isAsyncServer(); + + /** + * Indicates whether the underlying Java method has void return type. + * @return - true if the Java method has void return type. + */ + public boolean hasReturnTypeVoid(); + + /** + * Sets whether the underlying Java method has void return type. + * @param flag - "true" marks this operation as having void return type. + */ + public void setReturnTypeVoid(boolean flag); } diff --git a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java index 0d1325e6a8..0d1e832faf 100644 --- a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java +++ b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java @@ -77,11 +77,11 @@ public JavaInterfaceIntrospectorImpl(JavaInterfaceFactory javaFactory) { } public void introspectInterface(JavaInterface javaInterface, Class clazz) throws InvalidInterfaceException { - + if(!loadedVisitors) { this.visitors = javaFactory.getInterfaceVisitors(); } - + javaInterface.setJavaClass(clazz); boolean remotable = clazz.isAnnotationPresent(Remotable.class); @@ -104,7 +104,7 @@ public void introspectInterface(JavaInterface javaInterface, Class clazz) thr } } } - + if (remotable) { if (javaInterface.isRemotableSet() && javaInterface.isRemotable() == false) { throw new InvalidAnnotationException("[JCA30005] @Remotable annotation present in a interface marked as not remotable in the SCDL", Remotable.class); @@ -123,11 +123,11 @@ public void introspectInterface(JavaInterface javaInterface, Class clazz) thr callbackClass = callback.value(); if (remotable && !callbackClass.isAnnotationPresent(Remotable.class)) { throw new InvalidCallbackException("Callback " + callbackClass.getName() + - " must be remotable on remotable interface " + clazz.getName()); + " must be remotable on remotable interface " + clazz.getName()); } if (!remotable && callbackClass.isAnnotationPresent(Remotable.class)) { throw new InvalidCallbackException("Callback" + callbackClass.getName() + - " must not be remotable on local interface " + clazz.getName()); + " must not be remotable on local interface " + clazz.getName()); } } else if (callback != null && Void.class.equals(callback.value())) { throw new InvalidCallbackException("No callback interface specified on callback annotation in " + clazz.getName()); @@ -141,7 +141,7 @@ public void introspectInterface(JavaInterface javaInterface, Class clazz) thr for (JavaInterfaceVisitor extension : visitors) { extension.visitInterface(javaInterface); } // end for - + // Check if any methods have disallowed annotations // Check if any private methods have illegal annotations that should be raised as errors Set methods = JavaIntrospectionHelper.getMethods(clazz); @@ -151,29 +151,29 @@ public void introspectInterface(JavaInterface javaInterface, Class clazz) thr } // end method introspectInterface private void checkMethodAnnotations(Method method, JavaInterface javaInterface) throws InvalidAnnotationException { - for ( Annotation a : method.getAnnotations() ) { - if( a instanceof Remotable ) { - // [JCA90053] @Remotable annotation cannot be on a method that is not a setter method - if( !JavaIntrospectionHelper.isSetter(method) ) { - throw new InvalidAnnotationException("[JCA90053] @Remotable annotation present on an interface method" + - " which is not a Setter method: " + javaInterface.getName() + "/" + method.getName(), Remotable.class); - } // end if - } // end if - } // end for - - // Parameter annotations - for (Annotation[] parmAnnotations : method.getParameterAnnotations()) { - for (Annotation annotation : parmAnnotations) { - if (annotation instanceof Remotable ) { - throw new InvalidAnnotationException("[JCA90053] @Remotable annotation present on an interface method" + - " parameter: " + javaInterface.getName() + "/" + method.getName(), Remotable.class); - } // end if - } // end for - } // end for - method.getParameterAnnotations(); - } // end method checkMethodAnnotations - - private Class[] getActualTypes(Type[] types, Class[] rawTypes, Map typeBindings) { + for ( Annotation a : method.getAnnotations() ) { + if( a instanceof Remotable ) { + // [JCA90053] @Remotable annotation cannot be on a method that is not a setter method + if( !JavaIntrospectionHelper.isSetter(method) ) { + throw new InvalidAnnotationException("[JCA90053] @Remotable annotation present on an interface method" + + " which is not a Setter method: " + javaInterface.getName() + "/" + method.getName(), Remotable.class); + } // end if + } // end if + } // end for + + // Parameter annotations + for (Annotation[] parmAnnotations : method.getParameterAnnotations()) { + for (Annotation annotation : parmAnnotations) { + if (annotation instanceof Remotable ) { + throw new InvalidAnnotationException("[JCA90053] @Remotable annotation present on an interface method" + + " parameter: " + javaInterface.getName() + "/" + method.getName(), Remotable.class); + } // end if + } // end for + } // end for + method.getParameterAnnotations(); + } // end method checkMethodAnnotations + + private Class[] getActualTypes(Type[] types, Class[] rawTypes, Map typeBindings) { Class[] actualTypes = new Class[types.length]; for (int i = 0; i < actualTypes.length; i++) { actualTypes[i] = getActualType(types[i], rawTypes[i], typeBindings); @@ -193,7 +193,7 @@ private Class getActualType(Type type, Class rawType, Map ty } @SuppressWarnings("rawtypes") - private List getOperations(Class clazz, + private List getOperations(Class clazz, boolean remotable, String ns) throws InvalidInterfaceException { @@ -217,7 +217,7 @@ private List getOperations(Class clazz, List operations = new ArrayList(methods.length); Set names = remotable ? new HashSet() : null; for (Method method : methods) { - boolean hasMultipleOutputs = false; + boolean hasMultipleOutputs = false; if (method.getDeclaringClass() == Object.class) { // Skip the methods on the Object.class continue; @@ -236,10 +236,10 @@ private List getOperations(Class clazz, Class[] faultTypes = getActualTypes(method.getGenericExceptionTypes(), method.getExceptionTypes(), typeBindings); Class[] allOutputTypes = getOutputTypes(returnType, parameterTypes); - + // For async server interfaces, faults are described using the @AsyncFaults annotation if( method.isAnnotationPresent(AsyncFault.class) ) { - faultTypes = readAsyncFaultTypes( method ); + faultTypes = readAsyncFaultTypes( method ); } // end if boolean nonBlocking = method.isAnnotationPresent(OneWay.class); @@ -258,46 +258,49 @@ private List getOperations(Class clazz, JavaOperation operation = new JavaOperationImpl(); operation.setName(name); - - // Set outputType to null for void - XMLType xmlReturnType = new XMLType(new QName(ns, "return"), null); - DataType returnDataType = - returnType == void.class ? null : new DataTypeImpl(UNKNOWN_DATABINDING, returnType, method - .getGenericReturnType(), xmlReturnType); - - + + XMLType xmlReturnType = new XMLType(new QName(ns, "return"), null); + DataType returnDataType = null; + if (returnType == void.class) { + operation.setReturnTypeVoid(true); + } else { + returnDataType = new DataTypeImpl(UNKNOWN_DATABINDING, returnType, + method.getGenericReturnType(), xmlReturnType); + operation.setReturnTypeVoid(false); + } + // Handle Input Types - List paramDataTypes = new ArrayList(parameterTypes.length); - List genericHolderTypes = new ArrayList(); - List> physicalHolderTypes = new ArrayList>(); + List paramDataTypes = new ArrayList(parameterTypes.length); + List genericHolderTypes = new ArrayList(); + List> physicalHolderTypes = new ArrayList>(); Type[] genericParamTypes = method.getGenericParameterTypes(); for (int i = 0; i < parameterTypes.length; i++) { Class paramType = parameterTypes[i]; XMLType xmlParamType = new XMLType(new QName(ns, "arg" + i), null); - + DataTypeImpl xmlDataType = new DataTypeImpl( - UNKNOWN_DATABINDING, paramType, genericParamTypes[i],xmlParamType); + UNKNOWN_DATABINDING, paramType, genericParamTypes[i],xmlParamType); ParameterMode mode = ParameterMode.IN; // Holder pattern. Physical types of Holder classes are updated to to aid in transformations. if ( Holder.class == paramType) { - hasMultipleOutputs = true; - genericHolderTypes.add(genericParamTypes[i]); - Type firstActual = getFirstActualType( genericParamTypes[ i ] ); - if ( firstActual != null ) { - physicalHolderTypes.add((Class)firstActual); - xmlDataType.setPhysical( (Class)firstActual ); - mode = ParameterMode.INOUT; - } else { - physicalHolderTypes.add(xmlDataType.getPhysical()); - } + hasMultipleOutputs = true; + genericHolderTypes.add(genericParamTypes[i]); + Type firstActual = getFirstActualType( genericParamTypes[ i ] ); + if ( firstActual != null ) { + physicalHolderTypes.add((Class)firstActual); + xmlDataType.setPhysical( (Class)firstActual ); + mode = ParameterMode.INOUT; + } else { + physicalHolderTypes.add(xmlDataType.getPhysical()); + } } paramDataTypes.add( xmlDataType); operation.getParameterModes().add(mode); } - + // Get Output Types, but skip over void return type List outputDataTypes = new ArrayList(); - if (returnDataType != null) { + if (!operation.hasReturnTypeVoid()) { outputDataTypes.add(returnDataType); } @@ -314,7 +317,7 @@ private List getOperations(Class clazz, List faultDataTypes = new ArrayList(faultTypes.length); Type[] genericFaultTypes = method.getGenericExceptionTypes(); if( method.isAnnotationPresent(AsyncFault.class) ) { - genericFaultTypes = readAsyncGenericFaultTypes( method ); + genericFaultTypes = readAsyncGenericFaultTypes( method ); } // end if for (int i = 0; i < faultTypes.length; i++) { Class faultType = faultTypes[i]; @@ -326,17 +329,17 @@ private List getOperations(Class clazz, DataType faultDataType = new DataTypeImpl(UNKNOWN_DATABINDING, faultType, genericFaultTypes[i], xmlFaultType); faultDataTypes.add(new DataTypeImpl(UNKNOWN_DATABINDING, faultType, genericFaultTypes[i], - faultDataType)); + faultDataType)); } } DataType> inputType = new DataTypeImpl>(IDL_INPUT, Object[].class, paramDataTypes); DataType> outputType = - new DataTypeImpl>(IDL_OUTPUT, Object[].class, outputDataTypes); + new DataTypeImpl>(IDL_OUTPUT, Object[].class, outputDataTypes); operation.setOutputType(outputType); - + operation.setInputType(inputType); operation.setFaultTypes(faultDataTypes); operation.setNonBlocking(nonBlocking); @@ -346,42 +349,42 @@ private List getOperations(Class clazz, } return operations; } - - private Class[] getOutputTypes(Class returnType, Class[] parameterTypes) { - - ArrayList> returnTypes = new ArrayList>(); - returnTypes.add(returnType); - for ( Class clazz : parameterTypes ) { - if ( Holder.class == clazz ) - returnTypes.add(clazz); - } - Class[] arrayType = new Class[0]; - return returnTypes.toArray(arrayType); - } + private Class[] getOutputTypes(Class returnType, Class[] parameterTypes) { + ArrayList> returnTypes = new ArrayList>(); + returnTypes.add(returnType); + for ( Class clazz : parameterTypes ) { + if ( Holder.class == clazz ) + returnTypes.add(clazz); + } + Class[] arrayType = new Class[0]; + return returnTypes.toArray(arrayType); + } - /** + + + /** * Reads the fault types declared in an @AsyncFault annotation on an async server method * @param method - the Method * @return - an array of fault/exception classes */ private Class[] readAsyncFaultTypes( Method method ) { - AsyncFault theFaults = method.getAnnotation(AsyncFault.class); - if ( theFaults == null ) return null; - return theFaults.value(); + AsyncFault theFaults = method.getAnnotation(AsyncFault.class); + if ( theFaults == null ) return null; + return theFaults.value(); } // end method readAsyncFaultTypes - + /** * Reads the generic fault types declared in an @AsyncFault annotation on an async server method * @param method - the Method * @return - an array of fault/exception classes */ private Type[] readAsyncGenericFaultTypes( Method method ) { - AsyncFault theFaults = method.getAnnotation(AsyncFault.class); - if ( theFaults == null ) return null; - return theFaults.value(); + AsyncFault theFaults = method.getAnnotation(AsyncFault.class); + if ( theFaults == null ) return null; + return theFaults.value(); } // end method readAsyncFaultTypes private boolean jaxwsAsyncMethod(Method method) { @@ -399,7 +402,7 @@ private boolean jaxwsAsyncMethod(Method method) { } return false; } - + /** * Given a Class, returns T, otherwise null. diff --git a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaOperationImpl.java b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaOperationImpl.java index 7169cc164d..0aa0cfb3ee 100644 --- a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaOperationImpl.java +++ b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaOperationImpl.java @@ -34,7 +34,8 @@ public class JavaOperationImpl extends OperationImpl implements JavaOperation { private Method method; private String action; private boolean isAsyncServer = false; - + private boolean hasReturnTypeVoid = false; + public Method getJavaMethod() { return method; } @@ -97,4 +98,14 @@ public String toString() { return method == null ? "null" : method.toGenericString(); } + @Override + public boolean hasReturnTypeVoid() { + return hasReturnTypeVoid; + } + + @Override + public void setReturnTypeVoid(boolean flag) { + hasReturnTypeVoid = flag; + } + } From c8cd96c5c97ba1712cd30558914dd2ea809faf3c Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Tue, 25 Jan 2011 13:45:34 +0000 Subject: [PATCH 099/157] comment out the direct otest dependency as this pulls in two copies of Tuscany JARs and add in a line (commented out) to show how to debug surefire tests. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1063276 13f79535-47bb-0310-9956-ffa450edef68 --- testing/compliance-tests/java-caa/pom.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/testing/compliance-tests/java-caa/pom.xml b/testing/compliance-tests/java-caa/pom.xml index b5d4acb603..1251437645 100644 --- a/testing/compliance-tests/java-caa/pom.xml +++ b/testing/compliance-tests/java-caa/pom.xml @@ -30,13 +30,15 @@ - - + + + org.apache.tuscany.sca @@ -83,7 +85,11 @@ org.apache.maven.plugins maven-surefire-plugin + -Xms256m -Xmx1024m + From 9558d0aeed897626f9582deca1a3173d44e14b9a Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Tue, 25 Jan 2011 13:50:45 +0000 Subject: [PATCH 100/157] Delegate the creation of the response invoker if there is a delegate present. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1063280 13f79535-47bb-0310-9956-ffa450edef68 --- .../DelegatingSCAServiceBindingProvider.java | 32 ++++++++++++++++++- .../RuntimeSCAServiceBindingProvider.java | 6 +++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/DelegatingSCAServiceBindingProvider.java b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/DelegatingSCAServiceBindingProvider.java index ca90878633..ea888f4f8e 100644 --- a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/DelegatingSCAServiceBindingProvider.java +++ b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/DelegatingSCAServiceBindingProvider.java @@ -22,6 +22,9 @@ import java.util.logging.Logger; import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; +import org.apache.tuscany.sca.provider.EndpointAsyncProvider; +import org.apache.tuscany.sca.provider.EndpointProvider; import org.apache.tuscany.sca.provider.ServiceBindingProvider; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; @@ -31,7 +34,7 @@ * * @version $Rev$ $Date$ */ -public class DelegatingSCAServiceBindingProvider implements ServiceBindingProvider { +public class DelegatingSCAServiceBindingProvider implements EndpointAsyncProvider { private static final Logger logger = Logger.getLogger(DelegatingSCAServiceBindingProvider.class.getName()); @@ -49,13 +52,40 @@ public DelegatingSCAServiceBindingProvider(RuntimeEndpoint endpoint, SCABindingM } + @Override public InterfaceContract getBindingInterfaceContract() { return provider.getBindingInterfaceContract(); } + @Override public boolean supportsOneWayInvocation() { return provider.supportsOneWayInvocation(); } + + @Override + public void configure() { + if (provider instanceof EndpointProvider){ + ((EndpointProvider)provider).configure(); + } + } + + @Override + public boolean supportsNativeAsync() { + if (provider instanceof EndpointAsyncProvider){ + return ((EndpointAsyncProvider)provider).supportsNativeAsync(); + } else { + return false; + } + } + + @Override + public InvokerAsyncResponse createAsyncResponseInvoker() { + if (provider instanceof EndpointAsyncProvider){ + return ((EndpointAsyncProvider)provider).createAsyncResponseInvoker(); + } else { + return null; + } + } public void start() { if (started) { diff --git a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java index f5745f75e3..77a7e308dd 100644 --- a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java +++ b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java @@ -115,7 +115,11 @@ public boolean supportsNativeAsync() { } public InvokerAsyncResponse createAsyncResponseInvoker() { - return new SCABindingAsyncResponseInvoker(null, null); + if (distributedProvider != null) { + return ((EndpointAsyncProvider)distributedProvider).createAsyncResponseInvoker(); + } else { + return new SCABindingAsyncResponseInvoker(null, null); + } } /** From 9eff1f9c7b2792ae7791f3574a20186aab31b3d6 Mon Sep 17 00:00:00 2001 From: Scott Kurz Date: Wed, 26 Jan 2011 01:18:02 +0000 Subject: [PATCH 101/157] Fix more issues with multiple outputs. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1063548 13f79535-47bb-0310-9956-ffa450edef68 --- .../ws/wsdlgen/Interface2WSDLGenerator.java | 39 +++++------------- .../databinding/jaxb/JAXBContextHelper.java | 5 +-- .../sca/databinding/impl/MediatorImpl.java | 40 +++++++++---------- .../invocation/JavaImplementationInvoker.java | 9 ++--- .../jaxws/JAXWSJavaInterfaceProcessor.java | 19 ++++++--- .../impl/JavaInterfaceIntrospectorImpl.java | 27 +++---------- .../java/impl/JavaInterfaceUtil.java | 14 +++++++ 7 files changed, 68 insertions(+), 85 deletions(-) diff --git a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java b/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java index 542b9d556e..8d80898071 100644 --- a/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java +++ b/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java @@ -753,39 +753,22 @@ public Part generateWrapperPart(Definition definition, Method method = ((JavaOperation)operation).getJavaMethod(); /* - * Making this change, though not understanding: - * - * 1. Whether we can assume JAXWSJavaInterfaceProcessor was already used to process - * - * 2. What the purpose is of calling getElementInfo() when we already have an ElementInfo - * + * Making this change, though not understanding + * whether we can assume JAXWSJavaInterfaceProcessor was already used to process */ if (input) { - Class[] paramTypes = method.getParameterTypes(); - for (int i = 0, inputsSeen = 0; i < paramTypes.length; i++) { - ParameterMode mode = operation.getParameterModes().get(i); - if (!mode.equals(ParameterMode.OUT)) { - DataType dataType = operation.getInputType().getLogical().get(i); - elements.set(inputsSeen, getElementInfo(paramTypes[i], dataType, elements.get(inputsSeen).getQName(), helpers)); - inputsSeen++; - } + List inputDTs = operation.getInputType().getLogical(); + for (int i = 0; i < inputDTs.size(); i++) { + DataType nextInput = inputDTs.get(i); + elements.set(i, getElementInfo(nextInput.getPhysical(), nextInput, elements.get(i).getQName(), helpers)); } + } else { - int outputsSeen = 0; - Class returnType = method.getReturnType(); - if (returnType != Void.TYPE) { - DataType dataType = operation.getOutputType().getLogical().get(0); - elements.set(outputsSeen++, getElementInfo(returnType, dataType, elements.get(0).getQName(), helpers)); + List outputDTs = operation.getOutputType().getLogical(); + for (int i = 0; i < outputDTs.size(); i++) { + DataType nextOutput = outputDTs.get(i); + elements.set(i, getElementInfo(nextOutput.getPhysical(), nextOutput, elements.get(i).getQName(), helpers)); } - Class[] paramTypes = method.getParameterTypes(); - for (int i = 0; i < paramTypes.length; i++) { - ParameterMode mode = operation.getParameterModes().get(i); - if (!mode.equals(ParameterMode.IN)) { - DataType dataType = operation.getOutputType().getLogical().get(i); - elements.set(outputsSeen, getElementInfo(paramTypes[i], dataType, elements.get(outputsSeen).getQName(), helpers)); - outputsSeen++; - } - } } } return part; diff --git a/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java b/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java index 9fa9038006..f369b491e7 100644 --- a/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java +++ b/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java @@ -462,9 +462,8 @@ private static void getDataTypes(List dataTypes, Operation op, boolean { for (DataType dt1 : op.getInputType().getLogical()) { dataTypes.add(dt1); - } - DataType dt2 = op.getOutputType(); - if (dt2 != null) { + } + for (DataType dt2 : op.getOutputType().getLogical()) { dataTypes.add(dt2); } } diff --git a/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java b/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java index 6759edc992..0ba35866d9 100644 --- a/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java +++ b/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java @@ -559,30 +559,26 @@ public Object copyInput(Object input, Operation sourceOperation, Operation targe List inputTypesTarget = targetOperation == null ? null : targetOperation.getInputType().getLogical(); Object[] copy = new Object[data.length]; Map map = new IdentityHashMap(); - for (int i = 0, nextIndex = 0; i < inputTypes.size(); i++) { - // Account for OUT-only parameters. Would be more thorough to look at targetOperation - // and ensure it has the same parameter mode, but we'll let that go for now. - ParameterMode mode = sourceOperation.getParameterModes().get(i); - if (!mode.equals(ParameterMode.OUT)) { - Object arg = data[nextIndex]; - if (arg == null) { - copy[nextIndex] = null; + + // OUT-only parameters have already been filtered out of the inputTypes List. + for (int i = 0; i < inputTypes.size(); i++) { + Object arg = data[i]; + if (arg == null) { + copy[i] = null; + } else { + Object copiedArg = map.get(arg); + if (copiedArg != null) { + copy[i] = copiedArg; } else { - Object copiedArg = map.get(arg); - if (copiedArg != null) { - copy[nextIndex] = copiedArg; - } else { - copiedArg = - copy(arg, - inputTypes.get(i), - inputTypesTarget == null ? null : inputTypesTarget.get(i), - sourceOperation, - targetOperation); - map.put(arg, copiedArg); - copy[nextIndex] = copiedArg; - } + copiedArg = + copy(arg, + inputTypes.get(i), + inputTypesTarget == null ? null : inputTypesTarget.get(i), + sourceOperation, + targetOperation); + map.put(arg, copiedArg); + copy[i] = copiedArg; } - nextIndex++; } } return copy; diff --git a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java index ef325e4ae9..67bbe32c27 100644 --- a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java +++ b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java @@ -132,14 +132,13 @@ public Message invoke(Message msg) { // Holder pattern. Any payload parameters which are should be in holders are placed in Holder. // Only check Holder for remotable interfaces if (imethod != null && op.getInterface().isRemotable()) { - List inputTypes = op.getInputType().getLogical(); Object[] payloadArray = (Object[])payload; List payloadList = new ArrayList(); - for (int i = 0, nextIndex = 0; i < inputTypes.size(); i++) { - ParameterMode mode = op.getParameterModes().get(i); - if (ParameterMode.IN == mode ) { + int nextIndex = 0; + for (ParameterMode mode : op.getParameterModes()) { + if (mode.equals(ParameterMode.IN)) { payloadList.add(payloadArray[nextIndex++]); - } else if (ParameterMode.INOUT == mode ) { + } else if (mode.equals(ParameterMode.INOUT)) { // Promote array params from [] to [Holder] Object item = payloadArray[nextIndex++]; Holder itemHolder = new Holder(item); diff --git a/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java b/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java index 8e65cca7e6..57f2b9c3a1 100644 --- a/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java +++ b/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java @@ -186,11 +186,7 @@ public void visitInterface(JavaInterface contract) throws InvalidInterfaceExcept } ParameterMode mode = operation.getParameterModes().get(i); } - - // - // Note for BARE mapping this will NOT be WS-I compliant, but let's assume this is not the place to - // worry about non-compliance, and keep on going. - // + WebResult result = method.getAnnotation(WebResult.class); if (result != null) { String ns = getValue(result.targetNamespace(), tns); @@ -351,6 +347,19 @@ public DataType run() { operation.setWrapper(wrapperInfo); } + + // In both bare and wrapped cases, remove OUT-only parameters from input DataType. + // This is a key point then because it's the last time in which the number of parameters in + // Java matches the number of logical inputs. After this, things will be out of synch, for + // example the number of parameter modes won't match the number of inputs. + List parmModes = operation.getParameterModes(); + List inputDTs = operation.getInputType().getLogical(); + for (int i = parmModes.size() - 1; i>=0; i--) { + if (parmModes.get(i).equals(ParameterMode.OUT)) { + inputDTs.remove(i); + } + } + } } diff --git a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java index 0d1e832faf..1ffe9530b7 100644 --- a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java +++ b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java @@ -259,6 +259,8 @@ private List getOperations(Class clazz, JavaOperation operation = new JavaOperationImpl(); operation.setName(name); + // Given details of Holder mapping, it's easier to handle output first. + List outputDataTypes = new ArrayList(); XMLType xmlReturnType = new XMLType(new QName(ns, "return"), null); DataType returnDataType = null; if (returnType == void.class) { @@ -267,12 +269,11 @@ private List getOperations(Class clazz, returnDataType = new DataTypeImpl(UNKNOWN_DATABINDING, returnType, method.getGenericReturnType(), xmlReturnType); operation.setReturnTypeVoid(false); + outputDataTypes.add(returnDataType); } // Handle Input Types List paramDataTypes = new ArrayList(parameterTypes.length); - List genericHolderTypes = new ArrayList(); - List> physicalHolderTypes = new ArrayList>(); Type[] genericParamTypes = method.getGenericParameterTypes(); for (int i = 0; i < parameterTypes.length; i++) { Class paramType = parameterTypes[i]; @@ -284,35 +285,17 @@ private List getOperations(Class clazz, // Holder pattern. Physical types of Holder classes are updated to to aid in transformations. if ( Holder.class == paramType) { hasMultipleOutputs = true; - genericHolderTypes.add(genericParamTypes[i]); Type firstActual = getFirstActualType( genericParamTypes[ i ] ); if ( firstActual != null ) { - physicalHolderTypes.add((Class)firstActual); xmlDataType.setPhysical( (Class)firstActual ); mode = ParameterMode.INOUT; - } else { - physicalHolderTypes.add(xmlDataType.getPhysical()); - } + } + outputDataTypes.add(xmlDataType); } paramDataTypes.add( xmlDataType); operation.getParameterModes().add(mode); } - // Get Output Types, but skip over void return type - List outputDataTypes = new ArrayList(); - if (!operation.hasReturnTypeVoid()) { - outputDataTypes.add(returnDataType); - } - - // Start at 1, for the first holder, since we already accounted for the return type itself - for ( int i=1; i < allOutputTypes.length; i++ ) { - Class paramType = allOutputTypes[i]; - XMLType xmlOutputType = new XMLType(new QName(ns, "out" + i), null); - DataTypeImpl xmlDataType = xmlDataType = new DataTypeImpl( - UNKNOWN_DATABINDING, physicalHolderTypes.get(i-1), genericHolderTypes.get(i-1), xmlOutputType); - outputDataTypes.add(xmlDataType); - } - // Fault types List faultDataTypes = new ArrayList(faultTypes.length); Type[] genericFaultTypes = method.getGenericExceptionTypes(); diff --git a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtil.java b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtil.java index 352cffeef2..922772ab07 100644 --- a/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtil.java +++ b/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtil.java @@ -27,6 +27,7 @@ import org.apache.tuscany.sca.interfacedef.DataType; import org.apache.tuscany.sca.interfacedef.Interface; import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.interfacedef.ParameterMode; import org.apache.tuscany.sca.interfacedef.java.JavaInterface; import org.apache.tuscany.sca.interfacedef.java.JavaOperation; @@ -64,6 +65,17 @@ public static Method findMethod(Class implClass, Operation operation) throws } Interface interface1 = operation.getInterface(); int numParams = operation.getInputType().getLogical().size(); + + // Account for OUT-only in matching. (Should we cache this number in JavaOperation?) + List parmModes = operation.getParameterModes(); + int numOutOnlyHolders = 0; + for (ParameterMode mode : parmModes) { + if (mode.equals(ParameterMode.OUT)) { + numOutOnlyHolders++; + } + } + numParams += numOutOnlyHolders; + if (interface1 != null && interface1.isRemotable()) { List matchingMethods = new ArrayList(); for (Method m : implClass.getMethods()) { @@ -138,6 +150,7 @@ public static Method findAsyncServerMethod(Class implClass, JavaOperation ope /** * @Deprecated */ + //TODO - account for Holder(s) private static Class[] getPhysicalTypes(Operation operation) { DataType> inputType = operation.getInputType(); if (inputType == null) { @@ -178,6 +191,7 @@ public static Operation findOperation(Method method, Collection opera * * @return true if the operation matches, false if does not */ + //TODO - account for Holder(s) private static boolean match(Operation operation, Method method) { Class[] params = method.getParameterTypes(); DataType> inputType = operation.getInputType(); From 1ec1ec68bb8ccaebe4d13031bf234aaae0e5deaa Mon Sep 17 00:00:00 2001 From: Scott Kurz Date: Wed, 26 Jan 2011 01:23:44 +0000 Subject: [PATCH 102/157] Commit some more multiple output tests and un-ignore existing ones. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1063552 13f79535-47bb-0310-9956-ffa450edef68 --- .../example/orderservice/OrderService.java | 10 ++++++-- .../OrderServiceBareForwardImpl.java | 2 +- .../orderservice/OrderServiceBareImpl.java | 22 ++++++++++------ .../orderservice/OrderServiceForwardImpl.java | 6 +++++ .../orderservice/OrderServiceImpl.java | 7 ++++++ .../main/resources/ordersca.bare.composite | 5 ++++ .../OrderServiceBareTestCase.java | 7 ++++-- .../orderservice/OrderServiceTestCase.java | 25 +++++++++++++++---- 8 files changed, 66 insertions(+), 18 deletions(-) diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java index d738dd58fc..718be0b46d 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java @@ -46,11 +46,11 @@ public String[] reviewOrderTwoInOuts( public String[] reviewOrderTwoOutHolders( @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.OUT) Holder myData, - @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.OUT) + @WebParam(targetNamespace = "", mode = WebParam.Mode.OUT) Holder myOutParam); public String[] reviewOrderTwoInOutsThenIn( - @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT) + @WebParam(targetNamespace = "", mode = WebParam.Mode.INOUT) Holder myData, @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.INOUT) Holder myOutParam, @@ -62,5 +62,11 @@ public void reviewOrderTwoInOutsVoid( @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.INOUT) Holder myOutParam); + public String[] reviewOrderOutThenInOut( + @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.OUT) + Holder myOutParam, + @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT) + Holder myData); + } diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java index 644ee86652..7fe39da381 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java @@ -24,6 +24,6 @@ public void bareReviewOrderInOutHolder(Holder myData) { @Override public void bareReviewOrderOutHolder(Holder myData) { - ref.bareReviewOrderInOutHolder(myData); + ref.bareReviewOrderOutHolder(myData); } } diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java index fbf68fab7a..05b8538c2a 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java @@ -46,24 +46,30 @@ public Order bareReviewOrder(Order order) { @Override public void bareReviewOrderInOutHolder(Holder myData) { + String customerId = "cust1234"; double total = myData.value.getTotal(); - myData.value = new Order(); + Order newOrder = new Order(); + if ( total < 100.0 ) { - myData.value.setStatus( Status.APPROVED ); + newOrder.setStatus( Status.APPROVED ); } else if ( total > 1100.0 ) { - myData.value.setStatus( Status.REJECTED ); - } + newOrder.setStatus( Status.REJECTED ); + } + newOrder.setCustomerId(customerId); + myData.value = newOrder; } @Override public void bareReviewOrderOutHolder(Holder myData) { boolean holderEmpty = (myData.value == null ? true : false); - myData.value = new Order(); + Order newOrder = new Order(); + if (holderEmpty) { - myData.value.setStatus( Status.APPROVED ); - myData.value.setCustomerId("approved.1234"); + newOrder.setStatus( Status.APPROVED ); + newOrder.setCustomerId("approved.1234"); } else { - myData.value.setStatus( Status.REJECTED ); + newOrder.setStatus( Status.REJECTED ); } + myData.value = newOrder; } } diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java index 4c89fd59a7..9628963a5e 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java @@ -42,5 +42,11 @@ public void reviewOrderTwoInOutsVoid(Holder myData, Holder myOutPa ref.reviewOrderTwoInOutsVoid(myData, myOutParam); } + @Override + public String[] reviewOrderOutThenInOut(Holder myOutParam, Holder myData) { + String[] retVal = ref.reviewOrderOutThenInOut(myOutParam, myData); + return retVal; + } + } diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java index 46eb8a6307..8ec9a94248 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java @@ -155,4 +155,11 @@ public void reviewOrderTwoInOutsVoid(Holder myData, Holder myOutPa } myData.value = retOrder; } + + @Override + // Simply delegate to existing test method with parms reversed. + public String[] reviewOrderOutThenInOut(Holder myOutParam, Holder myData) { + String[] retVal = reviewOrder(myData, myOutParam); + return retVal; + } } diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite index ed8dbb1426..8a563666c8 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite @@ -26,7 +26,9 @@ + @@ -36,6 +38,9 @@ + + + diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java index 804455f055..75bada0174 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java @@ -38,7 +38,6 @@ /** * Tests that the order server responds. */ -@Ignore public class OrderServiceBareTestCase { private static Node node; @@ -57,6 +56,7 @@ public static void startServer() throws Exception { } @Test + @Ignore public void testOrderReviewBareApprovedSCA() throws IOException { OrderServiceBare orderServiceBare = node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare"); @@ -72,6 +72,7 @@ public void testOrderReviewBareApprovedWS() throws IOException { testOrderReviewApproved(orderServiceBare); } + @Ignore @Test public void testOrderReviewBareRejectedSCA() throws IOException { OrderServiceBare orderServiceBare = @@ -88,7 +89,7 @@ public void testOrderReviewBareRejectedWS() throws IOException { testOrderReviewRejected(orderServiceBare); } - + @Ignore @Test public void testOrderReviewInOutBareApprovedSCA() throws IOException { OrderServiceBare orderServiceBare = @@ -105,6 +106,7 @@ public void testOrderReviewInOutBareApprovedWS() throws IOException { testOrderReviewApprovedInOutHolder(orderServiceBare); } + @Ignore @Test public void testOrderReviewInOutBareRejectedSCA() throws IOException { OrderServiceBare orderServiceBare = @@ -121,6 +123,7 @@ public void testOrderReviewInOutBareRejectedWS() throws IOException { testOrderReviewRejectedInOutHolder(orderServiceBare); } + @Ignore @Test public void testOrderReviewBareOutHolderSCA() throws IOException { OrderServiceBare orderServiceBare = diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java index 0f6b858720..f762709a4c 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java @@ -196,7 +196,6 @@ public void testOrderReviewTwoInOutsThenInWS() throws IOException { testOrderReviewOrderTwoInOutsThenIn(orderService); } - @Ignore @Test public void testOrderReviewVoidApprovedSCA() throws IOException { OrderService orderService = @@ -205,7 +204,6 @@ public void testOrderReviewVoidApprovedSCA() throws IOException { testOrderReviewVoidApproved(orderService); } - @Ignore @Test public void testOrderReviewVoidApprovedWS() throws IOException { OrderService orderService = @@ -214,7 +212,6 @@ public void testOrderReviewVoidApprovedWS() throws IOException { testOrderReviewVoidApproved(orderService); } - @Ignore @Test public void testOrderReviewVoidRejectedSCA() throws IOException { OrderService orderService = @@ -223,7 +220,6 @@ public void testOrderReviewVoidRejectedSCA() throws IOException { testOrderReviewVoidRejected(orderService); } - @Ignore @Test public void testOrderReviewVoidRejectedWS() throws IOException { OrderService orderService = @@ -232,7 +228,26 @@ public void testOrderReviewVoidRejectedWS() throws IOException { testOrderReviewVoidRejected(orderService); } - + @Test + public void testOrderReviewOutThenInOutApprovedWS() throws IOException { + OrderService orderService = + node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService"); + assertNotNull(orderService); + Order order = new Order(); + order.setStatus( Status.CREATED ); + order.setCustomerId("cust1234"); + order.setTotal( 50.0 ); + System.out.println( ">>> Order submitted=" + order ); + Holder outParam = new Holder(new Float(57.4)); + Holder holder = new Holder( order ); + String[] returnValue = null; + returnValue = orderService.reviewOrderOutThenInOut(outParam, holder); + assertTrue( holder.value.getStatus() == Status.APPROVED ); + assertEquals("retval1", returnValue[0]); + assertEquals("retval2", returnValue[1]); + assertTrue(outParam.value.floatValue() == 97); + } + private void testOrderReviewApproved(OrderService orderService, Holder outParam) throws IOException { Order order = new Order(); From 274dca500b9b16fb9c746427fc2f8bc3665888c8 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 26 Jan 2011 09:57:50 +0000 Subject: [PATCH 103/157] Update to as much as possible only use dependencies in the maven central repo and for where thats not possible define the other repository in the module that uses it not the top level pom.xml git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1063664 13f79535-47bb-0310-9956-ffa450edef68 --- distribution/all/src/main/release/bin/LICENSE | 4 - modules/binding-ws-runtime-jaxws/pom.xml | 2 +- modules/databinding-jaxb-axiom/pom.xml | 2 +- modules/databinding-jaxb/pom.xml | 22 +-- modules/databinding-sdo/pom.xml | 19 -- modules/implementation-bpel-runtime/pom.xml | 15 ++ modules/interface-java-jaxws/pom.xml | 24 +-- modules/interface-wsdl/pom.xml | 15 -- modules/node-launcher-equinox/pom.xml | 55 ++++++ modules/osgi-runtime-pom/pom.xml | 6 + modules/xsd/pom.xml | 15 -- pom.xml | 181 ------------------ .../pom.xml | 13 +- .../dosgi-calculator-operations/pom.xml | 13 +- testing/itest/async-interactions/pom.xml | 2 +- testing/itest/async-services/pom.xml | 7 - .../itest/bpel/helloworld-reference/pom.xml | 2 +- testing/itest/bpel/helloworld/pom.xml | 2 +- .../itest/databindings/jaxb-bottom-up/pom.xml | 25 --- .../itest/databindings/jaxb-top-down/pom.xml | 25 --- .../ws-jaxws/contribution-java-first/pom.xml | 2 +- .../ws-jaxws/contribution-wsdl-first/pom.xml | 2 +- .../itest/ws-jaxws/external-client/pom.xml | 2 +- .../itest/ws-jaxws/external-service/pom.xml | 2 +- .../contribution-callback-forwardspec/pom.xml | 2 +- .../ws/contribution-callback-fullspec/pom.xml | 2 +- .../contribution-callback-promotion/pom.xml | 2 +- .../itest/ws/contribution-callback/pom.xml | 2 +- .../ws/contribution-doc-lit-wrapped/pom.xml | 2 +- testing/itest/ws/contribution-doc-lit/pom.xml | 2 +- .../itest/ws/contribution-java-first/pom.xml | 2 +- testing/itest/ws/contribution-rpc-lit/pom.xml | 2 +- .../itest/ws/contribution-wsdl-first/pom.xml | 2 +- testing/itest/ws/external-client/pom.xml | 16 +- testing/itest/ws/external-service/pom.xml | 2 +- 35 files changed, 136 insertions(+), 357 deletions(-) diff --git a/distribution/all/src/main/release/bin/LICENSE b/distribution/all/src/main/release/bin/LICENSE index cf291b9b80..e6ccd7b6cc 100644 --- a/distribution/all/src/main/release/bin/LICENSE +++ b/distribution/all/src/main/release/bin/LICENSE @@ -410,11 +410,7 @@ Tuscany SDO dependencies on Eclipse: common-2.2.3.jar xsd-2.2.3.jar runtime-3.4.0-v20080512.jar, - app-1.2.0-v20090520-1800.jar contenttype-3.3.0-v20080604-1400.jar - jobs-3.4.0-v20080512.jar - preferences-3.2.300-v20090520-1800.jar - registry-3.4.100-v20090520-1800.jar Eclipse Public License - v 1.0 diff --git a/modules/binding-ws-runtime-jaxws/pom.xml b/modules/binding-ws-runtime-jaxws/pom.xml index 129d1e4641..2241d67853 100644 --- a/modules/binding-ws-runtime-jaxws/pom.xml +++ b/modules/binding-ws-runtime-jaxws/pom.xml @@ -145,7 +145,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 --> + + + intalio.org + http://www.intalio.org/public/maven2 + + true + + + false + + + + org.apache.tuscany.sca diff --git a/modules/interface-java-jaxws/pom.xml b/modules/interface-java-jaxws/pom.xml index 87c099c741..4ce3b6bfc3 100644 --- a/modules/interface-java-jaxws/pom.xml +++ b/modules/interface-java-jaxws/pom.xml @@ -73,28 +73,6 @@ - - - java.net - java.net Maven 1.x Repository - http://download.java.net/maven/1 - legacy - - - java.net2 - java.net Maven 2.x Repository - http://download.java.net/maven/2 - - - - - - java.net2 - java.net Maven 2.x Repository - http://download.java.net/maven/2 - - - @@ -119,7 +97,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/modules/interface-wsdl/pom.xml b/modules/interface-wsdl/pom.xml index d6f17f03f6..5d025cd4bc 100644 --- a/modules/interface-wsdl/pom.xml +++ b/modules/interface-wsdl/pom.xml @@ -62,19 +62,4 @@ - - - - apache.ws.zone - Apache WS Zone Repository - http://ws.zones.apache.org/repository2 - - true - - - false - - - - diff --git a/modules/node-launcher-equinox/pom.xml b/modules/node-launcher-equinox/pom.xml index b31d1e6d9f..de19177f81 100644 --- a/modules/node-launcher-equinox/pom.xml +++ b/modules/node-launcher-equinox/pom.xml @@ -94,7 +94,62 @@ test + + org.eclipse.core + runtime + 3.4.0-v20080512 + runtime + + + org.eclipse.core + contenttype + + + org.eclipse.equinox + registry + + + org.eclipse.equinox + preferences + + + org.eclipse.core + jobs + + + org.eclipse.equinox + app + + + + + org.eclipse.core + contenttype + 3.3.0-v20080604-1400 + runtime + + + org.eclipse.equinox + registry + + + org.eclipse.equinox + preferences + + + + + + + + tuscany.repo + Tuscany Maven 2.x Repository + http://svn.apache.org/repos/asf/tuscany/maven + + + + diff --git a/modules/osgi-runtime-pom/pom.xml b/modules/osgi-runtime-pom/pom.xml index 36c3d401b8..176d05b2e5 100644 --- a/modules/osgi-runtime-pom/pom.xml +++ b/modules/osgi-runtime-pom/pom.xml @@ -60,6 +60,12 @@ ${pom.version} + + org.apache.tuscany.sca + tuscany-implementation-osgi-runtime + ${pom.version} + + diff --git a/modules/xsd/pom.xml b/modules/xsd/pom.xml index e9f6b78c2f..767bab3327 100644 --- a/modules/xsd/pom.xml +++ b/modules/xsd/pom.xml @@ -47,19 +47,4 @@ - - - - apache.ws.zone - Apache WS Zone Repository - http://ws.zones.apache.org/repository2 - - true - - - false - - - - diff --git a/pom.xml b/pom.xml index 3721d961b1..d75c87d1b4 100644 --- a/pom.xml +++ b/pom.xml @@ -61,38 +61,6 @@ - - maven.central - http://repo2.maven.org/maven2 - - true - - - false - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - true - - - false - - - - - apache.snapshots - Apache SNAPSHOT Repository - http://repository.apache.org/snapshots - - false - - - true - - tuscany.repo @@ -105,158 +73,9 @@ false - - - oasis.svn - http://tools.oasis-open.org/version-control/svn/sca-j/Release/ - - true - - - true - - - - - apache.ws.zone - Apache WS Zone Repository - http://ws.zones.apache.org/repository2 - - true - - - false - - - - indiana - http://ftp.ussg.iu.edu/eclipse/modeling/emf/emf/maven2/ - - true - - - false - - - - osuosl.org - http://ftp.osuosl.org/pub/eclipse/tools/emf/maven2 - - true - - - false - - - - - - intalio.org - http://www.intalio.org/public/maven2 - - true - - - false - - - - - - - false - - java.net - java.net Maven 1.x Repository - http://download.java.net/maven/1 - legacy - - - java.net2 - java.net Maven 2.x Repository - http://download.java.net/maven/2 - - false - - - - - - - - - apache - Apache Repository - http://people.apache.org/repo/m2-ibiblio-rsync-repository - - true - - - false - - - - - - apache.incubator - Apache Incubator Repository - http://people.apache.org/repo/m2-incubating-repository - - true - - - false - - - - - - apache.snapshots - Apache SNAPSHOT Repository - http://repository.apache.org/snapshots - - true - - - - - - - - - maven.central - Maven Central Repository - http://repo2.maven.org/maven2 - - true - - - false - - - - - java.net2 - java.net Maven 2.x Repository - http://download.java.net/maven/2 - - false - - - - diff --git a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/pom.xml b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/pom.xml index 3f06c2665f..1de7aff7a5 100644 --- a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/pom.xml +++ b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/pom.xml @@ -32,10 +32,21 @@ org.apache.tuscany.sca - tuscany-feature-all + tuscany-base-runtime-pom 2.0-SNAPSHOT pom + + org.apache.tuscany.sca + tuscany-osgi-runtime-pom + 2.0-SNAPSHOT + pom + + + org.apache.tuscany.sca + tuscany-binding-rmi-runtime + 2.0-SNAPSHOT + org.apache.tuscany.sca diff --git a/samples/learning-more/implementation-osgi/dosgi-calculator-operations/pom.xml b/samples/learning-more/implementation-osgi/dosgi-calculator-operations/pom.xml index 770a20b58f..8aee7b735d 100644 --- a/samples/learning-more/implementation-osgi/dosgi-calculator-operations/pom.xml +++ b/samples/learning-more/implementation-osgi/dosgi-calculator-operations/pom.xml @@ -32,10 +32,21 @@ org.apache.tuscany.sca - tuscany-feature-all + tuscany-base-runtime-pom 2.0-SNAPSHOT pom + + org.apache.tuscany.sca + tuscany-osgi-runtime-pom + 2.0-SNAPSHOT + pom + + + org.apache.tuscany.sca + tuscany-binding-rmi-runtime + 2.0-SNAPSHOT + org.apache.tuscany.sca diff --git a/testing/itest/async-interactions/pom.xml b/testing/itest/async-interactions/pom.xml index c61bf5dc7b..3de6afffc6 100644 --- a/testing/itest/async-interactions/pom.xml +++ b/testing/itest/async-interactions/pom.xml @@ -82,7 +82,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/async-services/pom.xml b/testing/itest/async-services/pom.xml index 0e5ac16fcb..f7e5463b6d 100644 --- a/testing/itest/async-services/pom.xml +++ b/testing/itest/async-services/pom.xml @@ -33,13 +33,6 @@ - - - org.oasis-open.sca.j - sca-caa-apis - 1.1-CD04 - - org.apache.tuscany.sca tuscany-base-runtime-pom diff --git a/testing/itest/bpel/helloworld-reference/pom.xml b/testing/itest/bpel/helloworld-reference/pom.xml index 75856a4c74..cc2ea3676f 100644 --- a/testing/itest/bpel/helloworld-reference/pom.xml +++ b/testing/itest/bpel/helloworld-reference/pom.xml @@ -189,7 +189,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml b/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml index 77c83f27c6..f43eadc3b5 100644 --- a/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml +++ b/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml @@ -77,7 +77,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws-jaxws/external-client/pom.xml b/testing/itest/ws-jaxws/external-client/pom.xml index 356fb26193..f005e9ec30 100644 --- a/testing/itest/ws-jaxws/external-client/pom.xml +++ b/testing/itest/ws-jaxws/external-client/pom.xml @@ -78,7 +78,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws-jaxws/external-service/pom.xml b/testing/itest/ws-jaxws/external-service/pom.xml index e64f40273f..6b705e9041 100644 --- a/testing/itest/ws-jaxws/external-service/pom.xml +++ b/testing/itest/ws-jaxws/external-service/pom.xml @@ -60,7 +60,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws/contribution-callback-forwardspec/pom.xml b/testing/itest/ws/contribution-callback-forwardspec/pom.xml index 7274efeb3c..a29f22c5e9 100644 --- a/testing/itest/ws/contribution-callback-forwardspec/pom.xml +++ b/testing/itest/ws/contribution-callback-forwardspec/pom.xml @@ -77,7 +77,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws/contribution-callback-fullspec/pom.xml b/testing/itest/ws/contribution-callback-fullspec/pom.xml index 57fbf5f5f9..f296cd301c 100644 --- a/testing/itest/ws/contribution-callback-fullspec/pom.xml +++ b/testing/itest/ws/contribution-callback-fullspec/pom.xml @@ -77,7 +77,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws/contribution-callback-promotion/pom.xml b/testing/itest/ws/contribution-callback-promotion/pom.xml index 4b1b4b5e77..4e36da2cf2 100644 --- a/testing/itest/ws/contribution-callback-promotion/pom.xml +++ b/testing/itest/ws/contribution-callback-promotion/pom.xml @@ -77,7 +77,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws/contribution-callback/pom.xml b/testing/itest/ws/contribution-callback/pom.xml index 5a1d0b9780..4ef6e1513b 100644 --- a/testing/itest/ws/contribution-callback/pom.xml +++ b/testing/itest/ws/contribution-callback/pom.xml @@ -77,7 +77,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml b/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml index bcf322afcc..6682e1486a 100644 --- a/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml +++ b/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml @@ -77,7 +77,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws/contribution-doc-lit/pom.xml b/testing/itest/ws/contribution-doc-lit/pom.xml index 8c800cae47..059a2c77fd 100644 --- a/testing/itest/ws/contribution-doc-lit/pom.xml +++ b/testing/itest/ws/contribution-doc-lit/pom.xml @@ -77,7 +77,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws/contribution-java-first/pom.xml b/testing/itest/ws/contribution-java-first/pom.xml index 0711bd3ca0..503d366e75 100644 --- a/testing/itest/ws/contribution-java-first/pom.xml +++ b/testing/itest/ws/contribution-java-first/pom.xml @@ -77,7 +77,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws/contribution-rpc-lit/pom.xml b/testing/itest/ws/contribution-rpc-lit/pom.xml index 3acc03c10f..5de77cd8f3 100644 --- a/testing/itest/ws/contribution-rpc-lit/pom.xml +++ b/testing/itest/ws/contribution-rpc-lit/pom.xml @@ -77,7 +77,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws/contribution-wsdl-first/pom.xml b/testing/itest/ws/contribution-wsdl-first/pom.xml index 8eb95dddef..054ea6fdad 100644 --- a/testing/itest/ws/contribution-wsdl-first/pom.xml +++ b/testing/itest/ws/contribution-wsdl-first/pom.xml @@ -77,7 +77,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws/external-client/pom.xml b/testing/itest/ws/external-client/pom.xml index 1a75336754..a62921603f 100644 --- a/testing/itest/ws/external-client/pom.xml +++ b/testing/itest/ws/external-client/pom.xml @@ -29,6 +29,20 @@ itest-ws-external-client Apache Tuscany SCA iTest WS External Client + + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + java.net2 + java.net Maven 2.x Repository + http://download.java.net/maven/2 + + + @@ -65,7 +79,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 diff --git a/testing/itest/ws/external-service/pom.xml b/testing/itest/ws/external-service/pom.xml index f789844419..0634b52345 100644 --- a/testing/itest/ws/external-service/pom.xml +++ b/testing/itest/ws/external-service/pom.xml @@ -60,7 +60,7 @@ org.codehaus.mojo jaxws-maven-plugin - 1.12 + 1.10 From f1d12557f2692d1eec6ca21f8197900418874421 Mon Sep 17 00:00:00 2001 From: Florian Moga Date: Thu, 27 Jan 2011 20:51:31 +0000 Subject: [PATCH 104/157] Modified poms for Maven 3 compliance. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1064296 13f79535-47bb-0310-9956-ffa450edef68 --- .../aggregations/base-runtime-nodep/pom.xml | 2 +- distribution/all/pom.xml | 30 +++++++++++++++++++ distribution/tomcat/pom.xml | 2 +- distribution/tomcat/tomcat-hook/pom.xml | 2 +- distribution/tomcat/tomcat-servlet/pom.xml | 2 +- distribution/tomcat/tomcat-war/pom.xml | 2 +- maven/archetypes/binding/pom.xml | 2 +- maven/archetypes/contribution-jar/pom.xml | 2 +- .../contribution-zip-discriptor/pom.xml | 2 +- maven/archetypes/contribution-zip/pom.xml | 2 +- maven/archetypes/pom.xml | 2 +- maven/archetypes/quickstart-bpel/pom.xml | 2 +- maven/archetypes/quickstart-jsf/pom.xml | 2 +- maven/archetypes/quickstart-stripes/pom.xml | 2 +- maven/archetypes/quickstart/pom.xml | 2 +- .../maven-osgi-junit/calculator-osgi/pom.xml | 2 +- .../calculator-rest-osgi/pom.xml | 2 +- .../running-tuscany/maven-osgi-junit/pom.xml | 2 +- testing/itest/base/dependencies/pom.xml | 2 +- testing/itest/bpel/helloworld/pom.xml | 2 +- .../itest/databindings/jaxb-bottom-up/pom.xml | 10 ++++++- .../itest/databindings/jaxb-top-down/pom.xml | 10 ++++++- testing/itest/import-export/exports/pom.xml | 2 +- testing/itest/import-export/imports/pom.xml | 2 +- testing/itest/import-export/tests/pom.xml | 2 +- .../itest/nodes/binding-sca-hazelcast/pom.xml | 2 +- testing/itest/nodes/helloworld-client/pom.xml | 2 +- testing/itest/nodes/helloworld-iface/pom.xml | 2 +- .../helloworld-service-and-client/pom.xml | 2 +- .../itest/nodes/helloworld-service/pom.xml | 2 +- .../nodes/one-jvm-hazelcast-client/pom.xml | 2 +- testing/itest/nodes/one-jvm-hazelcast/pom.xml | 2 +- testing/itest/nodes/one-jvm-tribes/pom.xml | 2 +- testing/itest/nodes/one-jvm/pom.xml | 2 +- testing/itest/nodes/one-node-test/pom.xml | 2 +- testing/itest/policy/matching/pom.xml | 2 +- testing/itest/policy/wspolicy/pom.xml | 2 +- .../ws-jaxws/contribution-java-first/pom.xml | 2 +- .../ws-jaxws/contribution-wsdl-first/pom.xml | 2 +- .../itest/ws-jaxws/external-client/pom.xml | 2 +- .../itest/ws-jaxws/external-service/pom.xml | 2 +- testing/itest/ws-jaxws/launcher-ri/pom.xml | 2 +- testing/itest/ws/authentication-basic/pom.xml | 2 +- .../contribution-callback-forwardspec/pom.xml | 2 +- .../ws/contribution-callback-fullspec/pom.xml | 2 +- .../contribution-callback-promotion/pom.xml | 2 +- .../itest/ws/contribution-callback/pom.xml | 2 +- .../ws/contribution-doc-lit-wrapped/pom.xml | 2 +- testing/itest/ws/contribution-doc-lit/pom.xml | 2 +- .../itest/ws/contribution-java-first/pom.xml | 2 +- testing/itest/ws/contribution-rpc-lit/pom.xml | 2 +- .../itest/ws/contribution-wsdl-first/pom.xml | 2 +- testing/itest/ws/defaults/pom.xml | 2 +- testing/itest/ws/endpoint-references/pom.xml | 2 +- testing/itest/ws/endpoints/pom.xml | 2 +- testing/itest/ws/external-client/pom.xml | 10 ++----- testing/itest/ws/external-service/pom.xml | 2 +- .../pom.xml | 2 +- testing/itest/ws/http-ssl/pom.xml | 2 +- testing/itest/ws/launcher-axis2/pom.xml | 2 +- testing/itest/ws/wsdl/pom.xml | 2 +- 61 files changed, 107 insertions(+), 67 deletions(-) diff --git a/distribution/aggregations/base-runtime-nodep/pom.xml b/distribution/aggregations/base-runtime-nodep/pom.xml index 9c611984d8..1765df5bea 100644 --- a/distribution/aggregations/base-runtime-nodep/pom.xml +++ b/distribution/aggregations/base-runtime-nodep/pom.xml @@ -23,7 +23,7 @@ org.apache.tuscany.sca tuscany-distribution 2.0-SNAPSHOT - ../pom.xml + ../../pom.xml org.apache.tuscany.sca diff --git a/distribution/all/pom.xml b/distribution/all/pom.xml index 97a0e8fed9..92801a9a3c 100644 --- a/distribution/all/pom.xml +++ b/distribution/all/pom.xml @@ -30,6 +30,36 @@ Apache Tuscany SCA All-in-one Distribution pom + + + java.net2 + java.net Maven 2.x Repository + http://download.java.net/maven/2 + + + intalio.org + http://www.intalio.org/public/maven2 + + true + + + false + + + + openejb-repository + OpenEJB Repository + http://svn.apache.org/repos/asf/openejb/repo + default + + false + + + true + + + + diff --git a/distribution/tomcat/pom.xml b/distribution/tomcat/pom.xml index 7164f45ac7..8a05b0372e 100644 --- a/distribution/tomcat/pom.xml +++ b/distribution/tomcat/pom.xml @@ -22,7 +22,7 @@ org.apache.tuscany.sca tuscany-sca - ../pom.xml + ../../pom.xml 2.0-SNAPSHOT org.apache.tuscany.sca diff --git a/distribution/tomcat/tomcat-hook/pom.xml b/distribution/tomcat/tomcat-hook/pom.xml index 8b792960ad..592a3848c3 100644 --- a/distribution/tomcat/tomcat-hook/pom.xml +++ b/distribution/tomcat/tomcat-hook/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-modules + tuscany-distribution-tomcat 2.0-SNAPSHOT ../pom.xml diff --git a/distribution/tomcat/tomcat-servlet/pom.xml b/distribution/tomcat/tomcat-servlet/pom.xml index 83b68dad0c..560703da0c 100644 --- a/distribution/tomcat/tomcat-servlet/pom.xml +++ b/distribution/tomcat/tomcat-servlet/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-modules + tuscany-distribution-tomcat 2.0-SNAPSHOT ../pom.xml diff --git a/distribution/tomcat/tomcat-war/pom.xml b/distribution/tomcat/tomcat-war/pom.xml index 9491507338..3f37559e87 100644 --- a/distribution/tomcat/tomcat-war/pom.xml +++ b/distribution/tomcat/tomcat-war/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-distribution + tuscany-distribution-tomcat 2.0-SNAPSHOT ../pom.xml diff --git a/maven/archetypes/binding/pom.xml b/maven/archetypes/binding/pom.xml index 7f38f83b6c..d406d857d6 100644 --- a/maven/archetypes/binding/pom.xml +++ b/maven/archetypes/binding/pom.xml @@ -23,7 +23,7 @@ org.apache.tuscany.sca tuscany-sca 2.0-SNAPSHOT - ../../pom.xml + ../../../pom.xml tuscany-binding-archetype diff --git a/maven/archetypes/contribution-jar/pom.xml b/maven/archetypes/contribution-jar/pom.xml index 0b568cb425..9e9a4f9c75 100644 --- a/maven/archetypes/contribution-jar/pom.xml +++ b/maven/archetypes/contribution-jar/pom.xml @@ -23,7 +23,7 @@ org.apache.tuscany.sca tuscany-sca 2.0-SNAPSHOT - ../../pom.xml + ../../../pom.xml tuscany-contribution-jar diff --git a/maven/archetypes/contribution-zip-discriptor/pom.xml b/maven/archetypes/contribution-zip-discriptor/pom.xml index c3a1f9bb5f..f1bbe79e2f 100644 --- a/maven/archetypes/contribution-zip-discriptor/pom.xml +++ b/maven/archetypes/contribution-zip-discriptor/pom.xml @@ -23,7 +23,7 @@ org.apache.tuscany.sca tuscany-sca 2.0-SNAPSHOT - ../../pom.xml + ../../../pom.xml tuscany-zip-contribution-descriptor diff --git a/maven/archetypes/contribution-zip/pom.xml b/maven/archetypes/contribution-zip/pom.xml index 012bac379f..64a67cd009 100644 --- a/maven/archetypes/contribution-zip/pom.xml +++ b/maven/archetypes/contribution-zip/pom.xml @@ -23,7 +23,7 @@ org.apache.tuscany.sca tuscany-sca 2.0-SNAPSHOT - ../../pom.xml + ../../../pom.xml tuscany-contribution-zip diff --git a/maven/archetypes/pom.xml b/maven/archetypes/pom.xml index 0fcd66a6fb..10d498ad1b 100644 --- a/maven/archetypes/pom.xml +++ b/maven/archetypes/pom.xml @@ -23,7 +23,7 @@ org.apache.tuscany.sca tuscany-sca 2.0-SNAPSHOT - ../pom.xml + ../../pom.xml tuscany-archetype pom diff --git a/maven/archetypes/quickstart-bpel/pom.xml b/maven/archetypes/quickstart-bpel/pom.xml index f2821d98bd..78bcb91dc8 100644 --- a/maven/archetypes/quickstart-bpel/pom.xml +++ b/maven/archetypes/quickstart-bpel/pom.xml @@ -23,7 +23,7 @@ org.apache.tuscany.sca tuscany-sca 2.0-SNAPSHOT - ../../pom.xml + ../../../pom.xml tuscany-quickstart-bpel diff --git a/maven/archetypes/quickstart-jsf/pom.xml b/maven/archetypes/quickstart-jsf/pom.xml index 09436e86ab..ec01b5effa 100644 --- a/maven/archetypes/quickstart-jsf/pom.xml +++ b/maven/archetypes/quickstart-jsf/pom.xml @@ -23,7 +23,7 @@ org.apache.tuscany.sca tuscany-sca 2.0-SNAPSHOT - ../../pom.xml + ../../../pom.xml tuscany-quickstart-jsf diff --git a/maven/archetypes/quickstart-stripes/pom.xml b/maven/archetypes/quickstart-stripes/pom.xml index 635333eb31..bfa288cdee 100644 --- a/maven/archetypes/quickstart-stripes/pom.xml +++ b/maven/archetypes/quickstart-stripes/pom.xml @@ -23,7 +23,7 @@ org.apache.tuscany.sca tuscany-sca 2.0-SNAPSHOT - ../../pom.xml + ../../../pom.xml tuscany-quickstart-stripes diff --git a/maven/archetypes/quickstart/pom.xml b/maven/archetypes/quickstart/pom.xml index 0ad98af2f3..629003b13e 100644 --- a/maven/archetypes/quickstart/pom.xml +++ b/maven/archetypes/quickstart/pom.xml @@ -23,7 +23,7 @@ org.apache.tuscany.sca tuscany-sca 2.0-SNAPSHOT - ../../pom.xml + ../../../pom.xml tuscany-quickstart diff --git a/samples/running-tuscany/maven-osgi-junit/calculator-osgi/pom.xml b/samples/running-tuscany/maven-osgi-junit/calculator-osgi/pom.xml index 924d9f7c3b..d4e149f5a6 100644 --- a/samples/running-tuscany/maven-osgi-junit/calculator-osgi/pom.xml +++ b/samples/running-tuscany/maven-osgi-junit/calculator-osgi/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples + sample-maven-osgi-junit 2.0-SNAPSHOT ../pom.xml diff --git a/samples/running-tuscany/maven-osgi-junit/calculator-rest-osgi/pom.xml b/samples/running-tuscany/maven-osgi-junit/calculator-rest-osgi/pom.xml index b13e4fc678..99af50b3eb 100644 --- a/samples/running-tuscany/maven-osgi-junit/calculator-rest-osgi/pom.xml +++ b/samples/running-tuscany/maven-osgi-junit/calculator-rest-osgi/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples + sample-maven-osgi-junit 2.0-SNAPSHOT ../pom.xml diff --git a/samples/running-tuscany/maven-osgi-junit/pom.xml b/samples/running-tuscany/maven-osgi-junit/pom.xml index b2e096c145..e6d8631cb3 100644 --- a/samples/running-tuscany/maven-osgi-junit/pom.xml +++ b/samples/running-tuscany/maven-osgi-junit/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples + tuscany-samples-running-tuscany 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/base/dependencies/pom.xml b/testing/itest/base/dependencies/pom.xml index fd2e5cee31..1d69f8540b 100644 --- a/testing/itest/base/dependencies/pom.xml +++ b/testing/itest/base/dependencies/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-base 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/bpel/helloworld/pom.xml b/testing/itest/bpel/helloworld/pom.xml index 182e561704..ad5b69ec69 100644 --- a/testing/itest/bpel/helloworld/pom.xml +++ b/testing/itest/bpel/helloworld/pom.xml @@ -23,7 +23,7 @@ org.apache.tuscany.sca itest-bpel 2.0-SNAPSHOT - ../../pom.xml + ../pom.xml itest-bpel-helloworld Apache Tuscany SCA iTest BPEL HelloWorld diff --git a/testing/itest/databindings/jaxb-bottom-up/pom.xml b/testing/itest/databindings/jaxb-bottom-up/pom.xml index 20310a0f1c..012eccaacf 100644 --- a/testing/itest/databindings/jaxb-bottom-up/pom.xml +++ b/testing/itest/databindings/jaxb-bottom-up/pom.xml @@ -31,6 +31,14 @@ 2.0-SNAPSHOT Apache Tuscany SCA iTest Databinding - JAXB Bottom Up + + + java.net2 + java.net Maven 2.x Repository + http://download.java.net/maven/2 + + + org.apache.tuscany.sca @@ -54,7 +62,7 @@ com.sun.xml.ws jaxws-rt - 2.1.3 + 2.2.1 diff --git a/testing/itest/databindings/jaxb-top-down/pom.xml b/testing/itest/databindings/jaxb-top-down/pom.xml index 9bfb2f74b2..8578951712 100644 --- a/testing/itest/databindings/jaxb-top-down/pom.xml +++ b/testing/itest/databindings/jaxb-top-down/pom.xml @@ -32,6 +32,14 @@ 2.0-SNAPSHOT Apache Tuscany SCA iTest Databinding - JAXB Top Down + + + java.net2 + java.net Maven 2.x Repository + http://download.java.net/maven/2 + + + org.apache.tuscany.sca @@ -55,7 +63,7 @@ com.sun.xml.ws jaxws-rt - 2.1.3 + 2.2.1 diff --git a/testing/itest/import-export/exports/pom.xml b/testing/itest/import-export/exports/pom.xml index e83be7145f..22f7070bce 100644 --- a/testing/itest/import-export/exports/pom.xml +++ b/testing/itest/import-export/exports/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-import-export 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/import-export/imports/pom.xml b/testing/itest/import-export/imports/pom.xml index 73da8052b5..83abd2f3a6 100644 --- a/testing/itest/import-export/imports/pom.xml +++ b/testing/itest/import-export/imports/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-import-export 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/import-export/tests/pom.xml b/testing/itest/import-export/tests/pom.xml index e6f96c6bbc..4d33c78765 100644 --- a/testing/itest/import-export/tests/pom.xml +++ b/testing/itest/import-export/tests/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-import-export 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/nodes/binding-sca-hazelcast/pom.xml b/testing/itest/nodes/binding-sca-hazelcast/pom.xml index 31bff9a388..4107ef2b41 100644 --- a/testing/itest/nodes/binding-sca-hazelcast/pom.xml +++ b/testing/itest/nodes/binding-sca-hazelcast/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-nodes 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/nodes/helloworld-client/pom.xml b/testing/itest/nodes/helloworld-client/pom.xml index 8367550f5a..a74826b11b 100644 --- a/testing/itest/nodes/helloworld-client/pom.xml +++ b/testing/itest/nodes/helloworld-client/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-nodes 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/nodes/helloworld-iface/pom.xml b/testing/itest/nodes/helloworld-iface/pom.xml index 87b6a4fc51..bd081db9b6 100644 --- a/testing/itest/nodes/helloworld-iface/pom.xml +++ b/testing/itest/nodes/helloworld-iface/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-nodes 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/nodes/helloworld-service-and-client/pom.xml b/testing/itest/nodes/helloworld-service-and-client/pom.xml index 862475b534..edf7c25e8c 100644 --- a/testing/itest/nodes/helloworld-service-and-client/pom.xml +++ b/testing/itest/nodes/helloworld-service-and-client/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-nodes 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/nodes/helloworld-service/pom.xml b/testing/itest/nodes/helloworld-service/pom.xml index e5e84571cd..4d74565f7b 100644 --- a/testing/itest/nodes/helloworld-service/pom.xml +++ b/testing/itest/nodes/helloworld-service/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-nodes 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml b/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml index 2eb8acfbaa..e6c235406f 100644 --- a/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml +++ b/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-nodes 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/nodes/one-jvm-hazelcast/pom.xml b/testing/itest/nodes/one-jvm-hazelcast/pom.xml index 49d18bf3b4..b2dbc8bea1 100644 --- a/testing/itest/nodes/one-jvm-hazelcast/pom.xml +++ b/testing/itest/nodes/one-jvm-hazelcast/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-nodes 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/nodes/one-jvm-tribes/pom.xml b/testing/itest/nodes/one-jvm-tribes/pom.xml index ff52b60103..f222b4ec6e 100644 --- a/testing/itest/nodes/one-jvm-tribes/pom.xml +++ b/testing/itest/nodes/one-jvm-tribes/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-nodes 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/nodes/one-jvm/pom.xml b/testing/itest/nodes/one-jvm/pom.xml index 1edbfc3b99..156d92b29d 100644 --- a/testing/itest/nodes/one-jvm/pom.xml +++ b/testing/itest/nodes/one-jvm/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-nodes 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/nodes/one-node-test/pom.xml b/testing/itest/nodes/one-node-test/pom.xml index d35761bc88..c4a98a8ca2 100644 --- a/testing/itest/nodes/one-node-test/pom.xml +++ b/testing/itest/nodes/one-node-test/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-nodes 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/policy/matching/pom.xml b/testing/itest/policy/matching/pom.xml index 7ef3edbb77..318942d21f 100644 --- a/testing/itest/policy/matching/pom.xml +++ b/testing/itest/policy/matching/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-policy 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/policy/wspolicy/pom.xml b/testing/itest/policy/wspolicy/pom.xml index d6f692d00f..73526d0200 100644 --- a/testing/itest/policy/wspolicy/pom.xml +++ b/testing/itest/policy/wspolicy/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-policy 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws-jaxws/contribution-java-first/pom.xml b/testing/itest/ws-jaxws/contribution-java-first/pom.xml index e9a3602f5d..05be037e27 100644 --- a/testing/itest/ws-jaxws/contribution-java-first/pom.xml +++ b/testing/itest/ws-jaxws/contribution-java-first/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws-jaxws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml b/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml index f43eadc3b5..7fa5daf66e 100644 --- a/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml +++ b/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws-jaxws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws-jaxws/external-client/pom.xml b/testing/itest/ws-jaxws/external-client/pom.xml index f005e9ec30..915b17e1fe 100644 --- a/testing/itest/ws-jaxws/external-client/pom.xml +++ b/testing/itest/ws-jaxws/external-client/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws-jaxws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws-jaxws/external-service/pom.xml b/testing/itest/ws-jaxws/external-service/pom.xml index 6b705e9041..d00b8168d2 100644 --- a/testing/itest/ws-jaxws/external-service/pom.xml +++ b/testing/itest/ws-jaxws/external-service/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws-jaxws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws-jaxws/launcher-ri/pom.xml b/testing/itest/ws-jaxws/launcher-ri/pom.xml index c8e7ca8fbf..2ed9ff1742 100644 --- a/testing/itest/ws-jaxws/launcher-ri/pom.xml +++ b/testing/itest/ws-jaxws/launcher-ri/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws-jaxws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/authentication-basic/pom.xml b/testing/itest/ws/authentication-basic/pom.xml index 277648687d..dbf22ae810 100644 --- a/testing/itest/ws/authentication-basic/pom.xml +++ b/testing/itest/ws/authentication-basic/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/contribution-callback-forwardspec/pom.xml b/testing/itest/ws/contribution-callback-forwardspec/pom.xml index a29f22c5e9..ad26d7cac5 100644 --- a/testing/itest/ws/contribution-callback-forwardspec/pom.xml +++ b/testing/itest/ws/contribution-callback-forwardspec/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/contribution-callback-fullspec/pom.xml b/testing/itest/ws/contribution-callback-fullspec/pom.xml index f296cd301c..24c4982f6b 100644 --- a/testing/itest/ws/contribution-callback-fullspec/pom.xml +++ b/testing/itest/ws/contribution-callback-fullspec/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/contribution-callback-promotion/pom.xml b/testing/itest/ws/contribution-callback-promotion/pom.xml index 4e36da2cf2..3e4afac711 100644 --- a/testing/itest/ws/contribution-callback-promotion/pom.xml +++ b/testing/itest/ws/contribution-callback-promotion/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/contribution-callback/pom.xml b/testing/itest/ws/contribution-callback/pom.xml index 4ef6e1513b..44e9465e3b 100644 --- a/testing/itest/ws/contribution-callback/pom.xml +++ b/testing/itest/ws/contribution-callback/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml b/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml index 6682e1486a..fd0d1aa7ee 100644 --- a/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml +++ b/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/contribution-doc-lit/pom.xml b/testing/itest/ws/contribution-doc-lit/pom.xml index 059a2c77fd..681230b82a 100644 --- a/testing/itest/ws/contribution-doc-lit/pom.xml +++ b/testing/itest/ws/contribution-doc-lit/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/contribution-java-first/pom.xml b/testing/itest/ws/contribution-java-first/pom.xml index 503d366e75..ee9ebe2dd2 100644 --- a/testing/itest/ws/contribution-java-first/pom.xml +++ b/testing/itest/ws/contribution-java-first/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/contribution-rpc-lit/pom.xml b/testing/itest/ws/contribution-rpc-lit/pom.xml index 5de77cd8f3..ca6a18d3d4 100644 --- a/testing/itest/ws/contribution-rpc-lit/pom.xml +++ b/testing/itest/ws/contribution-rpc-lit/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/contribution-wsdl-first/pom.xml b/testing/itest/ws/contribution-wsdl-first/pom.xml index 054ea6fdad..5d56c5cae3 100644 --- a/testing/itest/ws/contribution-wsdl-first/pom.xml +++ b/testing/itest/ws/contribution-wsdl-first/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/defaults/pom.xml b/testing/itest/ws/defaults/pom.xml index 5ee464b519..fc9c228371 100644 --- a/testing/itest/ws/defaults/pom.xml +++ b/testing/itest/ws/defaults/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/endpoint-references/pom.xml b/testing/itest/ws/endpoint-references/pom.xml index 09dc74a4fa..095a20f797 100644 --- a/testing/itest/ws/endpoint-references/pom.xml +++ b/testing/itest/ws/endpoint-references/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/endpoints/pom.xml b/testing/itest/ws/endpoints/pom.xml index 16aaf26e46..d2c922e8aa 100644 --- a/testing/itest/ws/endpoints/pom.xml +++ b/testing/itest/ws/endpoints/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/external-client/pom.xml b/testing/itest/ws/external-client/pom.xml index a62921603f..5fad448463 100644 --- a/testing/itest/ws/external-client/pom.xml +++ b/testing/itest/ws/external-client/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml @@ -30,12 +30,6 @@ Apache Tuscany SCA iTest WS External Client - - java.net - java.net Maven 1.x Repository - http://download.java.net/maven/1 - legacy - java.net2 java.net Maven 2.x Repository @@ -48,7 +42,7 @@ com.sun.xml.ws jaxws-rt - 2.1.7 + 2.2.1 diff --git a/testing/itest/ws/external-service/pom.xml b/testing/itest/ws/external-service/pom.xml index 0634b52345..cf161681ba 100644 --- a/testing/itest/ws/external-service/pom.xml +++ b/testing/itest/ws/external-service/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml b/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml index 0c240d9096..e26b81edfb 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/http-ssl/pom.xml b/testing/itest/ws/http-ssl/pom.xml index 8aae935732..0fd407ec66 100644 --- a/testing/itest/ws/http-ssl/pom.xml +++ b/testing/itest/ws/http-ssl/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/launcher-axis2/pom.xml b/testing/itest/ws/launcher-axis2/pom.xml index 6689781d26..9458ba7f0b 100644 --- a/testing/itest/ws/launcher-axis2/pom.xml +++ b/testing/itest/ws/launcher-axis2/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml diff --git a/testing/itest/ws/wsdl/pom.xml b/testing/itest/ws/wsdl/pom.xml index 72375853e3..75ce482a4b 100644 --- a/testing/itest/ws/wsdl/pom.xml +++ b/testing/itest/ws/wsdl/pom.xml @@ -21,7 +21,7 @@ 4.0.0 org.apache.tuscany.sca - tuscany-itest + itest-ws 2.0-SNAPSHOT ../pom.xml From cd761447eb9f3887ffc6c78fc9506336758ae288 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Fri, 28 Jan 2011 14:32:46 +0000 Subject: [PATCH 105/157] Add missing license headers git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1064697 13f79535-47bb-0310-9956-ffa450edef68 --- .../invocation/JDKAsyncResponseInvoker.java | 18 ++++++++++++++++++ .../JavaAsyncResponseInvokerImpl.java | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKAsyncResponseInvoker.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKAsyncResponseInvoker.java index 3dc40e8d67..ad797b68b0 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKAsyncResponseInvoker.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKAsyncResponseInvoker.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.tuscany.sca.core.invocation; import org.apache.tuscany.sca.invocation.InvokerAsyncResponse; diff --git a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncResponseInvokerImpl.java b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncResponseInvokerImpl.java index e7db583edd..0bddda6965 100644 --- a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncResponseInvokerImpl.java +++ b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncResponseInvokerImpl.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.tuscany.sca.implementation.java.invocation; import java.util.concurrent.ConcurrentHashMap; From 21cd23c8bf3a00e3c18fe6188911d18ca607047d Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Fri, 28 Jan 2011 14:37:04 +0000 Subject: [PATCH 106/157] Add misisnglicense headers git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1064701 13f79535-47bb-0310-9956-ffa450edef68 --- .../OrderServiceBareForwardImpl.java | 18 ++++++++++++++++++ .../orderservice/OrderServiceForwardImpl.java | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java index 7fe39da381..31af9e19f9 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java @@ -1,3 +1,21 @@ +/* + * 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.example.orderservice; import javax.xml.ws.Holder; diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java index 9628963a5e..d14269fde2 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java @@ -1,3 +1,21 @@ +/* + * 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.example.orderservice; import javax.xml.ws.Holder; From 98f16b9bec82d19c5b4505df80efbcbf1dbd2d19 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Fri, 28 Jan 2011 14:37:48 +0000 Subject: [PATCH 107/157] Update RAT excludes git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1064703 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/distribution/src-distro-rat/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/itest/distribution/src-distro-rat/pom.xml b/testing/itest/distribution/src-distro-rat/pom.xml index b57c11fc7f..7c886e87d1 100644 --- a/testing/itest/distribution/src-distro-rat/pom.xml +++ b/testing/itest/distribution/src-distro-rat/pom.xml @@ -77,7 +77,7 @@ tuscany-sca-2.0-SNAPSHOT-src/modules/assembly-xsd/**/*.* tuscany-sca-2.0-SNAPSHOT-src/modules/sca-api/**/*.* tuscany-sca-2.0-SNAPSHOT-src/modules/implementation-web-runtime/src/main/resources/META-INF/sca.tld - tuscany-sca-2.0-SNAPSHOT-src/modules/assembly-xml/src/main/resources/META-INF/sca-policy-1.1-intents-definitions-cd03.xml + tuscany-sca-2.0-SNAPSHOT-src/modules/assembly-xml/src/main/resources/META-INF/sca-policy-1.1-intents-definitions-cd04.xml tuscany-sca-2.0-SNAPSHOT-src/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryFinderImpl.java tuscany-sca-2.0-SNAPSHOT-src/modules/binding-comet-runtime/src/main/resources/jquery.json-2.2.min.js tuscany-sca-2.0-SNAPSHOT-src/modules/implementation-python-runtime/src/main/resources/django/utils/simplejson/* From 6919d3a7d856990066e8935501818181f91e01a6 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Tue, 1 Feb 2011 11:21:35 +0000 Subject: [PATCH 108/157] Add quiet logging constant git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1066000 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/runtime/RuntimeProperties.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeProperties.java b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeProperties.java index c413276b37..0e02d2cd94 100644 --- a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeProperties.java +++ b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeProperties.java @@ -26,6 +26,12 @@ * */ public interface RuntimeProperties { + + /** + * When true log with Level.FINE instead of Level.INFO + */ + public static final String QUIET_LOGGING = "org.apache.tuscany.sca.quietLogging"; + Properties getProperties(); void setProperties(Properties properties); } From 1c58db7128bfe170fa94a6e2ce3e9397d2138381 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Tue, 1 Feb 2011 11:56:55 +0000 Subject: [PATCH 109/157] Start quiet logging updates by changing endpoint registry logging. Seems a little long winded so maybe need to find somethinf simpler git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1066015 13f79535-47bb-0310-9956-ffa450edef68 --- .../assembly/impl/EndpointRegistryImpl.java | 43 ++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java index aa1a4001a4..7555b95140 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java @@ -22,14 +22,19 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.Properties; +import java.util.logging.Level; import java.util.logging.Logger; +import org.apache.tuscany.sca.assembly.Binding; import org.apache.tuscany.sca.assembly.Endpoint; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.LifeCycleListener; +import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.runtime.BaseEndpointRegistry; import org.apache.tuscany.sca.runtime.EndpointListener; import org.apache.tuscany.sca.runtime.EndpointRegistry; +import org.apache.tuscany.sca.runtime.RuntimeProperties; /** * A EndpointRegistry implementation that sees registrations from the same JVM @@ -38,9 +43,13 @@ public class EndpointRegistryImpl extends BaseEndpointRegistry implements Endpoi private final Logger logger = Logger.getLogger(EndpointRegistryImpl.class.getName()); private List endpoints = new ArrayList(); + + protected boolean quietLogging; public EndpointRegistryImpl(ExtensionPointRegistry extensionPoints, String endpointRegistryURI, String domainURI) { super(extensionPoints, null, endpointRegistryURI, domainURI); + Properties runtimeProps = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class).getUtility(RuntimeProperties.class).getProperties(); + quietLogging = Boolean.parseBoolean(runtimeProps.getProperty(RuntimeProperties.QUIET_LOGGING)); } public synchronized void addEndpoint(Endpoint endpoint) { @@ -48,7 +57,22 @@ public synchronized void addEndpoint(Endpoint endpoint) { for (EndpointListener listener : listeners) { listener.endpointAdded(endpoint); } - logger.info("Add endpoint - " + endpoint.toString()); + if (logger.isLoggable(quietLogging ? Level.FINE : Level.INFO)) { + String uri = null; + Binding b = endpoint.getBinding(); + if (b != null) { + uri = b.getURI(); + if (uri != null && uri.startsWith("/")) { + uri = uri.substring(1); + } + } + String msg = "Add endpoint - " + (uri == null ? endpoint.getURI() : b.getType().getLocalPart()+" - " + uri); + if (quietLogging) { + logger.fine(msg); + } else { + logger.info(msg); + } + } } public List findEndpoint(String uri) { @@ -66,7 +90,22 @@ public List findEndpoint(String uri) { public synchronized void removeEndpoint(Endpoint endpoint) { endpoints.remove(endpoint); endpointRemoved(endpoint); - logger.info("Remove endpoint - " + endpoint.toString()); + if (logger.isLoggable(quietLogging ? Level.FINE : Level.INFO)) { + String uri = null; + Binding b = endpoint.getBinding(); + if (b != null) { + uri = b.getURI(); + if (uri != null && uri.startsWith("/")) { + uri = uri.substring(1); + } + } + String msg = "Remove endpoint - " + (uri == null ? endpoint.getURI() : b.getType().getLocalPart()+" - "+uri); + if (quietLogging) { + logger.fine(msg); + } else { + logger.info(msg); + } + } } public synchronized List getEndpoints() { From d55030a9b74aa260faf200903daa77900562693c Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Wed, 2 Feb 2011 09:44:33 +0000 Subject: [PATCH 110/157] Removing setting in the POM which uses the intalio repo, since this repo has incorrect contents for some modules such as dom4j git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1066392 13f79535-47bb-0310-9956-ffa450edef68 --- modules/implementation-bpel-runtime/pom.xml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/modules/implementation-bpel-runtime/pom.xml b/modules/implementation-bpel-runtime/pom.xml index ceff78cc86..fdb2ea87ea 100644 --- a/modules/implementation-bpel-runtime/pom.xml +++ b/modules/implementation-bpel-runtime/pom.xml @@ -28,20 +28,6 @@ tuscany-implementation-bpel-runtime Apache Tuscany SCA BPEL ODE Implementation Extension - - - - intalio.org - http://www.intalio.org/public/maven2 - - true - - - false - - - - org.apache.tuscany.sca From 66a0d24e50a1e7d6a3d101aae19b985f04aa6bec Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Wed, 2 Feb 2011 11:10:50 +0000 Subject: [PATCH 111/157] Fix to overcome the test failure logged in TUSCANY-3829, removing the POM dependency on jaxws-rt git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1066413 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/ws/external-client/pom.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/testing/itest/ws/external-client/pom.xml b/testing/itest/ws/external-client/pom.xml index 5fad448463..457ed42035 100644 --- a/testing/itest/ws/external-client/pom.xml +++ b/testing/itest/ws/external-client/pom.xml @@ -38,13 +38,7 @@ - - - com.sun.xml.ws - jaxws-rt - 2.2.1 - - + From 45f132415a5954207480cf3e86fd48dec6449d01 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Wed, 2 Feb 2011 18:00:11 +0000 Subject: [PATCH 112/157] Start some simple code to detect when Tuscany SPI changes. Not in build yet. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1066551 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/spi/build.xml | 72 ++ testing/itest/spi/pom.xml | 82 +++ testing/itest/spi/spi-safe.txt | 690 ++++++++++++++++++ .../tuscany/sca/itest/spi/SPITestCase.java | 91 +++ 4 files changed, 935 insertions(+) create mode 100644 testing/itest/spi/build.xml create mode 100644 testing/itest/spi/pom.xml create mode 100644 testing/itest/spi/spi-safe.txt create mode 100644 testing/itest/spi/src/test/java/org/apache/tuscany/sca/itest/spi/SPITestCase.java diff --git a/testing/itest/spi/build.xml b/testing/itest/spi/build.xml new file mode 100644 index 0000000000..82f162e899 --- /dev/null +++ b/testing/itest/spi/build.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${class.names} + + + + + + + + + + diff --git a/testing/itest/spi/pom.xml b/testing/itest/spi/pom.xml new file mode 100644 index 0000000000..0a12e2c292 --- /dev/null +++ b/testing/itest/spi/pom.xml @@ -0,0 +1,82 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 2.0-SNAPSHOT + ../pom.xml + + itest-spi + Apache Tuscany SCA iTest SPI + 2.0-SNAPSHOT + + + + + org.apache.tuscany.sca + tuscany-base-runtime-pom + pom + 2.0-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.6 + + + spi + test-compile + + run + + + + + + + + + + + + + org.apache.ant + ant-apache-regexp + 1.7.0 + test + + + jakarta-regexp + jakarta-regexp + 1.4 + test + + + + + + diff --git a/testing/itest/spi/spi-safe.txt b/testing/itest/spi/spi-safe.txt new file mode 100644 index 0000000000..879cd1864a --- /dev/null +++ b/testing/itest/spi/spi-safe.txt @@ -0,0 +1,690 @@ +Compiled from "AbstractContract.java" +public interface org.apache.tuscany.sca.assembly.AbstractContract extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.assembly.Extensible,org.apache.tuscany.sca.policy.PolicySubject{ + public abstract java.lang.String getName(); + public abstract void setName(java.lang.String); + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getInterfaceContract(); + public abstract void setInterfaceContract(org.apache.tuscany.sca.interfacedef.InterfaceContract); + public abstract boolean isForCallback(); + public abstract void setForCallback(boolean); +} + +Compiled from "AbstractProperty.java" +public interface org.apache.tuscany.sca.assembly.AbstractProperty extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.assembly.Extensible{ + public abstract java.lang.String getName(); + public abstract void setName(java.lang.String); + public abstract java.lang.Object getValue(); + public abstract void setValue(java.lang.Object); + public abstract boolean isMany(); + public abstract void setMany(boolean); + public abstract boolean isMustSupply(); + public abstract void setMustSupply(boolean); + public abstract javax.xml.namespace.QName getXSDType(); + public abstract void setXSDType(javax.xml.namespace.QName); + public abstract javax.xml.namespace.QName getXSDElement(); + public abstract void setXSDElement(javax.xml.namespace.QName); + public abstract org.apache.tuscany.sca.interfacedef.DataType getDataType(); + public abstract void setDataType(org.apache.tuscany.sca.interfacedef.DataType); + public abstract java.lang.Object getXSDDefinition(); + public abstract void setXSDDefinition(java.lang.Object); +} + +Compiled from "AbstractReference.java" +public interface org.apache.tuscany.sca.assembly.AbstractReference extends org.apache.tuscany.sca.assembly.AbstractContract{ + public abstract org.apache.tuscany.sca.assembly.Multiplicity getMultiplicity(); + public abstract void setMultiplicity(org.apache.tuscany.sca.assembly.Multiplicity); +} + +Compiled from "AbstractService.java" +public interface org.apache.tuscany.sca.assembly.AbstractService extends org.apache.tuscany.sca.assembly.AbstractContract{ +} + +Compiled from "AssemblyFactory.java" +public interface org.apache.tuscany.sca.assembly.AssemblyFactory{ + public abstract org.apache.tuscany.sca.assembly.AbstractProperty createAbstractProperty(); + public abstract org.apache.tuscany.sca.assembly.AbstractReference createAbstractReference(); + public abstract org.apache.tuscany.sca.assembly.AbstractService createAbstractService(); + public abstract org.apache.tuscany.sca.assembly.Callback createCallback(); + public abstract org.apache.tuscany.sca.assembly.Component createComponent(); + public abstract org.apache.tuscany.sca.assembly.ComponentProperty createComponentProperty(); + public abstract org.apache.tuscany.sca.assembly.ComponentReference createComponentReference(); + public abstract org.apache.tuscany.sca.assembly.ComponentService createComponentService(); + public abstract org.apache.tuscany.sca.assembly.ComponentType createComponentType(); + public abstract org.apache.tuscany.sca.assembly.Composite createComposite(); + public abstract org.apache.tuscany.sca.assembly.CompositeReference createCompositeReference(); + public abstract org.apache.tuscany.sca.assembly.CompositeService createCompositeService(); + public abstract org.apache.tuscany.sca.assembly.Property createProperty(); + public abstract org.apache.tuscany.sca.assembly.Reference createReference(); + public abstract org.apache.tuscany.sca.assembly.Service createService(); + public abstract org.apache.tuscany.sca.assembly.Wire createWire(); + public abstract org.apache.tuscany.sca.assembly.Extension createExtension(); + public abstract org.apache.tuscany.sca.assembly.Endpoint createEndpoint(); + public abstract org.apache.tuscany.sca.assembly.EndpointReference createEndpointReference(); + public abstract org.apache.tuscany.sca.assembly.ConfiguredOperation createConfiguredOperation(); +} + +Compiled from "Base.java" +public interface org.apache.tuscany.sca.assembly.Base{ + public static final java.lang.String SCA11_NS; + public static final java.lang.String SCA11_TUSCANY_NS; + public abstract boolean isUnresolved(); + public abstract void setUnresolved(boolean); +} + +Compiled from "Binding.java" +public interface org.apache.tuscany.sca.assembly.Binding extends org.apache.tuscany.sca.assembly.Base,java.lang.Cloneable{ + public abstract java.lang.String getURI(); + public abstract void setURI(java.lang.String); + public abstract java.lang.String getName(); + public abstract void setName(java.lang.String); + public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException; + public abstract javax.xml.namespace.QName getType(); + public abstract org.apache.tuscany.sca.assembly.WireFormat getRequestWireFormat(); + public abstract void setRequestWireFormat(org.apache.tuscany.sca.assembly.WireFormat); + public abstract org.apache.tuscany.sca.assembly.WireFormat getResponseWireFormat(); + public abstract void setResponseWireFormat(org.apache.tuscany.sca.assembly.WireFormat); + public abstract org.apache.tuscany.sca.assembly.OperationSelector getOperationSelector(); + public abstract void setOperationSelector(org.apache.tuscany.sca.assembly.OperationSelector); +} + +Compiled from "Callback.java" +public interface org.apache.tuscany.sca.assembly.Callback extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.assembly.Extensible,org.apache.tuscany.sca.policy.PolicySubject{ + public abstract java.util.List getBindings(); + public abstract org.apache.tuscany.sca.assembly.Contract getParentContract(); + public abstract void setParentContract(org.apache.tuscany.sca.assembly.Contract); +} + +Compiled from "Component.java" +public interface org.apache.tuscany.sca.assembly.Component extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.assembly.Extensible,org.apache.tuscany.sca.policy.PolicySubject,java.lang.Cloneable{ + public abstract java.lang.String getURI(); + public abstract void setURI(java.lang.String); + public abstract java.lang.String getName(); + public abstract void setName(java.lang.String); + public abstract org.apache.tuscany.sca.assembly.Implementation getImplementation(); + public abstract void setImplementation(org.apache.tuscany.sca.assembly.Implementation); + public abstract java.util.List getReferences(); + public abstract org.apache.tuscany.sca.assembly.ComponentReference getReference(java.lang.String); + public abstract java.util.List getServices(); + public abstract org.apache.tuscany.sca.assembly.ComponentService getService(java.lang.String); + public abstract java.util.List getProperties(); + public abstract org.apache.tuscany.sca.assembly.ComponentProperty getProperty(java.lang.String); + public abstract java.lang.Boolean getAutowire(); + public abstract void setAutowire(java.lang.Boolean); + public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException; +} + +Compiled from "ComponentProperty.java" +public interface org.apache.tuscany.sca.assembly.ComponentProperty extends org.apache.tuscany.sca.assembly.Property{ + public abstract org.apache.tuscany.sca.assembly.Property getProperty(); + public abstract void setProperty(org.apache.tuscany.sca.assembly.Property); + public abstract java.lang.String getSource(); + public abstract void setSource(java.lang.String); + public abstract javax.xml.xpath.XPathExpression getSourceXPathExpression(); + public abstract void setSourceXPathExpression(javax.xml.xpath.XPathExpression); + public abstract java.lang.String getFile(); + public abstract void setFile(java.lang.String); +} + +Compiled from "ComponentReference.java" +public interface org.apache.tuscany.sca.assembly.ComponentReference extends org.apache.tuscany.sca.assembly.Reference{ + public abstract org.apache.tuscany.sca.assembly.Reference getReference(); + public abstract void setReference(org.apache.tuscany.sca.assembly.Reference); + public abstract java.lang.Boolean getAutowire(); + public abstract void setAutowire(java.lang.Boolean); + public abstract org.apache.tuscany.sca.assembly.ComponentService getCallbackService(); + public abstract void setCallbackService(org.apache.tuscany.sca.assembly.ComponentService); + public abstract boolean isNonOverridable(); + public abstract void setNonOverridable(boolean); + public abstract void setPromoted(boolean); + public abstract boolean isPromoted(); +} + +Compiled from "ComponentService.java" +public interface org.apache.tuscany.sca.assembly.ComponentService extends org.apache.tuscany.sca.assembly.Service{ + public abstract org.apache.tuscany.sca.assembly.Service getService(); + public abstract void setService(org.apache.tuscany.sca.assembly.Service); + public abstract org.apache.tuscany.sca.assembly.ComponentReference getCallbackReference(); + public abstract void setCallbackReference(org.apache.tuscany.sca.assembly.ComponentReference); +} + +Compiled from "ComponentType.java" +public interface org.apache.tuscany.sca.assembly.ComponentType extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.policy.PolicySubject{ + public abstract java.lang.String getURI(); + public abstract void setURI(java.lang.String); + public abstract java.util.List getServices(); + public abstract org.apache.tuscany.sca.assembly.Service getService(java.lang.String); + public abstract java.util.List getReferences(); + public abstract org.apache.tuscany.sca.assembly.Reference getReference(java.lang.String); + public abstract java.util.List getProperties(); + public abstract org.apache.tuscany.sca.assembly.Property getProperty(java.lang.String); +} + +Compiled from "Composite.java" +public interface org.apache.tuscany.sca.assembly.Composite extends org.apache.tuscany.sca.assembly.Implementation,org.apache.tuscany.sca.assembly.Extensible,java.lang.Cloneable,org.apache.tuscany.sca.policy.PolicySubject{ + public static final javax.xml.namespace.QName DOMAIN_COMPOSITE; + public static final javax.xml.namespace.QName TYPE; + public abstract java.lang.String getSpecVersion(); + public abstract void setSpecVersion(java.lang.String); + public abstract javax.xml.namespace.QName getName(); + public abstract void setName(javax.xml.namespace.QName); + public abstract java.util.List getIncludes(); + public abstract java.util.List getComponents(); + public abstract org.apache.tuscany.sca.assembly.Component getComponent(java.lang.String); + public abstract java.util.List getWires(); + public abstract boolean isLocal(); + public abstract void setLocal(boolean); + public abstract java.lang.Boolean getAutowire(); + public abstract void setAutowire(java.lang.Boolean); + public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException; + static {}; +} + +Compiled from "CompositeReference.java" +public interface org.apache.tuscany.sca.assembly.CompositeReference extends org.apache.tuscany.sca.assembly.Reference{ + public abstract java.util.List getPromotedComponents(); + public abstract java.util.List getPromotedReferences(); +} + +Compiled from "CompositeService.java" +public interface org.apache.tuscany.sca.assembly.CompositeService extends org.apache.tuscany.sca.assembly.Service{ + public abstract org.apache.tuscany.sca.assembly.Component getPromotedComponent(); + public abstract void setPromotedComponent(org.apache.tuscany.sca.assembly.Component); + public abstract org.apache.tuscany.sca.assembly.ComponentService getPromotedService(); + public abstract void setPromotedService(org.apache.tuscany.sca.assembly.ComponentService); +} + +Compiled from "ConfiguredOperation.java" +public interface org.apache.tuscany.sca.assembly.ConfiguredOperation extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.policy.PolicySubject{ + public abstract java.lang.String getName(); + public abstract void setName(java.lang.String); + public abstract java.lang.String getContractName(); + public abstract void setContractName(java.lang.String); +} + +Compiled from "Contract.java" +public interface org.apache.tuscany.sca.assembly.Contract extends org.apache.tuscany.sca.assembly.AbstractContract,org.apache.tuscany.sca.policy.PolicySubject,java.lang.Cloneable{ + public abstract java.util.List getBindings(); + public abstract java.lang.Object getBinding(java.lang.Class); + public abstract java.lang.Object getCallbackBinding(java.lang.Class); + public abstract org.apache.tuscany.sca.assembly.Callback getCallback(); + public abstract void setCallback(org.apache.tuscany.sca.assembly.Callback); + public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException; + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getInterfaceContract(org.apache.tuscany.sca.assembly.Binding); + public abstract boolean isOverridingBindings(); + public abstract void setOverridingBindings(boolean); +} + +Compiled from "DefaultAssemblyFactory.java" +public class org.apache.tuscany.sca.assembly.DefaultAssemblyFactory extends org.apache.tuscany.sca.assembly.impl.AssemblyFactoryImpl implements org.apache.tuscany.sca.assembly.AssemblyFactory{ + public org.apache.tuscany.sca.assembly.DefaultAssemblyFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.apache.tuscany.sca.assembly.DefaultAssemblyFactory(); +} + +Compiled from "Endpoint.java" +public interface org.apache.tuscany.sca.assembly.Endpoint extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.policy.PolicySubject,java.lang.Cloneable,java.io.Serializable{ + public abstract java.lang.String getURI(); + public abstract void setURI(java.lang.String); + public abstract org.apache.tuscany.sca.assembly.Component getComponent(); + public abstract void setComponent(org.apache.tuscany.sca.assembly.Component); + public abstract org.apache.tuscany.sca.assembly.ComponentService getService(); + public abstract void setService(org.apache.tuscany.sca.assembly.ComponentService); + public abstract org.apache.tuscany.sca.assembly.Binding getBinding(); + public abstract void setBinding(org.apache.tuscany.sca.assembly.Binding); + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getComponentServiceInterfaceContract(); + public abstract java.util.List getCallbackEndpointReferences(); + public abstract boolean isRemote(); + public abstract void setRemote(boolean); + public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException; + public abstract boolean matches(java.lang.String); + public abstract boolean isAsyncInvocation(); +} + +Compiled from "EndpointReference.java" +public interface org.apache.tuscany.sca.assembly.EndpointReference extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.policy.PolicySubject,java.lang.Cloneable,java.io.Serializable{ + public abstract java.lang.String getURI(); + public abstract void setURI(java.lang.String); + public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException; + public abstract org.apache.tuscany.sca.assembly.Component getComponent(); + public abstract void setComponent(org.apache.tuscany.sca.assembly.Component); + public abstract org.apache.tuscany.sca.assembly.ComponentReference getReference(); + public abstract void setReference(org.apache.tuscany.sca.assembly.ComponentReference); + public abstract org.apache.tuscany.sca.assembly.Binding getBinding(); + public abstract void setBinding(org.apache.tuscany.sca.assembly.Binding); + public abstract org.apache.tuscany.sca.assembly.Endpoint getTargetEndpoint(); + public abstract void setTargetEndpoint(org.apache.tuscany.sca.assembly.Endpoint); + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getComponentReferenceInterfaceContract(); + public abstract org.apache.tuscany.sca.assembly.Endpoint getCallbackEndpoint(); + public abstract void setCallbackEndpoint(org.apache.tuscany.sca.assembly.Endpoint); + public abstract org.apache.tuscany.sca.assembly.EndpointReference$Status getStatus(); + public abstract void setStatus(org.apache.tuscany.sca.assembly.EndpointReference$Status); + public abstract boolean isAsyncInvocation(); +} + +Compiled from "Extensible.java" +public interface org.apache.tuscany.sca.assembly.Extensible extends org.apache.tuscany.sca.assembly.Base{ + public abstract java.util.List getExtensions(); + public abstract java.util.List getAttributeExtensions(); +} + +Compiled from "Extension.java" +public interface org.apache.tuscany.sca.assembly.Extension{ + public abstract javax.xml.namespace.QName getQName(); + public abstract void setQName(javax.xml.namespace.QName); + public abstract java.lang.Object getValue(); + public abstract void setValue(java.lang.Object); + public abstract boolean isAttribute(); + public abstract void setAttribute(boolean); +} + +Compiled from "Implementation.java" +public interface org.apache.tuscany.sca.assembly.Implementation extends org.apache.tuscany.sca.assembly.ComponentType{ + public abstract javax.xml.namespace.QName getType(); + public abstract java.util.List getOperations(); +} + +Compiled from "Multiplicity.java" +public final class org.apache.tuscany.sca.assembly.Multiplicity extends java.lang.Enum{ + public static final org.apache.tuscany.sca.assembly.Multiplicity ZERO_ONE; + public static final org.apache.tuscany.sca.assembly.Multiplicity ONE_ONE; + public static final org.apache.tuscany.sca.assembly.Multiplicity ZERO_N; + public static final org.apache.tuscany.sca.assembly.Multiplicity ONE_N; + public static org.apache.tuscany.sca.assembly.Multiplicity[] values(); + public static org.apache.tuscany.sca.assembly.Multiplicity valueOf(java.lang.String); + static {}; +} + +Compiled from "OperationSelector.java" +public interface org.apache.tuscany.sca.assembly.OperationSelector extends org.apache.tuscany.sca.assembly.Base,java.lang.Cloneable{ +} + +Compiled from "OperationsConfigurator.java" +public interface org.apache.tuscany.sca.assembly.OperationsConfigurator{ + public abstract java.util.List getConfiguredOperations(); +} + +Compiled from "Property.java" +public interface org.apache.tuscany.sca.assembly.Property extends org.apache.tuscany.sca.assembly.AbstractProperty,java.lang.Cloneable{ + public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException; +} + +Compiled from "Reference.java" +public interface org.apache.tuscany.sca.assembly.Reference extends org.apache.tuscany.sca.assembly.AbstractReference,org.apache.tuscany.sca.assembly.Contract{ + public abstract boolean isWiredByImpl(); + public abstract void setWiredByImpl(boolean); + public abstract java.util.List getTargets(); + public abstract java.util.List getEndpointReferences(); +} + +Compiled from "SCABinding.java" +public interface org.apache.tuscany.sca.assembly.SCABinding extends org.apache.tuscany.sca.assembly.Binding{ + public static final javax.xml.namespace.QName TYPE; + static {}; +} + +Compiled from "SCABindingFactory.java" +public interface org.apache.tuscany.sca.assembly.SCABindingFactory{ + public abstract org.apache.tuscany.sca.assembly.SCABinding createSCABinding(); +} + +Compiled from "Service.java" +public interface org.apache.tuscany.sca.assembly.Service extends org.apache.tuscany.sca.assembly.AbstractService,org.apache.tuscany.sca.assembly.Contract{ + public abstract java.util.List getEndpoints(); + public abstract boolean isJAXWSService(); + public abstract void setJAXWSService(boolean); +} + +Compiled from "Wire.java" +public interface org.apache.tuscany.sca.assembly.Wire extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.assembly.Extensible,org.apache.tuscany.sca.policy.PolicySubject,java.lang.Cloneable{ + public abstract org.apache.tuscany.sca.assembly.ComponentReference getSource(); + public abstract void setSource(org.apache.tuscany.sca.assembly.ComponentReference); + public abstract org.apache.tuscany.sca.assembly.ComponentService getTarget(); + public abstract void setTarget(org.apache.tuscany.sca.assembly.ComponentService); + public abstract boolean isReplace(); + public abstract void setReplace(boolean); + public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException; +} + +Compiled from "WireFormat.java" +public interface org.apache.tuscany.sca.assembly.WireFormat extends org.apache.tuscany.sca.assembly.Base,java.lang.Cloneable{ + public abstract javax.xml.namespace.QName getSchemaName(); +} + +Compiled from "DefaultDefinitionsFactory.java" +public class org.apache.tuscany.sca.definitions.DefaultDefinitionsFactory extends java.lang.Object implements org.apache.tuscany.sca.definitions.DefinitionsFactory{ + public org.apache.tuscany.sca.definitions.DefaultDefinitionsFactory(); + public org.apache.tuscany.sca.definitions.Definitions createDefinitions(); +} + +Compiled from "Definitions.java" +public interface org.apache.tuscany.sca.definitions.Definitions{ + public abstract java.lang.String getTargetNamespace(); + public abstract void setTargetNamespace(java.lang.String); + public abstract java.util.List getIntents(); + public abstract java.util.List getPolicySets(); + public abstract java.util.List getBindingTypes(); + public abstract java.util.List getImplementationTypes(); + public abstract java.util.List getBindings(); + public abstract java.util.List getExternalAttachments(); +} + +Compiled from "DefinitionsBuilder.java" +public interface org.apache.tuscany.sca.definitions.DefinitionsBuilder{ + public abstract void build(org.apache.tuscany.sca.definitions.Definitions) throws org.apache.tuscany.sca.definitions.DefinitionsBuilderException; +} + +Compiled from "DefinitionsBuilderException.java" +public class org.apache.tuscany.sca.definitions.DefinitionsBuilderException extends java.lang.Exception{ + public org.apache.tuscany.sca.definitions.DefinitionsBuilderException(); + public org.apache.tuscany.sca.definitions.DefinitionsBuilderException(java.lang.String); + public org.apache.tuscany.sca.definitions.DefinitionsBuilderException(java.lang.Throwable); + public org.apache.tuscany.sca.definitions.DefinitionsBuilderException(java.lang.String, java.lang.Throwable); +} + +Compiled from "DefinitionsFactory.java" +public interface org.apache.tuscany.sca.definitions.DefinitionsFactory{ + public abstract org.apache.tuscany.sca.definitions.Definitions createDefinitions(); +} + +Compiled from "Compatibility.java" +public final class org.apache.tuscany.sca.interfacedef.Compatibility extends java.lang.Enum{ + public static final org.apache.tuscany.sca.interfacedef.Compatibility SUPERSET; + public static final org.apache.tuscany.sca.interfacedef.Compatibility SUBSET; + public static final org.apache.tuscany.sca.interfacedef.Compatibility MUTUAL; + public static final org.apache.tuscany.sca.interfacedef.Compatibility INCOMPATIBLE; + public static org.apache.tuscany.sca.interfacedef.Compatibility[] values(); + public static org.apache.tuscany.sca.interfacedef.Compatibility valueOf(java.lang.String); + static {}; +} + +Compiled from "DataType.java" +public interface org.apache.tuscany.sca.interfacedef.DataType extends java.lang.Cloneable{ + public abstract void setPhysical(java.lang.Class); + public abstract java.lang.Class getPhysical(); + public abstract java.lang.reflect.Type getGenericType(); + public abstract void setGenericType(java.lang.reflect.Type); + public abstract java.lang.Object getLogical(); + public abstract java.lang.String getDataBinding(); + public abstract void setDataBinding(java.lang.String); + public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException; + public abstract void setLogical(java.lang.Object); + public abstract java.lang.Object getMetaData(java.lang.Class); + public abstract void setMetaData(java.lang.Class, java.lang.Object); +} + +Compiled from "FaultExceptionMapper.java" +public interface org.apache.tuscany.sca.interfacedef.FaultExceptionMapper{ + public abstract boolean introspectFaultDataType(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation, boolean); + public abstract java.lang.Throwable wrapFaultInfo(org.apache.tuscany.sca.interfacedef.DataType, java.lang.String, java.lang.Object, java.lang.Throwable, org.apache.tuscany.sca.interfacedef.Operation); + public abstract java.lang.Object getFaultInfo(java.lang.Throwable, java.lang.Class, org.apache.tuscany.sca.interfacedef.Operation); +} + +Compiled from "IncompatibleInterfaceContractException.java" +public class org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException extends java.lang.Exception{ + public org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException(java.lang.String, org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract); + public org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException(java.lang.String, org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation); + public org.apache.tuscany.sca.interfacedef.InterfaceContract getTarget(); + public org.apache.tuscany.sca.interfacedef.InterfaceContract getSource(); + public org.apache.tuscany.sca.interfacedef.Operation getSourceOperation(); + public org.apache.tuscany.sca.interfacedef.Operation getTargetOperation(); +} + +Compiled from "Interface.java" +public interface org.apache.tuscany.sca.interfacedef.Interface extends java.lang.Cloneable,org.apache.tuscany.sca.policy.PolicySubject{ + public abstract boolean isRemotable(); + public abstract void setRemotable(boolean); + public abstract boolean isRemotableSet(); + public abstract java.util.List getOperations(); + public abstract void setDefaultDataBinding(java.lang.String); + public abstract void resetDataBinding(java.lang.String); + public abstract void resetInterfaceInputTypes(org.apache.tuscany.sca.interfacedef.Interface); + public abstract void resetInterfaceOutputTypes(org.apache.tuscany.sca.interfacedef.Interface); + public abstract boolean isDynamic(); + public abstract java.util.Map getAttributes(); + public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException; +} + +Compiled from "InterfaceContract.java" +public interface org.apache.tuscany.sca.interfacedef.InterfaceContract extends java.lang.Cloneable{ + public abstract org.apache.tuscany.sca.interfacedef.Interface getInterface(); + public abstract void setInterface(org.apache.tuscany.sca.interfacedef.Interface); + public abstract org.apache.tuscany.sca.interfacedef.Interface getCallbackInterface(); + public abstract void setCallbackInterface(org.apache.tuscany.sca.interfacedef.Interface); + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract makeUnidirectional(boolean); + public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException; + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getNormalizedWSDLContract(); + public abstract void setNormailizedWSDLContract(org.apache.tuscany.sca.interfacedef.InterfaceContract); +} + +Compiled from "InterfaceContractMapper.java" +public interface org.apache.tuscany.sca.interfacedef.InterfaceContractMapper{ + public abstract boolean checkCompatibility(org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.Compatibility, boolean, boolean) throws org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException; + public abstract boolean checkCompatibility(org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.Compatibility, boolean, boolean, org.apache.tuscany.sca.interfacedef.util.Audit) throws org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException; + public abstract boolean isCompatible(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, boolean); + public abstract boolean isCompatible(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Compatibility); + public abstract boolean isCompatibleByReference(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Compatibility); + public abstract boolean isCompatibleByValue(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Compatibility); + public abstract boolean isCompatibleSubset(org.apache.tuscany.sca.interfacedef.Interface, org.apache.tuscany.sca.interfacedef.Interface); + public abstract boolean isCompatibleSubset(org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract); + public abstract boolean isCompatibleSubset(org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.util.Audit); + public abstract boolean isMutuallyCompatible(org.apache.tuscany.sca.interfacedef.Interface, org.apache.tuscany.sca.interfacedef.Interface); + public abstract boolean isMutuallyCompatible(org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract); + public abstract org.apache.tuscany.sca.interfacedef.Operation map(org.apache.tuscany.sca.interfacedef.Interface, org.apache.tuscany.sca.interfacedef.Operation); +} + +Compiled from "InvalidAnnotationException.java" +public class org.apache.tuscany.sca.interfacedef.InvalidAnnotationException extends org.apache.tuscany.sca.interfacedef.InvalidInterfaceException{ + public org.apache.tuscany.sca.interfacedef.InvalidAnnotationException(java.lang.String, java.lang.Class); + public java.lang.Class getAnnotation(); +} + +Compiled from "InvalidCallbackException.java" +public class org.apache.tuscany.sca.interfacedef.InvalidCallbackException extends org.apache.tuscany.sca.interfacedef.InvalidInterfaceException{ + public org.apache.tuscany.sca.interfacedef.InvalidCallbackException(java.lang.String); +} + +Compiled from "InvalidInterfaceException.java" +public abstract class org.apache.tuscany.sca.interfacedef.InvalidInterfaceException extends java.lang.Exception{ + public org.apache.tuscany.sca.interfacedef.InvalidInterfaceException(); + public org.apache.tuscany.sca.interfacedef.InvalidInterfaceException(java.lang.String); + public org.apache.tuscany.sca.interfacedef.InvalidInterfaceException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.interfacedef.InvalidInterfaceException(java.lang.Throwable); +} + +Compiled from "InvalidOperationException.java" +public class org.apache.tuscany.sca.interfacedef.InvalidOperationException extends org.apache.tuscany.sca.interfacedef.InvalidInterfaceException{ + public org.apache.tuscany.sca.interfacedef.InvalidOperationException(java.lang.String, java.lang.reflect.Method); + public java.lang.reflect.Method getOperation(); +} + +Compiled from "Operation.java" +public interface org.apache.tuscany.sca.interfacedef.Operation extends java.lang.Cloneable,org.apache.tuscany.sca.policy.PolicySubject{ + public static final java.lang.String IDL_INPUT; + public static final java.lang.String IDL_OUTPUT; + public static final java.lang.String IDL_FAULT; + public abstract java.lang.String getName(); + public abstract void setName(java.lang.String); + public abstract boolean isUnresolved(); + public abstract void setUnresolved(boolean); + public abstract org.apache.tuscany.sca.interfacedef.DataType getInputType(); + public abstract void setInputType(org.apache.tuscany.sca.interfacedef.DataType); + public abstract org.apache.tuscany.sca.interfacedef.DataType getOutputType(); + public abstract void setOutputType(org.apache.tuscany.sca.interfacedef.DataType); + public abstract java.util.List getFaultTypes(); + public abstract void setFaultTypes(java.util.List); + public abstract org.apache.tuscany.sca.interfacedef.Interface getInterface(); + public abstract void setInterface(org.apache.tuscany.sca.interfacedef.Interface); + public abstract boolean isNonBlocking(); + public abstract boolean isAsyncServer(); + public abstract void setNonBlocking(boolean); + public abstract org.apache.tuscany.sca.interfacedef.util.WrapperInfo getWrapper(); + public abstract void setWrapper(org.apache.tuscany.sca.interfacedef.util.WrapperInfo); + public abstract boolean isWrapperStyle(); + public abstract void setWrapperStyle(boolean); + public abstract java.lang.String getDataBinding(); + public abstract void setDataBinding(java.lang.String); + public abstract boolean isDynamic(); + public abstract void setDynamic(boolean); + public abstract java.util.Map getFaultBeans(); + public abstract void setFaultBeans(java.util.Map); + public abstract java.util.Map getAttributes(); + public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException; + public abstract java.util.List getParameterModes(); + public abstract boolean hasArrayWrappedOutput(); + public abstract void setHasArrayWrappedOutput(boolean); +} + +Compiled from "OverloadedOperationException.java" +public class org.apache.tuscany.sca.interfacedef.OverloadedOperationException extends org.apache.tuscany.sca.interfacedef.InvalidInterfaceException{ + public org.apache.tuscany.sca.interfacedef.OverloadedOperationException(java.lang.reflect.Method); + public java.lang.reflect.Method getOperation(); +} + +Compiled from "ParameterMode.java" +public final class org.apache.tuscany.sca.interfacedef.ParameterMode extends java.lang.Enum{ + public static final org.apache.tuscany.sca.interfacedef.ParameterMode IN; + public static final org.apache.tuscany.sca.interfacedef.ParameterMode OUT; + public static final org.apache.tuscany.sca.interfacedef.ParameterMode INOUT; + public static org.apache.tuscany.sca.interfacedef.ParameterMode[] values(); + public static org.apache.tuscany.sca.interfacedef.ParameterMode valueOf(java.lang.String); + static {}; +} + +Compiled from "BindingType.java" +public interface org.apache.tuscany.sca.policy.BindingType extends org.apache.tuscany.sca.policy.ExtensionType{ +} + +Compiled from "DefaultPolicyFactory.java" +public class org.apache.tuscany.sca.policy.DefaultPolicyFactory extends org.apache.tuscany.sca.policy.impl.PolicyFactoryImpl implements org.apache.tuscany.sca.policy.PolicyFactory{ + public org.apache.tuscany.sca.policy.DefaultPolicyFactory(); +} + +Compiled from "ExtensionType.java" +public interface org.apache.tuscany.sca.policy.ExtensionType{ + public static final javax.xml.namespace.QName BINDING_BASE; + public static final javax.xml.namespace.QName IMPLEMENTATION_BASE; + public abstract javax.xml.namespace.QName getType(); + public abstract void setType(javax.xml.namespace.QName); + public abstract javax.xml.namespace.QName getBaseType(); + public abstract java.util.List getAlwaysProvidedIntents(); + public abstract java.util.List getMayProvidedIntents(); + public abstract boolean isUnresolved(); + public abstract void setUnresolved(boolean); + static {}; +} + +Compiled from "ExternalAttachment.java" +public interface org.apache.tuscany.sca.policy.ExternalAttachment{ + public abstract java.lang.String getAttachTo(); + public abstract void setAttachTo(java.lang.String); + public abstract javax.xml.xpath.XPathExpression getAttachToXPathExpression(); + public abstract void setAttachToXPathExpression(javax.xml.xpath.XPathExpression); + public abstract java.util.List getPolicySets(); + public abstract java.util.List getIntents(); + public abstract boolean isUnresolved(); + public abstract void setUnresolved(boolean); +} + +Compiled from "ImplementationType.java" +public interface org.apache.tuscany.sca.policy.ImplementationType extends org.apache.tuscany.sca.policy.ExtensionType{ +} + +Compiled from "Intent.java" +public interface org.apache.tuscany.sca.policy.Intent{ + public abstract javax.xml.namespace.QName getName(); + public abstract void setName(javax.xml.namespace.QName); + public abstract java.util.List getConstrainedTypes(); + public abstract java.util.List getRequiredIntents(); + public abstract java.util.List getExcludedIntents(); + public abstract java.util.List getQualifiedIntents(); + public abstract org.apache.tuscany.sca.policy.Intent getDefaultQualifiedIntent(); + public abstract void setDefaultQualifiedIntent(org.apache.tuscany.sca.policy.Intent); + public abstract org.apache.tuscany.sca.policy.Intent$Type getType(); + public abstract void setType(org.apache.tuscany.sca.policy.Intent$Type); + public abstract boolean isMutuallyExclusive(); + public abstract void setMutuallyExclusive(boolean); + public abstract java.lang.String getDescription(); + public abstract void setDescription(java.lang.String); + public abstract org.apache.tuscany.sca.policy.Intent getQualifiableIntent(); + public abstract void setQualifiableIntent(org.apache.tuscany.sca.policy.Intent); + public abstract boolean isUnresolved(); + public abstract void setUnresolved(boolean); +} + +Compiled from "IntentMap.java" +public interface org.apache.tuscany.sca.policy.IntentMap{ + public abstract org.apache.tuscany.sca.policy.Intent getProvidedIntent(); + public abstract void setProvidedIntent(org.apache.tuscany.sca.policy.Intent); + public abstract java.util.List getQualifiers(); +} + +Compiled from "PolicyAttachment.java" +public interface org.apache.tuscany.sca.policy.PolicyAttachment{ + public abstract org.apache.tuscany.sca.policy.PolicySet getPolicySet(); + public abstract void setPolicySet(org.apache.tuscany.sca.policy.PolicySet); + public abstract java.util.List getPolicySubjects(); +} + +Compiled from "PolicyContainer.java" +public interface org.apache.tuscany.sca.policy.PolicyContainer{ + public abstract java.lang.Object getChildPolicy(java.lang.Class); +} + +Compiled from "PolicyExpression.java" +public interface org.apache.tuscany.sca.policy.PolicyExpression{ + public abstract javax.xml.namespace.QName getName(); + public abstract void setName(javax.xml.namespace.QName); + public abstract java.lang.Object getPolicy(); + public abstract void setPolicy(java.lang.Object); + public abstract void setUnresolved(boolean); + public abstract boolean isUnresolved(); +} + +Compiled from "PolicyFactory.java" +public interface org.apache.tuscany.sca.policy.PolicyFactory{ + public abstract org.apache.tuscany.sca.policy.Intent createIntent(); + public abstract org.apache.tuscany.sca.policy.PolicySet createPolicySet(); + public abstract org.apache.tuscany.sca.policy.IntentMap createIntentMap(); + public abstract org.apache.tuscany.sca.policy.Qualifier createQualifier(); + public abstract org.apache.tuscany.sca.policy.PolicyExpression createPolicyExpression(); + public abstract org.apache.tuscany.sca.policy.ExtensionType createExtensionType(); + public abstract org.apache.tuscany.sca.policy.BindingType createBindingType(); + public abstract org.apache.tuscany.sca.policy.ImplementationType createImplementationType(); + public abstract org.apache.tuscany.sca.policy.ExternalAttachment createExternalAttachment(); +} + +Compiled from "PolicySet.java" +public interface org.apache.tuscany.sca.policy.PolicySet{ + public abstract javax.xml.namespace.QName getName(); + public abstract void setName(javax.xml.namespace.QName); + public abstract java.util.List getReferencedPolicySets(); + public abstract java.util.List getProvidedIntents(); + public abstract java.util.List getPolicies(); + public abstract boolean isUnresolved(); + public abstract void setUnresolved(boolean); + public abstract java.lang.String getAppliesTo(); + public abstract void setAppliesTo(java.lang.String); + public abstract java.lang.String getAttachTo(); + public abstract void setAttachTo(java.lang.String); + public abstract javax.xml.xpath.XPathExpression getAttachToXPathExpression(); + public abstract void setAttachToXPathExpression(javax.xml.xpath.XPathExpression); + public abstract java.util.List getIntentMaps(); + public abstract javax.xml.xpath.XPathExpression getAppliesToXPathExpression(); + public abstract void setAppliesToXPathExpression(javax.xml.xpath.XPathExpression); + public abstract boolean isExternalAttachment(); + public abstract void setIsExternalAttachment(boolean); +} + +Compiled from "PolicySubject.java" +public interface org.apache.tuscany.sca.policy.PolicySubject{ + public abstract java.util.List getRequiredIntents(); + public abstract java.util.List getPolicySets(); + public abstract org.apache.tuscany.sca.policy.ExtensionType getExtensionType(); + public abstract void setExtensionType(org.apache.tuscany.sca.policy.ExtensionType); +} + +Compiled from "Qualifier.java" +public interface org.apache.tuscany.sca.policy.Qualifier{ + public abstract org.apache.tuscany.sca.policy.Intent getIntent(); + public abstract void setIntent(org.apache.tuscany.sca.policy.Intent); + public abstract java.util.List getPolicies(); +} + diff --git a/testing/itest/spi/src/test/java/org/apache/tuscany/sca/itest/spi/SPITestCase.java b/testing/itest/spi/src/test/java/org/apache/tuscany/sca/itest/spi/SPITestCase.java new file mode 100644 index 0000000000..2d2dc9dac5 --- /dev/null +++ b/testing/itest/spi/src/test/java/org/apache/tuscany/sca/itest/spi/SPITestCase.java @@ -0,0 +1,91 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.spi; + +import java.io.DataInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.math.BigInteger; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.logging.Handler; +import java.util.logging.Level; +import java.util.logging.LogRecord; +import java.util.logging.Logger; + +import junit.framework.Assert; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + +public class SPITestCase { + + + @Before + public void setUp() throws Exception { + } + + @After + public void tearDown() throws Exception { + } + + @Test + public void diffSPIClasses(){ + File spiSafeFile = new File("spi-safe.txt"); + File spiFile = new File("spi.txt"); + + String spiSafeMD5 = null; + String spiMD5 = null; + + try { + spiSafeMD5 = getMD5Digest(spiSafeFile); + spiMD5 = getMD5Digest(spiFile); + } catch(Exception ex) { + ex.printStackTrace(); + Assert.fail(ex.toString()); + } + + System.out.println("SPI Safe MD5 = " + spiSafeMD5); + System.out.println("SPI MD5 = " + spiMD5); + + Assert.assertEquals(spiSafeMD5, spiMD5); + } + + private String getMD5Digest(File file) + throws NoSuchAlgorithmException, + FileNotFoundException, + IOException { + MessageDigest messageDigest = MessageDigest.getInstance("MD5"); + + FileInputStream fileInputStream = new FileInputStream(file); + DataInputStream dataInputStream = new DataInputStream(fileInputStream); + byte[] fileBytes = new byte[(int)file.length()]; + dataInputStream.readFully(fileBytes); + messageDigest.update(fileBytes); + byte[] md5Digest = messageDigest.digest(); + BigInteger m5DigestInteger = new BigInteger(1,md5Digest); + return m5DigestInteger.toString(16); + } +} From ba2c84701206d5ba9acd9647c7e1ec46927f7f88 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Wed, 2 Feb 2011 18:37:44 +0000 Subject: [PATCH 113/157] Ass more SPI classes to the check. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1066573 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/spi/build.xml | 61 +- testing/itest/spi/spi-safe.txt | 3383 ++++++++++++++++++++++++++++++++ 2 files changed, 3433 insertions(+), 11 deletions(-) diff --git a/testing/itest/spi/build.xml b/testing/itest/spi/build.xml index 82f162e899..47e1f85357 100644 --- a/testing/itest/spi/build.xml +++ b/testing/itest/spi/build.xml @@ -19,20 +19,17 @@ - - - - + + dir="${basedir}/../../../modules"> - + - - + + @@ -46,9 +43,52 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -57,9 +97,8 @@ - - ${class.names} + diff --git a/testing/itest/spi/spi-safe.txt b/testing/itest/spi/spi-safe.txt index 879cd1864a..64798e33ac 100644 --- a/testing/itest/spi/spi-safe.txt +++ b/testing/itest/spi/spi-safe.txt @@ -688,3 +688,3386 @@ public interface org.apache.tuscany.sca.policy.Qualifier{ public abstract java.util.List getPolicies(); } +Compiled from "Artifact.java" +public interface org.apache.tuscany.sca.contribution.Artifact extends org.apache.tuscany.sca.assembly.Base{ + public abstract java.lang.String getURI(); + public abstract void setURI(java.lang.String); + public abstract java.lang.String getLocation(); + public abstract void setLocation(java.lang.String); + public abstract java.lang.Object getModel(); + public abstract void setModel(java.lang.Object); +} + +Compiled from "ContentType.java" +public interface org.apache.tuscany.sca.contribution.ContentType{ + public static final java.lang.String JAR; + public static final java.lang.String FOLDER; +} + +Compiled from "Contribution.java" +public interface org.apache.tuscany.sca.contribution.Contribution extends org.apache.tuscany.sca.contribution.Artifact,org.apache.tuscany.sca.assembly.Extensible{ + public static final java.lang.String SCA_CONTRIBUTION_META; + public static final java.lang.String SCA_CONTRIBUTION_GENERATED_META; + public abstract java.util.List getExports(); + public abstract java.util.List getImports(); + public abstract java.util.List getDeployables(); + public abstract java.util.List getArtifacts(); + public abstract org.apache.tuscany.sca.contribution.resolver.ModelResolver getModelResolver(); + public abstract void setModelResolver(org.apache.tuscany.sca.contribution.resolver.ModelResolver); + public abstract java.util.List getDependencies(); + public abstract java.lang.ClassLoader getClassLoader(); + public abstract void setClassLoader(java.lang.ClassLoader); + public abstract java.util.Set getTypes(); +} + +Compiled from "ContributionFactory.java" +public interface org.apache.tuscany.sca.contribution.ContributionFactory{ + public abstract org.apache.tuscany.sca.contribution.Contribution createContribution(); + public abstract org.apache.tuscany.sca.contribution.ContributionMetadata createContributionMetadata(); + public abstract org.apache.tuscany.sca.contribution.Artifact createArtifact(); + public abstract org.apache.tuscany.sca.contribution.DefaultImport createDefaultImport(); + public abstract org.apache.tuscany.sca.contribution.DefaultExport createDefaultExport(); +} + +Compiled from "ContributionMetadata.java" +public interface org.apache.tuscany.sca.contribution.ContributionMetadata extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.assembly.Extensible{ + public abstract java.lang.String getSpecVersion(); + public abstract void setSpecVersion(java.lang.String); + public abstract java.util.List getExports(); + public abstract java.util.List getImports(); + public abstract java.util.List getDeployables(); +} + +Compiled from "DefaultContributionFactory.java" +public class org.apache.tuscany.sca.contribution.DefaultContributionFactory extends org.apache.tuscany.sca.contribution.impl.ContributionFactoryImpl{ + public org.apache.tuscany.sca.contribution.DefaultContributionFactory(); +} + +Compiled from "DefaultExport.java" +public interface org.apache.tuscany.sca.contribution.DefaultExport extends org.apache.tuscany.sca.contribution.Export{ +} + +Compiled from "DefaultImport.java" +public interface org.apache.tuscany.sca.contribution.DefaultImport extends org.apache.tuscany.sca.contribution.Import{ +} + +Compiled from "Export.java" +public interface org.apache.tuscany.sca.contribution.Export extends org.apache.tuscany.sca.assembly.Extensible{ + public abstract org.apache.tuscany.sca.contribution.resolver.ModelResolver getModelResolver(); + public abstract void setModelResolver(org.apache.tuscany.sca.contribution.resolver.ModelResolver); +} + +Compiled from "Import.java" +public interface org.apache.tuscany.sca.contribution.Import extends org.apache.tuscany.sca.assembly.Extensible{ + public abstract org.apache.tuscany.sca.contribution.resolver.ModelResolver getModelResolver(); + public abstract void setModelResolver(org.apache.tuscany.sca.contribution.resolver.ModelResolver); + public abstract boolean match(org.apache.tuscany.sca.contribution.Export); +} + +Compiled from "PackageType.java" +public interface org.apache.tuscany.sca.contribution.PackageType{ + public static final java.lang.String JAR; + public static final java.lang.String ZIP; + public static final java.lang.String FOLDER; + public static final java.lang.String BUNDLE; + public static final java.lang.String WAR; + public static final java.lang.String EAR; +} + +Compiled from "ArtifactProcessor.java" +public interface org.apache.tuscany.sca.contribution.processor.ArtifactProcessor{ + public abstract void resolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException; + public abstract java.lang.Class getModelType(); +} + +Compiled from "BaseStAXArtifactProcessor.java" +public abstract class org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor extends java.lang.Object{ + public org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor(); + protected javax.xml.namespace.QName getQNameValue(javax.xml.stream.XMLStreamReader, java.lang.String); + protected boolean getBoolean(javax.xml.stream.XMLStreamReader, java.lang.String); + protected javax.xml.namespace.QName getQName(javax.xml.stream.XMLStreamReader, java.lang.String); + protected java.util.List getQNames(javax.xml.stream.XMLStreamReader, java.lang.String); + protected java.lang.String getString(javax.xml.stream.XMLStreamReader, java.lang.String); + protected java.lang.String getURIString(javax.xml.stream.XMLStreamReader, java.lang.String); + protected boolean isSet(javax.xml.stream.XMLStreamReader, java.lang.String); + protected javax.xml.namespace.QName getXSIType(javax.xml.stream.XMLStreamReader); + protected boolean nextChildElement(javax.xml.stream.XMLStreamReader) throws javax.xml.stream.XMLStreamException; + protected void skipToEndElement(javax.xml.stream.XMLStreamReader) throws javax.xml.stream.XMLStreamException; + protected void writeStart(javax.xml.stream.XMLStreamWriter, java.lang.String, java.lang.String, org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor$XAttr[]) throws javax.xml.stream.XMLStreamException; + protected void writeStart(javax.xml.stream.XMLStreamWriter, javax.xml.namespace.QName, org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor$XAttr[]) throws javax.xml.stream.XMLStreamException; + protected void writeEnd(javax.xml.stream.XMLStreamWriter) throws javax.xml.stream.XMLStreamException; + protected void writeStartDocument(javax.xml.stream.XMLStreamWriter, java.lang.String, java.lang.String, org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor$XAttr[]) throws javax.xml.stream.XMLStreamException; + protected void writeStartDocument(javax.xml.stream.XMLStreamWriter, javax.xml.namespace.QName, org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor$XAttr[]) throws javax.xml.stream.XMLStreamException; + protected void writeEndDocument(javax.xml.stream.XMLStreamWriter) throws javax.xml.stream.XMLStreamException; + protected void writeAttributes(javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor$XAttr[]) throws javax.xml.stream.XMLStreamException; + protected void readExtendedAttributes(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.assembly.Extensible, org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor, org.apache.tuscany.sca.assembly.AssemblyFactory, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException; + protected void writeExtendedAttributes(javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.assembly.Extensible, org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException; + protected void readExtendedElement(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.assembly.Extensible, org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException; + protected void writeExtendedElements(javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.assembly.Extensible, org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException; + static org.apache.tuscany.sca.common.xml.stax.StAXHelper access$000(); + static {}; +} + +Compiled from "ContributionException.java" +public class org.apache.tuscany.sca.contribution.processor.ContributionException extends java.lang.Exception{ + protected org.apache.tuscany.sca.contribution.processor.ContributionException(); + protected org.apache.tuscany.sca.contribution.processor.ContributionException(java.lang.String); + protected org.apache.tuscany.sca.contribution.processor.ContributionException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.contribution.processor.ContributionException(java.lang.Throwable); +} + +Compiled from "ContributionReadException.java" +public class org.apache.tuscany.sca.contribution.processor.ContributionReadException extends org.apache.tuscany.sca.contribution.processor.ContributionException{ + public static final int UNDEFINED; + public org.apache.tuscany.sca.contribution.processor.ContributionReadException(java.lang.String); + public org.apache.tuscany.sca.contribution.processor.ContributionReadException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.contribution.processor.ContributionReadException(java.lang.Throwable); + public java.lang.String getResourceURI(); + public void setResourceURI(java.lang.String); + public int getLine(); + public void setLine(int); + public int getColumn(); + public void setColumn(int); +} + +Compiled from "ContributionResolveException.java" +public class org.apache.tuscany.sca.contribution.processor.ContributionResolveException extends org.apache.tuscany.sca.contribution.processor.ContributionException{ + public org.apache.tuscany.sca.contribution.processor.ContributionResolveException(java.lang.String); + public org.apache.tuscany.sca.contribution.processor.ContributionResolveException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.contribution.processor.ContributionResolveException(java.lang.Throwable); +} + +Compiled from "ContributionRuntimeException.java" +public class org.apache.tuscany.sca.contribution.processor.ContributionRuntimeException extends java.lang.RuntimeException{ + protected org.apache.tuscany.sca.contribution.processor.ContributionRuntimeException(); + protected org.apache.tuscany.sca.contribution.processor.ContributionRuntimeException(java.lang.String); + protected org.apache.tuscany.sca.contribution.processor.ContributionRuntimeException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.contribution.processor.ContributionRuntimeException(java.lang.Throwable); +} + +Compiled from "ContributionWriteException.java" +public class org.apache.tuscany.sca.contribution.processor.ContributionWriteException extends org.apache.tuscany.sca.contribution.processor.ContributionException{ + public org.apache.tuscany.sca.contribution.processor.ContributionWriteException(java.lang.String); + public org.apache.tuscany.sca.contribution.processor.ContributionWriteException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.contribution.processor.ContributionWriteException(java.lang.Throwable); + public java.lang.String getResourceURI(); + public void setResourceURI(java.lang.String); +} + +Compiled from "DefaultArtifactProcessorExtensionPoint.java" +abstract class org.apache.tuscany.sca.contribution.processor.DefaultArtifactProcessorExtensionPoint extends java.lang.Object{ + protected final java.util.Map processorsByArtifactType; + protected final java.util.Map processorsByModelType; + org.apache.tuscany.sca.contribution.processor.DefaultArtifactProcessorExtensionPoint(); + public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Object); + public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Class); +} + +Compiled from "DefaultStAXArtifactProcessorExtensionPoint.java" +public class org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint extends org.apache.tuscany.sca.contribution.processor.DefaultArtifactProcessorExtensionPoint implements org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint{ + public org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void addArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor); + public void removeArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor); + public org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor getProcessor(java.lang.Class); + public org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor getProcessor(java.lang.Object); + public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Class); + public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Object); +} + +Compiled from "DefaultStAXAttributeProcessorExtensionPoint.java" +public class org.apache.tuscany.sca.contribution.processor.DefaultStAXAttributeProcessorExtensionPoint extends org.apache.tuscany.sca.contribution.processor.DefaultArtifactProcessorExtensionPoint implements org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessorExtensionPoint{ + public org.apache.tuscany.sca.contribution.processor.DefaultStAXAttributeProcessorExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void addArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor); + public void removeArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor); + public org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor getProcessor(java.lang.Class); + public org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor getProcessor(java.lang.Object); + public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Class); + public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Object); +} + +Compiled from "DefaultURLArtifactProcessorExtensionPoint.java" +public class org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProcessorExtensionPoint extends org.apache.tuscany.sca.contribution.processor.DefaultArtifactProcessorExtensionPoint implements org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint{ + public org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProcessorExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void addArtifactProcessor(org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor); + public void removeArtifactProcessor(org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor); + public org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor getProcessor(java.lang.Class); + public java.util.Collection getProcessors(java.lang.Object); + public org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor getProcessor(java.lang.Object); + public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Class); + public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Object); +} + +Compiled from "DefaultValidatingXMLInputFactory.java" +public class org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory extends org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory implements org.w3c.dom.ls.LSResourceResolver{ + public static final javax.xml.namespace.QName XSD; + public org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory(javax.xml.stream.XMLInputFactory, org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint); + public javax.xml.stream.XMLEventReader createFilteredReader(javax.xml.stream.XMLEventReader, javax.xml.stream.EventFilter) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLStreamReader createFilteredReader(javax.xml.stream.XMLStreamReader, javax.xml.stream.StreamFilter) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLEventReader createXMLEventReader(java.io.InputStream, java.lang.String) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLEventReader createXMLEventReader(java.io.InputStream) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLEventReader createXMLEventReader(java.io.Reader) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLEventReader createXMLEventReader(javax.xml.transform.Source) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLEventReader createXMLEventReader(java.lang.String, java.io.InputStream) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLEventReader createXMLEventReader(java.lang.String, java.io.Reader) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLEventReader createXMLEventReader(javax.xml.stream.XMLStreamReader) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.io.InputStream, java.lang.String) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.io.InputStream) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.io.Reader) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLStreamReader createXMLStreamReader(javax.xml.transform.Source) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.lang.String, java.io.InputStream) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.lang.String, java.io.Reader) throws javax.xml.stream.XMLStreamException; + public javax.xml.stream.util.XMLEventAllocator getEventAllocator(); + public java.lang.Object getProperty(java.lang.String) throws java.lang.IllegalArgumentException; + public javax.xml.stream.XMLReporter getXMLReporter(); + public javax.xml.stream.XMLResolver getXMLResolver(); + public boolean isPropertySupported(java.lang.String); + public void setEventAllocator(javax.xml.stream.util.XMLEventAllocator); + public void setProperty(java.lang.String, java.lang.Object) throws java.lang.IllegalArgumentException; + public void setXMLReporter(javax.xml.stream.XMLReporter); + public void setXMLResolver(javax.xml.stream.XMLResolver); + public org.w3c.dom.ls.LSInput resolveResource(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String); + static {}; +} + +Compiled from "DefaultValidationSchemaExtensionPoint.java" +public class org.apache.tuscany.sca.contribution.processor.DefaultValidationSchemaExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint{ + public org.apache.tuscany.sca.contribution.processor.DefaultValidationSchemaExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry, java.util.Map); + public void addSchema(java.lang.String); + public void removeSchema(java.lang.String); + public java.util.List getSchemas(); + public boolean isEnabled(); + public void setEnabled(boolean); +} + +Compiled from "ExtendedArtifactProcessor.java" +public interface org.apache.tuscany.sca.contribution.processor.ExtendedArtifactProcessor extends org.apache.tuscany.sca.contribution.processor.ArtifactProcessor{ + public abstract void preResolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException; +} + +Compiled from "ExtendedURLArtifactProcessor.java" +public interface org.apache.tuscany.sca.contribution.processor.ExtendedURLArtifactProcessor extends org.apache.tuscany.sca.contribution.processor.ExtendedArtifactProcessor,org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor{ +} + +Compiled from "ExtensibleStAXArtifactProcessor.java" +public class org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor extends java.lang.Object implements org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor{ + public static final javax.xml.namespace.QName ANY_ELEMENT; + public org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint, javax.xml.stream.XMLInputFactory, javax.xml.stream.XMLOutputFactory); + public org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public java.lang.Object read(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException; + public void write(java.lang.Object, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException; + public void resolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException; + public java.lang.Object read(java.io.InputStream, java.lang.Class, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException; + public void write(java.lang.Object, java.io.OutputStream, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException; + public javax.xml.namespace.QName getArtifactType(); + public java.lang.Class getModelType(); + static {}; +} + +Compiled from "ExtensibleStAXAttributeProcessor.java" +public class org.apache.tuscany.sca.contribution.processor.ExtensibleStAXAttributeProcessor extends java.lang.Object implements org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor{ + public static final javax.xml.namespace.QName ANY_ATTRIBUTE; + public org.apache.tuscany.sca.contribution.processor.ExtensibleStAXAttributeProcessor(org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessorExtensionPoint, javax.xml.stream.XMLInputFactory, javax.xml.stream.XMLOutputFactory); + public java.lang.Object read(javax.xml.namespace.QName, javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException; + public void write(java.lang.Object, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException; + public void resolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException; + public java.lang.Object read(java.io.InputStream, java.lang.Class) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException; + public void write(java.lang.Object, java.io.OutputStream, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException; + public javax.xml.namespace.QName getArtifactType(); + public java.lang.Class getModelType(); + static {}; +} + +Compiled from "ExtensibleURLArtifactProcessor.java" +public class org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor extends java.lang.Object implements org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor{ + public org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor(org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint); + public java.lang.Object read(java.net.URL, java.net.URI, java.net.URL, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException; + public void resolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException; + public java.lang.Object read(java.net.URL, java.net.URI, java.net.URL, org.apache.tuscany.sca.contribution.processor.ProcessorContext, java.lang.Class) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException; + public java.lang.String getArtifactType(); + public java.lang.Class getModelType(); +} + +Compiled from "ProcessorContext.java" +public class org.apache.tuscany.sca.contribution.processor.ProcessorContext extends java.lang.Object{ + protected org.apache.tuscany.sca.contribution.Contribution contribution; + protected org.apache.tuscany.sca.contribution.Artifact artifact; + protected org.apache.tuscany.sca.monitor.Monitor monitor; + protected java.lang.Object parentModel; + public org.apache.tuscany.sca.contribution.processor.ProcessorContext(org.apache.tuscany.sca.contribution.Contribution, org.apache.tuscany.sca.monitor.Monitor); + public org.apache.tuscany.sca.contribution.processor.ProcessorContext(org.apache.tuscany.sca.monitor.Monitor); + public org.apache.tuscany.sca.contribution.processor.ProcessorContext(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.apache.tuscany.sca.contribution.processor.ProcessorContext(); + public org.apache.tuscany.sca.contribution.Contribution getContribution(); + public org.apache.tuscany.sca.contribution.Contribution setContribution(org.apache.tuscany.sca.contribution.Contribution); + public org.apache.tuscany.sca.monitor.Monitor getMonitor(); + public org.apache.tuscany.sca.monitor.Monitor setMonitor(org.apache.tuscany.sca.monitor.Monitor); + public java.lang.Object getParentModel(); + public java.lang.Object setParentModel(java.lang.Object); + public org.apache.tuscany.sca.contribution.Artifact getArtifact(); + public org.apache.tuscany.sca.contribution.Artifact setArtifact(org.apache.tuscany.sca.contribution.Artifact); +} + +Compiled from "StAXArtifactProcessor.java" +public interface org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor extends org.apache.tuscany.sca.contribution.processor.ArtifactProcessor{ + public abstract java.lang.Object read(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException; + public abstract void write(java.lang.Object, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException; + public abstract javax.xml.namespace.QName getArtifactType(); +} + +Compiled from "StAXArtifactProcessorExtensionPoint.java" +public interface org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint{ + public abstract void addArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor); + public abstract void removeArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor); + public abstract org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor getProcessor(java.lang.Object); + public abstract org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor getProcessor(java.lang.Class); +} + +Compiled from "StAXAttributeProcessor.java" +public interface org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor extends org.apache.tuscany.sca.contribution.processor.ArtifactProcessor{ + public abstract java.lang.Object read(javax.xml.namespace.QName, javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException; + public abstract void write(java.lang.Object, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException; + public abstract javax.xml.namespace.QName getArtifactType(); +} + +Compiled from "StAXAttributeProcessorExtensionPoint.java" +public interface org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessorExtensionPoint{ + public abstract void addArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor); + public abstract void removeArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor); + public abstract org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor getProcessor(java.lang.Object); + public abstract org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor getProcessor(java.lang.Class); +} + +Compiled from "URLArtifactProcessor.java" +public interface org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor extends org.apache.tuscany.sca.contribution.processor.ArtifactProcessor{ + public abstract java.lang.Object read(java.net.URL, java.net.URI, java.net.URL, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException; + public abstract java.lang.String getArtifactType(); +} + +Compiled from "URLArtifactProcessorExtensionPoint.java" +public interface org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint{ + public abstract void addArtifactProcessor(org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor); + public abstract void removeArtifactProcessor(org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor); + public abstract org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor getProcessor(java.lang.Object); + public abstract org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor getProcessor(java.lang.Class); + public abstract java.util.Collection getProcessors(java.lang.Object); +} + +Compiled from "UnrecognizedElementException.java" +public class org.apache.tuscany.sca.contribution.processor.UnrecognizedElementException extends org.apache.tuscany.sca.contribution.processor.ContributionReadException{ + public org.apache.tuscany.sca.contribution.processor.UnrecognizedElementException(javax.xml.namespace.QName); + public javax.xml.namespace.QName getElement(); +} + +Compiled from "UnsupportedContentTypeException.java" +public class org.apache.tuscany.sca.contribution.processor.UnsupportedContentTypeException extends org.apache.tuscany.sca.contribution.processor.ContributionException{ + public org.apache.tuscany.sca.contribution.processor.UnsupportedContentTypeException(java.lang.String); +} + +Compiled from "UnsupportedPackageTypeException.java" +public class org.apache.tuscany.sca.contribution.processor.UnsupportedPackageTypeException extends org.apache.tuscany.sca.contribution.processor.ContributionException{ + public org.apache.tuscany.sca.contribution.processor.UnsupportedPackageTypeException(java.lang.String); +} + +Compiled from "ValidatingXMLInputFactory.java" +public abstract class org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory extends javax.xml.stream.XMLInputFactory{ + public org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory(); + public static void setMonitor(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.monitor.Monitor); +} + +Compiled from "ValidatingXMLStreamReader.java" +class org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader extends javax.xml.stream.util.StreamReaderDelegate implements javax.xml.stream.XMLStreamReader{ + org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader(javax.xml.stream.XMLStreamReader, javax.xml.validation.Schema, org.apache.tuscany.sca.monitor.Monitor) throws javax.xml.stream.XMLStreamException; + void setMonitor(org.apache.tuscany.sca.monitor.Monitor); + public int next() throws javax.xml.stream.XMLStreamException; + public int nextTag() throws javax.xml.stream.XMLStreamException; + public java.lang.String getElementText() throws javax.xml.stream.XMLStreamException; + public javax.xml.namespace.NamespaceContext getNamespaceContext(); + static org.apache.tuscany.sca.monitor.Monitor access$100(org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader); + static java.util.logging.Logger access$200(); + static void access$300(org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader, java.lang.String, java.lang.Object, java.lang.Object[]); + static void access$400(org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader, java.lang.String, java.lang.Object, java.lang.Object[]); + static {}; +} + +Compiled from "ValidationSchemaExtensionPoint.java" +public interface org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint{ + public abstract void setEnabled(boolean); + public abstract boolean isEnabled(); + public abstract void addSchema(java.lang.String); + public abstract void removeSchema(java.lang.String); + public abstract java.util.List getSchemas(); +} + +Compiled from "ClassReference.java" +public class org.apache.tuscany.sca.contribution.resolver.ClassReference extends java.lang.Object implements org.apache.tuscany.sca.assembly.Base{ + public org.apache.tuscany.sca.contribution.resolver.ClassReference(java.lang.Class); + public org.apache.tuscany.sca.contribution.resolver.ClassReference(java.lang.String); + public java.lang.Class getJavaClass(); + public java.lang.String getClassName(); + public boolean isUnresolved(); + public void setUnresolved(boolean); + public int hashCode(); + public boolean equals(java.lang.Object); + public org.apache.tuscany.sca.contribution.Contribution getContributionContainingClass(); + public void setContributionContainingClass(org.apache.tuscany.sca.contribution.Contribution); +} + +Compiled from "DefaultDelegatingModelResolver.java" +public class org.apache.tuscany.sca.contribution.resolver.DefaultDelegatingModelResolver extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolver{ + public org.apache.tuscany.sca.contribution.resolver.DefaultDelegatingModelResolver(java.util.List); + public void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); +} + +Compiled from "DefaultImportAllModelResolver.java" +public class org.apache.tuscany.sca.contribution.resolver.DefaultImportAllModelResolver extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolver{ + public org.apache.tuscany.sca.contribution.resolver.DefaultImportAllModelResolver(org.apache.tuscany.sca.contribution.Import, java.util.List); + public void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); +} + +Compiled from "DefaultImportModelResolver.java" +public class org.apache.tuscany.sca.contribution.resolver.DefaultImportModelResolver extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolver{ + public org.apache.tuscany.sca.contribution.resolver.DefaultImportModelResolver(java.util.List); + public void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); +} + +Compiled from "DefaultModelResolver.java" +public class org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolver{ + public org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver(); + public org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver(org.apache.tuscany.sca.contribution.Contribution, org.apache.tuscany.sca.core.FactoryExtensionPoint); + public java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public java.util.Map getModels(); +} + +Compiled from "DefaultModelResolverExtensionPoint.java" +public class org.apache.tuscany.sca.contribution.resolver.DefaultModelResolverExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint{ + public org.apache.tuscany.sca.contribution.resolver.DefaultModelResolverExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void addResolver(java.lang.Class, java.lang.Class); + public void removeResolver(java.lang.Class); + public java.lang.Class getResolver(java.lang.Class); +} + +Compiled from "ExtensibleModelResolver.java" +public class org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolver{ + public org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver(org.apache.tuscany.sca.contribution.Contribution, org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint, org.apache.tuscany.sca.core.FactoryExtensionPoint); + public void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public org.apache.tuscany.sca.contribution.resolver.ModelResolver getDefaultModelResolver(); +} + +Compiled from "ModelResolver.java" +public interface org.apache.tuscany.sca.contribution.resolver.ModelResolver{ + public abstract java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public abstract void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public abstract java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); +} + +Compiled from "ModelResolverExtensionPoint.java" +public interface org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint{ + public abstract void addResolver(java.lang.Class, java.lang.Class); + public abstract void removeResolver(java.lang.Class); + public abstract java.lang.Class getResolver(java.lang.Class); +} + +Compiled from "ResolverExtension.java" +public interface org.apache.tuscany.sca.contribution.resolver.ResolverExtension{ + public abstract org.apache.tuscany.sca.contribution.resolver.ModelResolver getModelResolver(); + public abstract void setModelResolver(org.apache.tuscany.sca.contribution.resolver.ModelResolver); +} + +Compiled from "ResourceReference.java" +public class org.apache.tuscany.sca.contribution.resolver.ResourceReference extends java.lang.Object{ + public org.apache.tuscany.sca.contribution.resolver.ResourceReference(java.lang.String, java.net.URL); + public org.apache.tuscany.sca.contribution.resolver.ResourceReference(java.lang.String); + public java.net.URL getResource(); + public java.lang.String getResourceName(); + public boolean isUnresolved(); + public int hashCode(); + public boolean equals(java.lang.Object); +} + +Compiled from "ComponentContextFactory.java" +public interface org.apache.tuscany.sca.context.ComponentContextFactory{ + public abstract org.oasisopen.sca.ComponentContext createComponentContext(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent); +} + +Compiled from "CompositeContext.java" +public class org.apache.tuscany.sca.context.CompositeContext extends java.lang.Object{ + protected org.apache.tuscany.sca.core.ExtensionPointRegistry extensionPointRegistry; + protected org.apache.tuscany.sca.runtime.EndpointRegistry endpointRegistry; + protected org.apache.tuscany.sca.context.ComponentContextFactory componentContextFactory; + protected org.apache.tuscany.sca.assembly.Composite domainComposite; + protected java.lang.String nodeURI; + protected java.lang.String domainURI; + protected org.apache.tuscany.sca.definitions.Definitions systemDefinitions; + public org.apache.tuscany.sca.context.CompositeContext(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.runtime.EndpointRegistry, org.apache.tuscany.sca.assembly.Composite, java.lang.String, java.lang.String, org.apache.tuscany.sca.definitions.Definitions); + public org.apache.tuscany.sca.context.CompositeContext(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.runtime.EndpointRegistry); + public static org.apache.tuscany.sca.runtime.RuntimeComponent getCurrentComponent(); + public static org.apache.tuscany.sca.context.CompositeContext getCurrentCompositeContext(); + public void bindComponent(org.apache.tuscany.sca.runtime.RuntimeComponent); + public void bindEndpointReference(org.apache.tuscany.sca.assembly.EndpointReference); + public org.apache.tuscany.sca.core.ExtensionPointRegistry getExtensionPointRegistry(); + public org.apache.tuscany.sca.runtime.EndpointRegistry getEndpointRegistry(); + public org.apache.tuscany.sca.assembly.Composite getDomainComposite(); + public java.lang.String getNodeURI(); + public java.lang.String getDomainURI(); + public org.apache.tuscany.sca.definitions.Definitions getSystemDefinitions(); +} + +Compiled from "ContextFactoryExtensionPoint.java" +public interface org.apache.tuscany.sca.context.ContextFactoryExtensionPoint{ + public abstract void addFactory(java.lang.Object); + public abstract void removeFactory(java.lang.Object); + public abstract java.lang.Object getFactory(java.lang.Class); +} + +Compiled from "DefaultContextFactoryExtensionPoint.java" +public class org.apache.tuscany.sca.context.DefaultContextFactoryExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.context.ContextFactoryExtensionPoint{ + public org.apache.tuscany.sca.context.DefaultContextFactoryExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void addFactory(java.lang.Object) throws java.lang.IllegalArgumentException; + public void removeFactory(java.lang.Object) throws java.lang.IllegalArgumentException; + public java.lang.Object getFactory(java.lang.Class) throws java.lang.IllegalArgumentException; +} + +Compiled from "PropertyValueFactory.java" +public interface org.apache.tuscany.sca.context.PropertyValueFactory{ + public abstract java.lang.Object createPropertyValue(org.apache.tuscany.sca.assembly.ComponentProperty, java.lang.Class); +} + +Compiled from "RequestContextFactory.java" +public interface org.apache.tuscany.sca.context.RequestContextFactory{ + public abstract org.oasisopen.sca.RequestContext createRequestContext(org.apache.tuscany.sca.runtime.RuntimeComponent); +} + +Compiled from "ThreadMessageContext.java" +public final class org.apache.tuscany.sca.context.ThreadMessageContext extends java.lang.Object{ + public static org.apache.tuscany.sca.invocation.Message setMessageContext(org.apache.tuscany.sca.invocation.Message); + public static org.apache.tuscany.sca.invocation.Message getMessageContext(); + public static void removeMessageContext(); + static {}; +} + +Compiled from "DataExchangeSemantics.java" +public interface org.apache.tuscany.sca.invocation.DataExchangeSemantics{ + public abstract boolean allowsPassByReference(); +} + +Compiled from "Interceptor.java" +public interface org.apache.tuscany.sca.invocation.Interceptor extends org.apache.tuscany.sca.invocation.Invoker{ + public abstract void setNext(org.apache.tuscany.sca.invocation.Invoker); + public abstract org.apache.tuscany.sca.invocation.Invoker getNext(); +} + +Compiled from "InterceptorAsync.java" +public interface org.apache.tuscany.sca.invocation.InterceptorAsync extends org.apache.tuscany.sca.invocation.Interceptor,org.apache.tuscany.sca.invocation.InvokerAsyncRequest,org.apache.tuscany.sca.invocation.InvokerAsyncResponse{ + public abstract void setPrevious(org.apache.tuscany.sca.invocation.InvokerAsyncResponse); + public abstract org.apache.tuscany.sca.invocation.InvokerAsyncResponse getPrevious(); + public abstract org.apache.tuscany.sca.invocation.Message processRequest(org.apache.tuscany.sca.invocation.Message); + public abstract org.apache.tuscany.sca.invocation.Message postProcessRequest(org.apache.tuscany.sca.invocation.Message); + public abstract org.apache.tuscany.sca.invocation.Message postProcessRequest(org.apache.tuscany.sca.invocation.Message, java.lang.Throwable) throws java.lang.Throwable; + public abstract org.apache.tuscany.sca.invocation.Message processResponse(org.apache.tuscany.sca.invocation.Message); +} + +Compiled from "InvocationChain.java" +public interface org.apache.tuscany.sca.invocation.InvocationChain{ + public abstract org.apache.tuscany.sca.interfacedef.Operation getTargetOperation(); + public abstract void setTargetOperation(org.apache.tuscany.sca.interfacedef.Operation); + public abstract org.apache.tuscany.sca.interfacedef.Operation getSourceOperation(); + public abstract void setSourceOperation(org.apache.tuscany.sca.interfacedef.Operation); + public abstract void addInterceptor(org.apache.tuscany.sca.invocation.Interceptor); + public abstract void addInterceptor(java.lang.String, org.apache.tuscany.sca.invocation.Interceptor); + public abstract void addHeadInterceptor(org.apache.tuscany.sca.invocation.Interceptor); + public abstract void addHeadInterceptor(java.lang.String, org.apache.tuscany.sca.invocation.Interceptor); + public abstract void addInvoker(org.apache.tuscany.sca.invocation.Invoker); + public abstract org.apache.tuscany.sca.invocation.Invoker getHeadInvoker(); + public abstract org.apache.tuscany.sca.invocation.Invoker getTailInvoker(); + public abstract org.apache.tuscany.sca.invocation.Invoker getHeadInvoker(java.lang.String); + public abstract boolean allowsPassByReference(); + public abstract void setAllowsPassByReference(boolean); + public abstract boolean isAsyncInvocation(); +} + +Compiled from "Invoker.java" +public interface org.apache.tuscany.sca.invocation.Invoker{ + public abstract org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message); +} + +Compiled from "InvokerAsyncRequest.java" +public interface org.apache.tuscany.sca.invocation.InvokerAsyncRequest{ + public abstract void invokeAsyncRequest(org.apache.tuscany.sca.invocation.Message) throws java.lang.Throwable; +} + +Compiled from "InvokerAsyncResponse.java" +public interface org.apache.tuscany.sca.invocation.InvokerAsyncResponse{ + public abstract void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message); +} + +Compiled from "Message.java" +public interface org.apache.tuscany.sca.invocation.Message{ + public abstract java.lang.Object getBody(); + public abstract void setBody(java.lang.Object); + public abstract org.apache.tuscany.sca.assembly.EndpointReference getFrom(); + public abstract void setFrom(org.apache.tuscany.sca.assembly.EndpointReference); + public abstract org.apache.tuscany.sca.assembly.Endpoint getTo(); + public abstract void setTo(org.apache.tuscany.sca.assembly.Endpoint); + public abstract java.lang.Object getMessageID(); + public abstract void setMessageID(java.lang.Object); + public abstract boolean isFault(); + public abstract void setFaultBody(java.lang.Object); + public abstract org.apache.tuscany.sca.interfacedef.Operation getOperation(); + public abstract void setOperation(org.apache.tuscany.sca.interfacedef.Operation); + public abstract java.util.Map getHeaders(); + public abstract java.lang.Object getBindingContext(); + public abstract void setBindingContext(java.lang.Object); +} + +Compiled from "MessageFactory.java" +public interface org.apache.tuscany.sca.invocation.MessageFactory{ + public abstract org.apache.tuscany.sca.invocation.Message createMessage(); +} + +Compiled from "Phase.java" +public interface org.apache.tuscany.sca.invocation.Phase{ + public static final java.lang.String REFERENCE; + public static final java.lang.String REFERENCE_INTERFACE; + public static final java.lang.String REFERENCE_POLICY; + public static final java.lang.String REFERENCE_BINDING; + public static final java.lang.String REFERENCE_BINDING_WIREFORMAT; + public static final java.lang.String REFERENCE_BINDING_POLICY; + public static final java.lang.String REFERENCE_BINDING_TRANSPORT; + public static final java.lang.String SERVICE_BINDING_TRANSPORT; + public static final java.lang.String SERVICE_BINDING_OPERATION_SELECTOR; + public static final java.lang.String SERVICE_BINDING_WIREFORMAT; + public static final java.lang.String SERVICE_BINDING_POLICY; + public static final java.lang.String SERVICE_BINDING; + public static final java.lang.String SERVICE_INTERFACE; + public static final java.lang.String SERVICE_POLICY; + public static final java.lang.String SERVICE; + public static final java.lang.String IMPLEMENTATION_POLICY; + public static final java.lang.String IMPLEMENTATION; +} + +Compiled from "PhasedInterceptor.java" +public interface org.apache.tuscany.sca.invocation.PhasedInterceptor extends org.apache.tuscany.sca.invocation.Interceptor{ + public abstract java.lang.String getPhase(); +} + +Compiled from "BaseBindingImpl.java" +public abstract class org.apache.tuscany.sca.provider.BaseBindingImpl extends java.lang.Object implements org.apache.tuscany.sca.assembly.Binding{ + public org.apache.tuscany.sca.provider.BaseBindingImpl(); + public java.lang.String getName(); + public java.lang.String getURI(); + public void setURI(java.lang.String); + public void setName(java.lang.String); + public java.lang.Object clone() throws java.lang.CloneNotSupportedException; + public boolean isUnresolved(); + public void setUnresolved(boolean); + public abstract javax.xml.namespace.QName getType(); + public org.apache.tuscany.sca.assembly.WireFormat getRequestWireFormat(); + public void setRequestWireFormat(org.apache.tuscany.sca.assembly.WireFormat); + public org.apache.tuscany.sca.assembly.WireFormat getResponseWireFormat(); + public void setResponseWireFormat(org.apache.tuscany.sca.assembly.WireFormat); + public org.apache.tuscany.sca.assembly.OperationSelector getOperationSelector(); + public void setOperationSelector(org.apache.tuscany.sca.assembly.OperationSelector); +} + +Compiled from "BasePolicyProvider.java" +public abstract class org.apache.tuscany.sca.provider.BasePolicyProvider extends java.lang.Object implements org.apache.tuscany.sca.provider.PolicyProvider{ + protected java.lang.Class policyType; + protected org.apache.tuscany.sca.policy.PolicySubject subject; + protected org.apache.tuscany.sca.provider.BasePolicyProvider(java.lang.Class, org.apache.tuscany.sca.policy.PolicySubject); + protected java.util.List findPolicies(); + protected java.util.List findPolicySets(); + protected org.apache.tuscany.sca.policy.PolicySet findPolicySet(); + protected java.lang.String getContext(); + public void start(); + public void stop(); + public org.apache.tuscany.sca.invocation.PhasedInterceptor createInterceptor(org.apache.tuscany.sca.interfacedef.Operation); + public org.apache.tuscany.sca.invocation.PhasedInterceptor createBindingInterceptor(); + public void configureBinding(java.lang.Object); + protected org.apache.tuscany.sca.invocation.InvocationChain getInvocationChain(); + protected void configure(org.apache.tuscany.sca.invocation.InvocationChain, org.apache.tuscany.sca.interfacedef.Operation); +} + +Compiled from "BindingPolicyProvider.java" +public interface org.apache.tuscany.sca.provider.BindingPolicyProvider extends org.apache.tuscany.sca.provider.PolicyProvider{ + public abstract org.apache.tuscany.sca.invocation.PhasedInterceptor createBindingInterceptor(); +} + +Compiled from "BindingProviderFactory.java" +public interface org.apache.tuscany.sca.provider.BindingProviderFactory extends org.apache.tuscany.sca.provider.ProviderFactory{ + public abstract org.apache.tuscany.sca.provider.ReferenceBindingProvider createReferenceBindingProvider(org.apache.tuscany.sca.runtime.RuntimeEndpointReference); + public abstract org.apache.tuscany.sca.provider.ServiceBindingProvider createServiceBindingProvider(org.apache.tuscany.sca.runtime.RuntimeEndpoint); +} + +Compiled from "DefaultProviderFactoryExtensionPoint.java" +public class org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint{ + public org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void addProviderFactory(org.apache.tuscany.sca.provider.ProviderFactory); + public void removeProviderFactory(org.apache.tuscany.sca.provider.ProviderFactory); + public org.apache.tuscany.sca.provider.ProviderFactory getProviderFactory(java.lang.Class); + public java.util.List getPolicyProviderFactories(); + public java.util.Collection getProviderFactories(java.lang.Class); +} + +Compiled from "EndpointAsyncProvider.java" +public interface org.apache.tuscany.sca.provider.EndpointAsyncProvider extends org.apache.tuscany.sca.provider.EndpointProvider{ + public abstract boolean supportsNativeAsync(); + public abstract org.apache.tuscany.sca.invocation.InvokerAsyncResponse createAsyncResponseInvoker(); +} + +Compiled from "EndpointProvider.java" +public interface org.apache.tuscany.sca.provider.EndpointProvider extends org.apache.tuscany.sca.provider.ServiceBindingProvider{ + public abstract void configure(); +} + +Compiled from "EndpointReferenceAsyncProvider.java" +public interface org.apache.tuscany.sca.provider.EndpointReferenceAsyncProvider extends org.apache.tuscany.sca.provider.EndpointReferenceProvider{ + public abstract boolean supportsNativeAsync(); +} + +Compiled from "EndpointReferenceProvider.java" +public interface org.apache.tuscany.sca.provider.EndpointReferenceProvider extends org.apache.tuscany.sca.provider.ReferenceBindingProvider{ + public abstract void configure(); +} + +Compiled from "ImplementationAsyncProvider.java" +public interface org.apache.tuscany.sca.provider.ImplementationAsyncProvider extends org.apache.tuscany.sca.provider.ImplementationProvider{ + public abstract org.apache.tuscany.sca.invocation.InvokerAsyncRequest createAsyncInvoker(org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.interfacedef.Operation); + public abstract org.apache.tuscany.sca.invocation.InvokerAsyncResponse createAsyncResponseInvoker(org.apache.tuscany.sca.interfacedef.Operation); +} + +Compiled from "ImplementationProvider.java" +public interface org.apache.tuscany.sca.provider.ImplementationProvider extends org.apache.tuscany.sca.provider.RuntimeProvider{ + public abstract org.apache.tuscany.sca.invocation.Invoker createInvoker(org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.interfacedef.Operation); + public abstract boolean supportsOneWayInvocation(); +} + +Compiled from "ImplementationProviderFactory.java" +public interface org.apache.tuscany.sca.provider.ImplementationProviderFactory extends org.apache.tuscany.sca.provider.ProviderFactory{ + public abstract org.apache.tuscany.sca.provider.ImplementationProvider createImplementationProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.assembly.Implementation); +} + +Compiled from "OperationSelectorProvider.java" +public interface org.apache.tuscany.sca.provider.OperationSelectorProvider{ + public abstract org.apache.tuscany.sca.invocation.Interceptor createInterceptor(); + public abstract java.lang.String getPhase(); +} + +Compiled from "OperationSelectorProviderFactory.java" +public interface org.apache.tuscany.sca.provider.OperationSelectorProviderFactory extends org.apache.tuscany.sca.provider.ProviderFactory{ + public abstract org.apache.tuscany.sca.provider.OperationSelectorProvider createReferenceOperationSelectorProvider(org.apache.tuscany.sca.runtime.RuntimeEndpointReference); + public abstract org.apache.tuscany.sca.provider.OperationSelectorProvider createServiceOperationSelectorProvider(org.apache.tuscany.sca.runtime.RuntimeEndpoint); +} + +Compiled from "OptimisingBindingProvider.java" +public interface org.apache.tuscany.sca.provider.OptimisingBindingProvider{ + public abstract void optimiseBinding(org.apache.tuscany.sca.runtime.RuntimeEndpoint); +} + +Compiled from "PolicyImplementor.java" +public interface org.apache.tuscany.sca.provider.PolicyImplementor{ + public abstract java.util.List getImplementedPolicies(); +} + +Compiled from "PolicyProvider.java" +public interface org.apache.tuscany.sca.provider.PolicyProvider extends org.apache.tuscany.sca.provider.RuntimeProvider{ + public abstract org.apache.tuscany.sca.invocation.PhasedInterceptor createInterceptor(org.apache.tuscany.sca.interfacedef.Operation); + public abstract org.apache.tuscany.sca.invocation.PhasedInterceptor createBindingInterceptor(); + public abstract void configureBinding(java.lang.Object); +} + +Compiled from "PolicyProviderFactory.java" +public interface org.apache.tuscany.sca.provider.PolicyProviderFactory extends org.apache.tuscany.sca.provider.ProviderFactory{ + public abstract org.apache.tuscany.sca.provider.PolicyProvider createReferencePolicyProvider(org.apache.tuscany.sca.assembly.EndpointReference); + public abstract org.apache.tuscany.sca.provider.PolicyProvider createServicePolicyProvider(org.apache.tuscany.sca.assembly.Endpoint); + public abstract org.apache.tuscany.sca.provider.PolicyProvider createImplementationPolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent); +} + +Compiled from "ProviderFactory.java" +public interface org.apache.tuscany.sca.provider.ProviderFactory{ + public abstract java.lang.Class getModelType(); +} + +Compiled from "ProviderFactoryExtensionPoint.java" +public interface org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint{ + public abstract void addProviderFactory(org.apache.tuscany.sca.provider.ProviderFactory); + public abstract void removeProviderFactory(org.apache.tuscany.sca.provider.ProviderFactory); + public abstract org.apache.tuscany.sca.provider.ProviderFactory getProviderFactory(java.lang.Class); + public abstract java.util.List getPolicyProviderFactories(); + public abstract java.util.Collection getProviderFactories(java.lang.Class); +} + +Compiled from "ReferenceBindingProvider.java" +public interface org.apache.tuscany.sca.provider.ReferenceBindingProvider extends org.apache.tuscany.sca.provider.RuntimeProvider{ + public abstract org.apache.tuscany.sca.invocation.Invoker createInvoker(org.apache.tuscany.sca.interfacedef.Operation); + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getBindingInterfaceContract(); + public abstract boolean supportsOneWayInvocation(); +} + +Compiled from "RuntimeProvider.java" +public interface org.apache.tuscany.sca.provider.RuntimeProvider{ + public abstract void start(); + public abstract void stop(); +} + +Compiled from "ServiceBindingProvider.java" +public interface org.apache.tuscany.sca.provider.ServiceBindingProvider extends org.apache.tuscany.sca.provider.RuntimeProvider{ + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getBindingInterfaceContract(); + public abstract boolean supportsOneWayInvocation(); +} + +Compiled from "WireFormatProvider.java" +public interface org.apache.tuscany.sca.provider.WireFormatProvider{ + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract configureWireFormatInterfaceContract(org.apache.tuscany.sca.interfacedef.InterfaceContract); + public abstract org.apache.tuscany.sca.invocation.Interceptor createInterceptor(); + public abstract java.lang.String getPhase(); +} + +Compiled from "WireFormatProviderFactory.java" +public interface org.apache.tuscany.sca.provider.WireFormatProviderFactory extends org.apache.tuscany.sca.provider.ProviderFactory{ + public abstract org.apache.tuscany.sca.provider.WireFormatProvider createReferenceWireFormatProvider(org.apache.tuscany.sca.runtime.RuntimeEndpointReference); + public abstract org.apache.tuscany.sca.provider.WireFormatProvider createServiceWireFormatProvider(org.apache.tuscany.sca.runtime.RuntimeEndpoint); +} + +Compiled from "ActivationException.java" +public class org.apache.tuscany.sca.runtime.ActivationException extends java.lang.Exception{ + public org.apache.tuscany.sca.runtime.ActivationException(java.lang.String); + public org.apache.tuscany.sca.runtime.ActivationException(java.lang.Throwable); +} + +Compiled from "BaseDomainRegistryFactory.java" +public abstract class org.apache.tuscany.sca.runtime.BaseDomainRegistryFactory extends java.lang.Object implements org.apache.tuscany.sca.runtime.DomainRegistryFactory,org.apache.tuscany.sca.core.LifeCycleListener{ + protected org.apache.tuscany.sca.core.ExtensionPointRegistry registry; + protected java.util.Map endpointRegistries; + protected java.util.List listeners; + public org.apache.tuscany.sca.runtime.BaseDomainRegistryFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void start(); + public synchronized org.apache.tuscany.sca.runtime.EndpointRegistry getEndpointRegistry(java.lang.String, java.lang.String); + protected java.lang.Object getKey(java.lang.String, java.lang.String); + protected abstract org.apache.tuscany.sca.runtime.EndpointRegistry createEndpointRegistry(java.lang.String, java.lang.String); + public void stop(); + public synchronized java.util.Collection getEndpointRegistries(); + public synchronized void addListener(org.apache.tuscany.sca.runtime.EndpointListener); + public synchronized java.util.List getListeners(); + public synchronized void removeListener(org.apache.tuscany.sca.runtime.EndpointListener); +} + +Compiled from "BaseEndpointRegistry.java" +public abstract class org.apache.tuscany.sca.runtime.BaseEndpointRegistry extends java.lang.Object implements org.apache.tuscany.sca.runtime.EndpointRegistry,org.apache.tuscany.sca.core.LifeCycleListener{ + protected static final java.util.logging.Logger logger; + protected java.lang.String domainRegistryURI; + protected java.lang.String domainURI; + protected java.util.List endpointreferences; + protected java.util.List listeners; + protected org.apache.tuscany.sca.core.ExtensionPointRegistry registry; + protected java.util.Map attributes; + public org.apache.tuscany.sca.runtime.BaseEndpointRegistry(org.apache.tuscany.sca.core.ExtensionPointRegistry, java.util.Map, java.lang.String, java.lang.String); + public abstract void addEndpoint(org.apache.tuscany.sca.assembly.Endpoint); + public void addEndpointReference(org.apache.tuscany.sca.assembly.EndpointReference); + public void addListener(org.apache.tuscany.sca.runtime.EndpointListener); + protected void endpointAdded(org.apache.tuscany.sca.assembly.Endpoint); + protected void endpointRemoved(org.apache.tuscany.sca.assembly.Endpoint); + protected void endpointUpdated(org.apache.tuscany.sca.assembly.Endpoint, org.apache.tuscany.sca.assembly.Endpoint); + public java.util.List findEndpoint(org.apache.tuscany.sca.assembly.EndpointReference); + public abstract java.util.List findEndpoint(java.lang.String); + public java.util.List findEndpointReference(org.apache.tuscany.sca.assembly.Endpoint); + public java.util.List findEndpointReferences(java.lang.String); + public abstract org.apache.tuscany.sca.assembly.Endpoint getEndpoint(java.lang.String); + public java.util.List getEndpointReferences(); + public abstract java.util.Collection getEndpoints(); + public java.util.List getListeners(); + public abstract void removeEndpoint(org.apache.tuscany.sca.assembly.Endpoint); + public void removeEndpointReference(org.apache.tuscany.sca.assembly.EndpointReference); + public void removeListener(org.apache.tuscany.sca.runtime.EndpointListener); + public java.lang.String getDomainURI(); + static {}; +} + +Compiled from "CompositeActivator.java" +public interface org.apache.tuscany.sca.runtime.CompositeActivator{ + public abstract void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Composite) throws org.apache.tuscany.sca.runtime.ActivationException; + public abstract void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference); + public abstract void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService); + public abstract void deactivate(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference); + public abstract void deactivate(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService); + public abstract void deactivate(org.apache.tuscany.sca.assembly.Composite) throws org.apache.tuscany.sca.runtime.ActivationException; + public abstract void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference); + public abstract void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Component) throws org.apache.tuscany.sca.runtime.ActivationException; + public abstract void stop(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Component) throws org.apache.tuscany.sca.runtime.ActivationException; + public abstract void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Composite) throws org.apache.tuscany.sca.runtime.ActivationException; + public abstract void stop(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Composite) throws org.apache.tuscany.sca.runtime.ActivationException; + public abstract void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpoint); + public abstract void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpointReference); + public abstract void deactivate(org.apache.tuscany.sca.runtime.RuntimeEndpoint); + public abstract void deactivate(org.apache.tuscany.sca.runtime.RuntimeEndpointReference); + public abstract void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpoint); + public abstract void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpointReference); + public abstract void stop(org.apache.tuscany.sca.runtime.RuntimeEndpoint); + public abstract void stop(org.apache.tuscany.sca.runtime.RuntimeEndpointReference); +} + +Compiled from "DefaultDomainRegistryFactoryExtensionPoint.java" +public class org.apache.tuscany.sca.runtime.DefaultDomainRegistryFactoryExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.runtime.DomainRegistryFactoryExtensionPoint,org.apache.tuscany.sca.core.LifeCycleListener{ + public org.apache.tuscany.sca.runtime.DefaultDomainRegistryFactoryExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry, java.util.Map); + public void addDomainRegistryFactory(org.apache.tuscany.sca.runtime.DomainRegistryFactory); + public java.util.List getDomainRegistryFactories(); + public void removeDomainRegistryFactory(org.apache.tuscany.sca.runtime.DomainRegistryFactory); + public void start(); + public void stop(); + public java.util.Map getDomainRegistryMapping(); +} + +Compiled from "DefaultWireProcessorExtensionPoint.java" +public class org.apache.tuscany.sca.runtime.DefaultWireProcessorExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint,org.apache.tuscany.sca.core.LifeCycleListener{ + public org.apache.tuscany.sca.runtime.DefaultWireProcessorExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void addWireProcessor(org.apache.tuscany.sca.runtime.RuntimeWireProcessor); + public void removeWireProcessor(org.apache.tuscany.sca.runtime.RuntimeWireProcessor); + public java.util.List getWireProcessors(); + public void start(); + public void stop(); +} + +Compiled from "DomainRegistryFactory.java" +public interface org.apache.tuscany.sca.runtime.DomainRegistryFactory{ + public abstract org.apache.tuscany.sca.runtime.EndpointRegistry getEndpointRegistry(java.lang.String, java.lang.String); + public abstract java.util.Collection getEndpointRegistries(); + public abstract void addListener(org.apache.tuscany.sca.runtime.EndpointListener); + public abstract void removeListener(org.apache.tuscany.sca.runtime.EndpointListener); + public abstract java.lang.String[] getSupportedSchemes(); +} + +Compiled from "DomainRegistryFactoryExtensionPoint.java" +public interface org.apache.tuscany.sca.runtime.DomainRegistryFactoryExtensionPoint{ + public abstract java.util.Map getDomainRegistryMapping(); + public abstract void addDomainRegistryFactory(org.apache.tuscany.sca.runtime.DomainRegistryFactory); + public abstract void removeDomainRegistryFactory(org.apache.tuscany.sca.runtime.DomainRegistryFactory); + public abstract java.util.List getDomainRegistryFactories(); +} + +Compiled from "DomainRegistryURI.java" +public class org.apache.tuscany.sca.runtime.DomainRegistryURI extends java.lang.Object{ + public org.apache.tuscany.sca.runtime.DomainRegistryURI(java.lang.String); + public java.lang.String getDomainName(); + public java.lang.String getBindAddress(); + public int getListenPort(); + public java.lang.String getPassword(); + public boolean isMulticastDisabled(); + public java.lang.String getMulticastAddress(); + public int getMulticastPort(); + public java.util.List getRemotes(); + public java.lang.String toString(); +} + +Compiled from "EndpointListener.java" +public interface org.apache.tuscany.sca.runtime.EndpointListener extends java.util.EventListener{ + public abstract void endpointAdded(org.apache.tuscany.sca.assembly.Endpoint); + public abstract void endpointRemoved(org.apache.tuscany.sca.assembly.Endpoint); + public abstract void endpointUpdated(org.apache.tuscany.sca.assembly.Endpoint, org.apache.tuscany.sca.assembly.Endpoint); +} + +Compiled from "EndpointReferenceBinder.java" +public interface org.apache.tuscany.sca.runtime.EndpointReferenceBinder{ + public abstract void bindBuildTime(org.apache.tuscany.sca.runtime.EndpointRegistry, org.apache.tuscany.sca.assembly.EndpointReference, org.apache.tuscany.sca.assembly.builder.BuilderContext); + public abstract void bindRunTime(org.apache.tuscany.sca.runtime.EndpointRegistry, org.apache.tuscany.sca.assembly.EndpointReference); + public abstract boolean isOutOfDate(org.apache.tuscany.sca.runtime.EndpointRegistry, org.apache.tuscany.sca.assembly.EndpointReference); +} + +Compiled from "EndpointRegistry.java" +public interface org.apache.tuscany.sca.runtime.EndpointRegistry{ + public abstract void addEndpoint(org.apache.tuscany.sca.assembly.Endpoint); + public abstract void removeEndpoint(org.apache.tuscany.sca.assembly.Endpoint); + public abstract org.apache.tuscany.sca.assembly.Endpoint getEndpoint(java.lang.String); + public abstract java.util.Collection getEndpoints(); + public abstract java.util.List findEndpoint(java.lang.String); + public abstract java.util.List findEndpoint(org.apache.tuscany.sca.assembly.EndpointReference); + public abstract void addEndpointReference(org.apache.tuscany.sca.assembly.EndpointReference); + public abstract void removeEndpointReference(org.apache.tuscany.sca.assembly.EndpointReference); + public abstract java.util.List getEndpointReferences(); + public abstract java.util.List findEndpointReferences(java.lang.String); + public abstract void addListener(org.apache.tuscany.sca.runtime.EndpointListener); + public abstract void removeListener(org.apache.tuscany.sca.runtime.EndpointListener); + public abstract java.lang.String getDomainURI(); +} + +Compiled from "EndpointSerializer.java" +public interface org.apache.tuscany.sca.runtime.EndpointSerializer{ + public abstract org.apache.tuscany.sca.assembly.EndpointReference readEndpointReference(java.lang.String); + public abstract java.lang.String write(org.apache.tuscany.sca.assembly.EndpointReference); + public abstract org.apache.tuscany.sca.assembly.Endpoint readEndpoint(java.lang.String); + public abstract java.lang.String write(org.apache.tuscany.sca.assembly.Endpoint); +} + +Compiled from "ExtensibleDomainRegistryFactory.java" +public class org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory extends java.lang.Object implements org.apache.tuscany.sca.runtime.DomainRegistryFactory{ + public org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory(org.apache.tuscany.sca.runtime.DomainRegistryFactoryExtensionPoint); + public static org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory getInstance(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void addListener(org.apache.tuscany.sca.runtime.EndpointListener); + public java.util.Collection getEndpointRegistries(); + public org.apache.tuscany.sca.runtime.EndpointRegistry getEndpointRegistry(java.lang.String, java.lang.String); + public void removeListener(org.apache.tuscany.sca.runtime.EndpointListener); + public synchronized java.lang.String[] getSupportedSchemes(); +} + +Compiled from "Invocable.java" +public interface org.apache.tuscany.sca.runtime.Invocable{ + public abstract void bind(org.apache.tuscany.sca.context.CompositeContext); + public abstract void bind(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.runtime.EndpointRegistry); + public abstract org.apache.tuscany.sca.context.CompositeContext getCompositeContext(); + public abstract void unbind(); + public abstract org.apache.tuscany.sca.assembly.Component getComponent(); + public abstract org.apache.tuscany.sca.assembly.Contract getContract(); + public abstract org.apache.tuscany.sca.assembly.Binding getBinding(); + public abstract java.util.List getInvocationChains(); + public abstract org.apache.tuscany.sca.invocation.InvocationChain getInvocationChain(org.apache.tuscany.sca.interfacedef.Operation); + public abstract org.apache.tuscany.sca.invocation.InvocationChain getBindingInvocationChain(); + public abstract org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message); + public abstract java.lang.Object invoke(org.apache.tuscany.sca.interfacedef.Operation, java.lang.Object[]) throws java.lang.reflect.InvocationTargetException; + public abstract org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message); + public abstract void invokeAsync(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message); + public abstract void invokeAsync(org.apache.tuscany.sca.invocation.Message); + public abstract void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message); + public abstract java.util.List getPolicyProviders(); +} + +Compiled from "ReferenceParameters.java" +public interface org.apache.tuscany.sca.runtime.ReferenceParameters extends java.lang.Cloneable{ + public abstract java.lang.Object getCallbackID(); + public abstract void setCallbackID(java.lang.Object); + public abstract java.lang.Object getCallbackObjectID(); + public abstract void setCallbackObjectID(java.lang.Object); + public abstract org.apache.tuscany.sca.assembly.EndpointReference getCallbackReference(); + public abstract void setCallbackReference(org.apache.tuscany.sca.assembly.EndpointReference); + public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException; +} + +Compiled from "RuntimeComponent.java" +public interface org.apache.tuscany.sca.runtime.RuntimeComponent extends org.apache.tuscany.sca.assembly.Component{ + public abstract void setImplementationProvider(org.apache.tuscany.sca.provider.ImplementationProvider); + public abstract org.apache.tuscany.sca.provider.ImplementationProvider getImplementationProvider(); + public abstract org.apache.tuscany.sca.runtime.RuntimeComponentContext getComponentContext(); + public abstract void setComponentContext(org.apache.tuscany.sca.runtime.RuntimeComponentContext); + public abstract boolean isStarted(); + public abstract void setStarted(boolean); + public abstract void addPolicyProvider(org.apache.tuscany.sca.provider.PolicyProvider); + public abstract java.util.List getPolicyProviders(); + public abstract org.oasisopen.sca.ServiceReference getServiceReference(java.lang.Class, java.lang.String); +} + +Compiled from "RuntimeComponentContext.java" +public interface org.apache.tuscany.sca.runtime.RuntimeComponentContext extends org.oasisopen.sca.ComponentContext{ + public abstract org.oasisopen.sca.ServiceReference getServiceReference(java.lang.Class, org.apache.tuscany.sca.runtime.RuntimeEndpointReference); + public abstract org.oasisopen.sca.ServiceReference getServiceReference(java.lang.Class, org.apache.tuscany.sca.runtime.RuntimeEndpoint); + public abstract org.oasisopen.sca.ServiceReference createSelfReference(java.lang.Class, org.apache.tuscany.sca.assembly.ComponentService); + public abstract org.apache.tuscany.sca.core.ExtensionPointRegistry getExtensionPointRegistry(); + public abstract org.apache.tuscany.sca.context.CompositeContext getCompositeContext(); +} + +Compiled from "RuntimeComponentReference.java" +public interface org.apache.tuscany.sca.runtime.RuntimeComponentReference extends org.apache.tuscany.sca.assembly.ComponentReference{ + public abstract void setComponent(org.apache.tuscany.sca.runtime.RuntimeComponent); + public abstract org.apache.tuscany.sca.runtime.RuntimeComponent getComponent(); +} + +Compiled from "RuntimeComponentService.java" +public interface org.apache.tuscany.sca.runtime.RuntimeComponentService extends org.apache.tuscany.sca.assembly.ComponentService{ +} + +Compiled from "RuntimeEndpoint.java" +public interface org.apache.tuscany.sca.runtime.RuntimeEndpoint extends org.apache.tuscany.sca.assembly.Endpoint,org.apache.tuscany.sca.runtime.Invocable,java.io.Serializable{ + public abstract void setBindingProvider(org.apache.tuscany.sca.provider.ServiceBindingProvider); + public abstract org.apache.tuscany.sca.provider.ServiceBindingProvider getBindingProvider(); + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getBindingInterfaceContract(); + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getComponentTypeServiceInterfaceContract(); + public abstract void validateServiceInterfaceCompatibility(); + public abstract org.apache.tuscany.sca.context.CompositeContext getCompositeContext(); + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getGeneratedWSDLContract(org.apache.tuscany.sca.interfacedef.InterfaceContract); + public abstract void createAsyncServerCallback(); + public abstract org.apache.tuscany.sca.runtime.RuntimeEndpointReference getAsyncServerCallback(); +} + +Compiled from "RuntimeEndpointReference.java" +public interface org.apache.tuscany.sca.runtime.RuntimeEndpointReference extends org.apache.tuscany.sca.assembly.EndpointReference,org.apache.tuscany.sca.runtime.Invocable,java.io.Serializable{ + public abstract void setBindingProvider(org.apache.tuscany.sca.provider.ReferenceBindingProvider); + public abstract org.apache.tuscany.sca.provider.ReferenceBindingProvider getBindingProvider(); + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getBindingInterfaceContract(); + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getComponentTypeReferenceInterfaceContract(); + public abstract void validateReferenceInterfaceCompatibility(); + public abstract boolean isOutOfDate(); + public abstract void rebuild(); + public abstract boolean isStarted(); + public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getGeneratedWSDLContract(org.apache.tuscany.sca.interfacedef.InterfaceContract); + public abstract void createAsyncCallbackEndpoint(); +} + +Compiled from "RuntimeProperties.java" +public interface org.apache.tuscany.sca.runtime.RuntimeProperties{ + public static final java.lang.String QUIET_LOGGING; + public abstract java.util.Properties getProperties(); + public abstract void setProperties(java.util.Properties); +} + +Compiled from "RuntimeWireProcessor.java" +public interface org.apache.tuscany.sca.runtime.RuntimeWireProcessor{ + public abstract void process(org.apache.tuscany.sca.runtime.RuntimeEndpoint); + public abstract void process(org.apache.tuscany.sca.runtime.RuntimeEndpointReference); +} + +Compiled from "RuntimeWireProcessorExtensionPoint.java" +public interface org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint{ + public abstract void addWireProcessor(org.apache.tuscany.sca.runtime.RuntimeWireProcessor); + public abstract void removeWireProcessor(org.apache.tuscany.sca.runtime.RuntimeWireProcessor); + public abstract java.util.List getWireProcessors(); +} + +Compiled from "UnknownEndpointHandler.java" +public interface org.apache.tuscany.sca.runtime.UnknownEndpointHandler{ + public abstract org.apache.tuscany.sca.assembly.Binding handleUnknownEndpoint(org.apache.tuscany.sca.assembly.EndpointReference); +} + +Compiled from "Version.java" +public class org.apache.tuscany.sca.runtime.Version extends java.lang.Object{ + public static final java.lang.String VERSION; + public static final java.lang.String REVISION; + public static final java.lang.String BUILDTIME; + public org.apache.tuscany.sca.runtime.Version(); + public static java.lang.String getVersion(); + public static java.lang.String getRevsion(); + public static java.lang.String getBuildTime(); + static {}; +} + +Compiled from "NotificationListener.java" +public interface org.apache.tuscany.sca.work.NotificationListener{ + public abstract void workAccepted(java.lang.Runnable); + public abstract void workCompleted(java.lang.Runnable); + public abstract void workStarted(java.lang.Runnable); + public abstract void workRejected(java.lang.Runnable); + public abstract void workFailed(java.lang.Runnable, java.lang.Throwable); +} + +Compiled from "WorkScheduler.java" +public interface org.apache.tuscany.sca.work.WorkScheduler{ + public abstract void scheduleWork(java.lang.Runnable, org.apache.tuscany.sca.work.NotificationListener); + public abstract void scheduleWork(java.lang.Runnable); + public abstract java.util.concurrent.ExecutorService getExecutorService(); +} + +Compiled from "WorkSchedulerException.java" +public class org.apache.tuscany.sca.work.WorkSchedulerException extends java.lang.RuntimeException{ + public org.apache.tuscany.sca.work.WorkSchedulerException(); + public org.apache.tuscany.sca.work.WorkSchedulerException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.work.WorkSchedulerException(java.lang.String); + public org.apache.tuscany.sca.work.WorkSchedulerException(java.lang.Throwable); +} + +Compiled from "RuntimeAssemblyFactory.java" +public class org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory extends org.apache.tuscany.sca.assembly.DefaultAssemblyFactory implements org.apache.tuscany.sca.assembly.AssemblyFactory{ + public org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.apache.tuscany.sca.assembly.Component createComponent(); + public org.apache.tuscany.sca.assembly.ComponentReference createComponentReference(); + public org.apache.tuscany.sca.assembly.ComponentService createComponentService(); + public org.apache.tuscany.sca.assembly.Endpoint createEndpoint(); + public org.apache.tuscany.sca.assembly.EndpointReference createEndpointReference(); +} + +Compiled from "CompositeActivatorImpl.java" +public class org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl extends java.lang.Object implements org.apache.tuscany.sca.runtime.CompositeActivator{ + final java.util.logging.Logger logger; + public org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Composite) throws org.apache.tuscany.sca.runtime.ActivationException; + public void deactivate(org.apache.tuscany.sca.assembly.Composite) throws org.apache.tuscany.sca.runtime.ActivationException; + public void activateComponent(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Component) throws org.apache.tuscany.sca.runtime.ActivationException; + public void deactivateComponent(org.apache.tuscany.sca.assembly.Component) throws org.apache.tuscany.sca.runtime.ActivationException; + public void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService); + public void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpoint); + public void deactivate(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService); + public void deactivate(org.apache.tuscany.sca.runtime.RuntimeEndpoint); + public void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference); + public void deactivate(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference); + public void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpointReference); + public void deactivate(org.apache.tuscany.sca.runtime.RuntimeEndpointReference); + public void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Composite); + public void stop(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Composite); + public void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Component); + public void stop(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Component); + public void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent); + public void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpoint); + public void stop(org.apache.tuscany.sca.runtime.RuntimeEndpoint); + public void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference); + public void stop(org.apache.tuscany.sca.assembly.Component, org.apache.tuscany.sca.assembly.ComponentReference); + public void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpointReference); + public void stop(org.apache.tuscany.sca.runtime.RuntimeEndpointReference); +} + +Compiled from "EndpointRegistryImpl.java" +public class org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl extends org.apache.tuscany.sca.runtime.BaseEndpointRegistry implements org.apache.tuscany.sca.runtime.EndpointRegistry,org.apache.tuscany.sca.core.LifeCycleListener{ + protected boolean quietLogging; + public org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl(org.apache.tuscany.sca.core.ExtensionPointRegistry, java.lang.String, java.lang.String); + public synchronized void addEndpoint(org.apache.tuscany.sca.assembly.Endpoint); + public java.util.List findEndpoint(java.lang.String); + public synchronized void removeEndpoint(org.apache.tuscany.sca.assembly.Endpoint); + public synchronized java.util.List getEndpoints(); + public synchronized org.apache.tuscany.sca.assembly.Endpoint getEndpoint(java.lang.String); + public synchronized void updateEndpoint(java.lang.String, org.apache.tuscany.sca.assembly.Endpoint); + public synchronized void start(); + public synchronized void stop(); + public java.util.Collection getEndpoints(); +} + +Compiled from "EndpointSerializerImpl.java" +public class org.apache.tuscany.sca.core.assembly.impl.EndpointSerializerImpl extends java.lang.Object implements org.apache.tuscany.sca.runtime.EndpointSerializer{ + public org.apache.tuscany.sca.core.assembly.impl.EndpointSerializerImpl(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.apache.tuscany.sca.assembly.Endpoint readEndpoint(java.lang.String); + public java.lang.String write(org.apache.tuscany.sca.assembly.Endpoint); + public org.apache.tuscany.sca.assembly.EndpointReference readEndpointReference(java.lang.String); + public java.lang.String write(org.apache.tuscany.sca.assembly.EndpointReference); +} + +Compiled from "LocalDomainRegistryFactory.java" +public class org.apache.tuscany.sca.core.assembly.impl.LocalDomainRegistryFactory extends org.apache.tuscany.sca.runtime.BaseDomainRegistryFactory{ + public org.apache.tuscany.sca.core.assembly.impl.LocalDomainRegistryFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry); + protected org.apache.tuscany.sca.runtime.EndpointRegistry createEndpointRegistry(java.lang.String, java.lang.String); + public java.lang.String[] getSupportedSchemes(); + static {}; +} + +Compiled from "ReferenceParameterProcessor.java" +public class org.apache.tuscany.sca.core.assembly.impl.ReferenceParameterProcessor extends java.lang.Object implements org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor{ + public org.apache.tuscany.sca.core.assembly.impl.ReferenceParameterProcessor(org.apache.tuscany.sca.core.FactoryExtensionPoint); + public javax.xml.namespace.QName getArtifactType(); + public org.apache.tuscany.sca.runtime.ReferenceParameters read(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException; + public void write(org.apache.tuscany.sca.runtime.ReferenceParameters, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException; + public java.lang.Class getModelType(); + public void resolve(org.apache.tuscany.sca.runtime.ReferenceParameters, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException; + public void write(java.lang.Object, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException; + public java.lang.Object read(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException; + public void resolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException; + static {}; +} + +Compiled from "ReferenceParametersImpl.java" +public class org.apache.tuscany.sca.core.assembly.impl.ReferenceParametersImpl extends java.lang.Object implements org.apache.tuscany.sca.runtime.ReferenceParameters{ + public org.apache.tuscany.sca.core.assembly.impl.ReferenceParametersImpl(); + public java.lang.Object getCallbackID(); + public void setCallbackID(java.lang.Object); + public org.apache.tuscany.sca.assembly.EndpointReference getCallbackReference(); + public void setCallbackReference(org.apache.tuscany.sca.assembly.EndpointReference); + public java.lang.Object clone() throws java.lang.CloneNotSupportedException; + public java.lang.Object getCallbackObjectID(); + public void setCallbackObjectID(java.lang.Object); + public int hashCode(); + public boolean equals(java.lang.Object); +} + +Compiled from "RuntimeComponentImpl.java" +public class org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentImpl extends org.apache.tuscany.sca.assembly.impl.ComponentImpl implements org.apache.tuscany.sca.runtime.RuntimeComponent,org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent,org.apache.tuscany.sca.contribution.resolver.ResolverExtension{ + protected org.apache.tuscany.sca.runtime.RuntimeComponentContext componentContext; + protected org.apache.tuscany.sca.provider.ImplementationProvider implementationProvider; + protected java.util.List policyProviders; + protected org.apache.tuscany.sca.core.scope.ScopeContainer scopeContainer; + protected boolean started; + protected org.apache.tuscany.sca.contribution.resolver.ModelResolver modelResolver; + public org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentImpl(); + public org.apache.tuscany.sca.provider.ImplementationProvider getImplementationProvider(); + public void setImplementationProvider(org.apache.tuscany.sca.provider.ImplementationProvider); + public org.apache.tuscany.sca.core.scope.ScopeContainer getScopeContainer(); + public void setScopeContainer(org.apache.tuscany.sca.core.scope.ScopeContainer); + public boolean isStarted(); + public void setStarted(boolean); + public org.apache.tuscany.sca.runtime.RuntimeComponentContext getComponentContext(); + public void setComponentContext(org.apache.tuscany.sca.runtime.RuntimeComponentContext); + public void addPolicyProvider(org.apache.tuscany.sca.provider.PolicyProvider); + public java.util.List getPolicyProviders(); + public org.apache.tuscany.sca.contribution.resolver.ModelResolver getModelResolver(); + public void setModelResolver(org.apache.tuscany.sca.contribution.resolver.ModelResolver); + public java.lang.String toString(); + public org.oasisopen.sca.ServiceReference getServiceReference(java.lang.Class, java.lang.String); +} + +Compiled from "RuntimeComponentReferenceImpl.java" +public class org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentReferenceImpl extends org.apache.tuscany.sca.assembly.impl.ComponentReferenceImpl implements org.apache.tuscany.sca.runtime.RuntimeComponentReference{ + public org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentReferenceImpl(); + public org.apache.tuscany.sca.runtime.RuntimeComponent getComponent(); + public void setComponent(org.apache.tuscany.sca.runtime.RuntimeComponent); + public java.lang.Object clone() throws java.lang.CloneNotSupportedException; + public java.lang.String toString(); +} + +Compiled from "RuntimeComponentServiceImpl.java" +public class org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentServiceImpl extends org.apache.tuscany.sca.assembly.impl.ComponentServiceImpl implements org.apache.tuscany.sca.runtime.RuntimeComponentService{ + public org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentServiceImpl(); + public java.lang.String toString(); +} + +Compiled from "RuntimeEndpointImpl.java" +public class org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl extends org.apache.tuscany.sca.assembly.impl.EndpointImpl implements org.apache.tuscany.sca.runtime.RuntimeEndpoint,java.io.Externalizable{ + protected org.apache.tuscany.sca.interfacedef.InterfaceContract bindingInterfaceContract; + protected org.apache.tuscany.sca.interfacedef.InterfaceContract serviceInterfaceContract; + public org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl(); + public org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl(org.apache.tuscany.sca.core.ExtensionPointRegistry); + protected void copyFrom(org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl); + public void bind(org.apache.tuscany.sca.context.CompositeContext); + public void bind(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.runtime.EndpointRegistry); + public void unbind(); + public synchronized java.util.List getInvocationChains(); + public synchronized org.apache.tuscany.sca.invocation.InvocationChain getBindingInvocationChain(); + public org.apache.tuscany.sca.invocation.InvocationChain getInvocationChain(org.apache.tuscany.sca.interfacedef.Operation); + public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message); + public java.lang.Object invoke(org.apache.tuscany.sca.interfacedef.Operation, java.lang.Object[]) throws java.lang.reflect.InvocationTargetException; + public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message); + public void invokeAsync(org.apache.tuscany.sca.invocation.Message); + public void invokeAsync(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message); + public void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message); + public void createAsyncServerCallback(); + public org.apache.tuscany.sca.runtime.RuntimeEndpointReference getAsyncServerCallback(); + public void validateServiceInterfaceCompatibility(); + public java.lang.Object clone() throws java.lang.CloneNotSupportedException; + public synchronized org.apache.tuscany.sca.provider.ServiceBindingProvider getBindingProvider(); + public synchronized java.util.List getPolicyProviders(); + public void setBindingProvider(org.apache.tuscany.sca.provider.ServiceBindingProvider); + public org.apache.tuscany.sca.assembly.Contract getContract(); + public org.apache.tuscany.sca.context.CompositeContext getCompositeContext(); + protected void reset(); + protected synchronized void resolve(); + public org.apache.tuscany.sca.interfacedef.InterfaceContract getBindingInterfaceContract(); + public org.apache.tuscany.sca.interfacedef.InterfaceContract getComponentTypeServiceInterfaceContract(); + public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundException; + public void writeExternal(java.io.ObjectOutput) throws java.io.IOException; + public org.apache.tuscany.sca.interfacedef.InterfaceContract getGeneratedWSDLContract(org.apache.tuscany.sca.interfacedef.InterfaceContract); + static {}; +} + +Compiled from "RuntimeEndpointReferenceImpl.java" +public class org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl extends org.apache.tuscany.sca.assembly.impl.EndpointReferenceImpl implements org.apache.tuscany.sca.runtime.RuntimeEndpointReference,java.io.Externalizable{ + protected org.apache.tuscany.sca.interfacedef.InterfaceContract bindingInterfaceContract; + protected org.apache.tuscany.sca.interfacedef.InterfaceContract referenceInterfaceContract; + public org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl(); + public org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl(org.apache.tuscany.sca.core.ExtensionPointRegistry); + protected void copyFrom(org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl); + public void bind(org.apache.tuscany.sca.context.CompositeContext); + public void bind(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.runtime.EndpointRegistry); + public synchronized java.util.List getInvocationChains(); + public synchronized org.apache.tuscany.sca.invocation.InvocationChain getBindingInvocationChain(); + public org.apache.tuscany.sca.invocation.InvocationChain getInvocationChain(org.apache.tuscany.sca.interfacedef.Operation); + public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message); + public java.lang.Object invoke(org.apache.tuscany.sca.interfacedef.Operation, java.lang.Object[]) throws java.lang.reflect.InvocationTargetException; + public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message); + public void invokeAsync(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message); + public void invokeAsync(org.apache.tuscany.sca.invocation.Message); + public void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message); + public void validateReferenceInterfaceCompatibility(); + public void rebuild(); + public java.lang.Object clone() throws java.lang.CloneNotSupportedException; + public boolean isOutOfDate(); + public synchronized org.apache.tuscany.sca.provider.ReferenceBindingProvider getBindingProvider(); + public void setBindingProvider(org.apache.tuscany.sca.provider.ReferenceBindingProvider); + public synchronized java.util.List getPolicyProviders(); + public void unbind(); + public org.apache.tuscany.sca.assembly.Contract getContract(); + public org.apache.tuscany.sca.context.CompositeContext getCompositeContext(); + public org.apache.tuscany.sca.interfacedef.InterfaceContract getBindingInterfaceContract(); + public org.apache.tuscany.sca.interfacedef.InterfaceContract getComponentTypeReferenceInterfaceContract(); + protected synchronized void resolve(); + public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundException; + public void writeExternal(java.io.ObjectOutput) throws java.io.IOException; + public boolean isStarted(); + public org.apache.tuscany.sca.interfacedef.InterfaceContract getGeneratedWSDLContract(org.apache.tuscany.sca.interfacedef.InterfaceContract); + public void createAsyncCallbackEndpoint(); +} + +Compiled from "DefaultComponentContextFactory.java" +public class org.apache.tuscany.sca.core.context.DefaultComponentContextFactory extends java.lang.Object implements org.apache.tuscany.sca.context.ComponentContextFactory{ + public org.apache.tuscany.sca.core.context.DefaultComponentContextFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.oasisopen.sca.ComponentContext createComponentContext(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent); +} + +Compiled from "DefaultRequestContextFactory.java" +public class org.apache.tuscany.sca.core.context.DefaultRequestContextFactory extends java.lang.Object implements org.apache.tuscany.sca.context.RequestContextFactory{ + public org.apache.tuscany.sca.core.context.DefaultRequestContextFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.oasisopen.sca.RequestContext createRequestContext(org.apache.tuscany.sca.runtime.RuntimeComponent); +} + +Compiled from "ServiceReferenceExt.java" +public interface org.apache.tuscany.sca.core.context.ServiceReferenceExt extends org.oasisopen.sca.ServiceReference,java.io.Externalizable{ + public abstract org.apache.tuscany.sca.runtime.RuntimeEndpointReference getEndpointReference(); + public abstract java.lang.Object getProxy(); + public abstract void setProxy(java.lang.Object); +} + +Compiled from "InstanceWrapper.java" +public interface org.apache.tuscany.sca.core.factory.InstanceWrapper{ + public abstract java.lang.Object getInstance(); + public abstract void start() throws org.apache.tuscany.sca.core.scope.TargetInitializationException; + public abstract void stop() throws org.apache.tuscany.sca.core.scope.TargetDestructionException; +} + +Compiled from "ObjectCreationException.java" +public class org.apache.tuscany.sca.core.factory.ObjectCreationException extends java.lang.RuntimeException{ + public org.apache.tuscany.sca.core.factory.ObjectCreationException(); + public org.apache.tuscany.sca.core.factory.ObjectCreationException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.core.factory.ObjectCreationException(java.lang.String); + public org.apache.tuscany.sca.core.factory.ObjectCreationException(java.lang.Throwable); +} + +Compiled from "ObjectFactory.java" +public interface org.apache.tuscany.sca.core.factory.ObjectFactory{ + public abstract java.lang.Object getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException; +} + +Compiled from "AsyncFaultWrapper.java" +public class org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper extends java.lang.Object{ + public org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper(); + public org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper(java.lang.Throwable); + public void storeFault(java.lang.Throwable); + public java.lang.Throwable retrieveFault(); + public void setFaultClassName(java.lang.String); + public java.lang.String getFaultClassName(); + public java.lang.String getFaultMessage(); + public void setFaultMessage(java.lang.String); + public org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper getContainedFault(); + public void setContainedFault(org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper); +} + +Compiled from "AsyncResponseException.java" +public class org.apache.tuscany.sca.core.invocation.AsyncResponseException extends java.lang.RuntimeException{ + public org.apache.tuscany.sca.core.invocation.AsyncResponseException(); + public org.apache.tuscany.sca.core.invocation.AsyncResponseException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.core.invocation.AsyncResponseException(java.lang.String); + public org.apache.tuscany.sca.core.invocation.AsyncResponseException(java.lang.Throwable); +} + +Compiled from "AsyncResponseHandler.java" +public interface org.apache.tuscany.sca.core.invocation.AsyncResponseHandler extends org.apache.tuscany.sca.core.invocation.AsyncResponseService{ + public abstract void setWrappedFault(org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper); + public abstract void setFault(java.lang.Throwable); + public abstract void setResponse(java.lang.Object); +} + +Compiled from "AsyncResponseInvoker.java" +public class org.apache.tuscany.sca.core.invocation.AsyncResponseInvoker extends java.lang.Object implements org.apache.tuscany.sca.invocation.InvokerAsyncResponse,java.io.Serializable{ + public org.apache.tuscany.sca.core.invocation.AsyncResponseInvoker(org.apache.tuscany.sca.runtime.RuntimeEndpoint, org.apache.tuscany.sca.runtime.RuntimeEndpointReference, java.lang.Object, java.lang.String, java.lang.String, org.apache.tuscany.sca.invocation.MessageFactory); + public void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message); + public java.lang.Object getResponseTargetAddress(); + public void setResponseTargetAddress(java.lang.Object); + public java.lang.String getRelatesToMsgID(); + public void setRelatesToMsgID(java.lang.String); + public void invokeAsyncResponse(java.lang.Object, java.util.Map); + public void setBindingType(java.lang.String); + public java.lang.String getBindingType(); + public org.apache.tuscany.sca.runtime.RuntimeEndpoint getRequestEndpoint(); + public org.apache.tuscany.sca.runtime.RuntimeEndpointReference getResponseEndpointReference(); + public void setResponseEndpointReference(org.apache.tuscany.sca.runtime.RuntimeEndpointReference); +} + +Compiled from "AsyncResponseService.java" +public interface org.apache.tuscany.sca.core.invocation.AsyncResponseService{ + public abstract void setWrappedFault(org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper); + public abstract void setResponse(java.lang.Object); +} + +Compiled from "CallableReferenceObjectFactory.java" +public class org.apache.tuscany.sca.core.invocation.CallableReferenceObjectFactory extends java.lang.Object implements org.apache.tuscany.sca.core.factory.ObjectFactory{ + public org.apache.tuscany.sca.core.invocation.CallableReferenceObjectFactory(java.lang.Class, org.apache.tuscany.sca.runtime.RuntimeEndpointReference); + public org.oasisopen.sca.ServiceReference getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException; + public java.lang.Object getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException; +} + +Compiled from "CallbackInterfaceInterceptor.java" +public class org.apache.tuscany.sca.core.invocation.CallbackInterfaceInterceptor extends java.lang.Object implements org.apache.tuscany.sca.invocation.Interceptor{ + public org.apache.tuscany.sca.core.invocation.CallbackInterfaceInterceptor(); + public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message); + public void setNext(org.apache.tuscany.sca.invocation.Invoker); + public org.apache.tuscany.sca.invocation.Invoker getNext(); +} + +Compiled from "CallbackReferenceObjectFactory.java" +public class org.apache.tuscany.sca.core.invocation.CallbackReferenceObjectFactory extends java.lang.Object implements org.apache.tuscany.sca.core.factory.ObjectFactory{ + public org.apache.tuscany.sca.core.invocation.CallbackReferenceObjectFactory(java.lang.Class, org.apache.tuscany.sca.core.invocation.ProxyFactory, java.util.List); + public org.oasisopen.sca.ServiceReference getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException; + public java.lang.Object getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException; +} + +Compiled from "CallbackWireObjectFactory.java" +public class org.apache.tuscany.sca.core.invocation.CallbackWireObjectFactory extends java.lang.Object implements org.apache.tuscany.sca.core.factory.ObjectFactory{ + public org.apache.tuscany.sca.core.invocation.CallbackWireObjectFactory(java.lang.Class, org.apache.tuscany.sca.core.invocation.ProxyFactory, java.util.List); + public java.lang.Object getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException; +} + +Compiled from "CglibProxyFactory.java" +public class org.apache.tuscany.sca.core.invocation.CglibProxyFactory extends java.lang.Object implements org.apache.tuscany.sca.core.invocation.ProxyFactory{ + public org.apache.tuscany.sca.core.invocation.CglibProxyFactory(org.apache.tuscany.sca.invocation.MessageFactory, org.apache.tuscany.sca.interfacedef.InterfaceContractMapper); + public java.lang.Object createProxy(java.lang.Class, org.apache.tuscany.sca.runtime.Invocable) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException; + public java.lang.Object createProxy(org.oasisopen.sca.ServiceReference) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException; + public java.lang.Object createCallbackProxy(java.lang.Class, java.util.List) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException; + public java.lang.Object createCallbackProxy(org.oasisopen.sca.ServiceReference) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException; + public org.oasisopen.sca.ServiceReference cast(java.lang.Object) throws java.lang.IllegalArgumentException; + public boolean isProxyClass(java.lang.Class); + static org.apache.tuscany.sca.invocation.MessageFactory access$100(org.apache.tuscany.sca.core.invocation.CglibProxyFactory); +} + +Compiled from "Constants.java" +public interface org.apache.tuscany.sca.core.invocation.Constants{ + public static final java.lang.String MESSAGE_ID; + public static final java.lang.String RELATES_TO; + public static final java.lang.String ASYNC_RESPONSE_INVOKER; + public static final java.lang.String ASYNC_CALLBACK; +} + +Compiled from "DefaultProxyFactoryExtensionPoint.java" +public class org.apache.tuscany.sca.core.invocation.DefaultProxyFactoryExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint,org.apache.tuscany.sca.core.LifeCycleListener{ + public org.apache.tuscany.sca.core.invocation.DefaultProxyFactoryExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.apache.tuscany.sca.core.invocation.ProxyFactory getClassProxyFactory(); + public org.apache.tuscany.sca.core.invocation.ProxyFactory getInterfaceProxyFactory(); + public void setClassProxyFactory(org.apache.tuscany.sca.core.invocation.ProxyFactory); + public void setInterfaceProxyFactory(org.apache.tuscany.sca.core.invocation.ProxyFactory); + public void start(); + public void stop(); +} + +Compiled from "ExtensibleProxyFactory.java" +public class org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory extends java.lang.Object implements org.apache.tuscany.sca.core.invocation.ProxyFactory{ + public org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory(org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint); + public org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public static org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory getInstance(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.oasisopen.sca.ServiceReference cast(java.lang.Object) throws java.lang.IllegalArgumentException; + public java.lang.Object createCallbackProxy(java.lang.Class, java.util.List) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException; + public java.lang.Object createProxy(org.oasisopen.sca.ServiceReference) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException; + public java.lang.Object createCallbackProxy(org.oasisopen.sca.ServiceReference) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException; + public java.lang.Object createProxy(java.lang.Class, org.apache.tuscany.sca.runtime.Invocable) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException; + public boolean isProxyClass(java.lang.Class); +} + +Compiled from "ExtensibleWireProcessor.java" +public class org.apache.tuscany.sca.core.invocation.ExtensibleWireProcessor extends java.lang.Object implements org.apache.tuscany.sca.runtime.RuntimeWireProcessor{ + public org.apache.tuscany.sca.core.invocation.ExtensibleWireProcessor(org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint); + public void process(org.apache.tuscany.sca.runtime.RuntimeEndpoint); + public void process(org.apache.tuscany.sca.runtime.RuntimeEndpointReference); +} + +Compiled from "InterceptorAsyncImpl.java" +public abstract class org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl extends java.lang.Object implements org.apache.tuscany.sca.invocation.InterceptorAsync{ + protected org.apache.tuscany.sca.invocation.Invoker next; + protected org.apache.tuscany.sca.invocation.InvokerAsyncResponse previous; + public org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl(); + public org.apache.tuscany.sca.invocation.Invoker getNext(); + public void setNext(org.apache.tuscany.sca.invocation.Invoker); + public org.apache.tuscany.sca.invocation.InvokerAsyncResponse getPrevious(); + public void setPrevious(org.apache.tuscany.sca.invocation.InvokerAsyncResponse); + public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message); + public void invokeAsyncRequest(org.apache.tuscany.sca.invocation.Message) throws java.lang.Throwable; + public void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message); + public org.apache.tuscany.sca.invocation.Message postProcessRequest(org.apache.tuscany.sca.invocation.Message); + public org.apache.tuscany.sca.invocation.Message postProcessRequest(org.apache.tuscany.sca.invocation.Message, java.lang.Throwable) throws java.lang.Throwable; + public boolean isLocalSCABIndingInvoker(); +} + +Compiled from "JDKAsyncResponseInvoker.java" +public interface org.apache.tuscany.sca.core.invocation.JDKAsyncResponseInvoker extends org.apache.tuscany.sca.invocation.InvokerAsyncResponse{ + public abstract void registerAsyncResponse(java.lang.String, java.lang.Object); +} + +Compiled from "NonBlockingInterceptor.java" +public class org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor extends org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl{ + public org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor(org.apache.tuscany.sca.work.WorkScheduler); + public org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor(org.apache.tuscany.sca.work.WorkScheduler, org.apache.tuscany.sca.invocation.Interceptor); + public void setWorkScheduler(org.apache.tuscany.sca.work.WorkScheduler); + public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message); + public org.apache.tuscany.sca.invocation.Message processRequest(org.apache.tuscany.sca.invocation.Message); + public org.apache.tuscany.sca.invocation.Message processResponse(org.apache.tuscany.sca.invocation.Message); + static java.util.logging.Logger access$100(); + static {}; +} + +Compiled from "ProxyCreationException.java" +public class org.apache.tuscany.sca.core.invocation.ProxyCreationException extends org.apache.tuscany.sca.core.factory.ObjectCreationException{ + public org.apache.tuscany.sca.core.invocation.ProxyCreationException(); + public org.apache.tuscany.sca.core.invocation.ProxyCreationException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.core.invocation.ProxyCreationException(java.lang.String); + public org.apache.tuscany.sca.core.invocation.ProxyCreationException(java.lang.Throwable); +} + +Compiled from "ProxyFactory.java" +public interface org.apache.tuscany.sca.core.invocation.ProxyFactory{ + public abstract java.lang.Object createProxy(java.lang.Class, org.apache.tuscany.sca.runtime.Invocable) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException; + public abstract java.lang.Object createProxy(org.oasisopen.sca.ServiceReference) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException; + public abstract java.lang.Object createCallbackProxy(java.lang.Class, java.util.List) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException; + public abstract java.lang.Object createCallbackProxy(org.oasisopen.sca.ServiceReference) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException; + public abstract org.oasisopen.sca.ServiceReference cast(java.lang.Object) throws java.lang.IllegalArgumentException; + public abstract boolean isProxyClass(java.lang.Class); +} + +Compiled from "ProxyFactoryExtensionPoint.java" +public interface org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint{ + public abstract org.apache.tuscany.sca.core.invocation.ProxyFactory getInterfaceProxyFactory(); + public abstract org.apache.tuscany.sca.core.invocation.ProxyFactory getClassProxyFactory(); + public abstract void setInterfaceProxyFactory(org.apache.tuscany.sca.core.invocation.ProxyFactory); + public abstract void setClassProxyFactory(org.apache.tuscany.sca.core.invocation.ProxyFactory); +} + +Compiled from "RuntimeInvoker.java" +public class org.apache.tuscany.sca.core.invocation.RuntimeInvoker extends java.lang.Object implements org.apache.tuscany.sca.invocation.Invoker,org.apache.tuscany.sca.invocation.InvokerAsyncRequest{ + protected org.apache.tuscany.sca.core.ExtensionPointRegistry registry; + protected org.apache.tuscany.sca.invocation.MessageFactory messageFactory; + protected org.apache.tuscany.sca.runtime.Invocable invocable; + public org.apache.tuscany.sca.core.invocation.RuntimeInvoker(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.runtime.Invocable); + public org.apache.tuscany.sca.invocation.Message invokeBinding(org.apache.tuscany.sca.invocation.Message); + public void invokeBindingAsync(org.apache.tuscany.sca.invocation.Message); + public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message); + public java.lang.Object invoke(org.apache.tuscany.sca.interfacedef.Operation, java.lang.Object[]) throws java.lang.reflect.InvocationTargetException; + public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message); + public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.InvocationChain, org.apache.tuscany.sca.invocation.Message); + public void invokeAsync(org.apache.tuscany.sca.invocation.Message); + public void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message); + public void invokeAsyncRequest(org.apache.tuscany.sca.invocation.Message) throws java.lang.Throwable; +} + +Compiled from "WireObjectFactory.java" +public class org.apache.tuscany.sca.core.invocation.WireObjectFactory extends java.lang.Object implements org.apache.tuscany.sca.core.factory.ObjectFactory{ + public org.apache.tuscany.sca.core.invocation.WireObjectFactory(java.lang.Class, org.apache.tuscany.sca.runtime.Invocable, org.apache.tuscany.sca.core.invocation.ProxyFactory); + public java.lang.Object getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException; +} + +Compiled from "AbstractScopeContainer.java" +public abstract class org.apache.tuscany.sca.core.scope.AbstractScopeContainer extends java.lang.Object implements org.apache.tuscany.sca.core.scope.ScopeContainer{ + protected java.util.Map wrappers; + protected final org.apache.tuscany.sca.core.scope.Scope scope; + protected org.apache.tuscany.sca.runtime.RuntimeComponent component; + protected volatile int lifecycleState; + public org.apache.tuscany.sca.core.scope.AbstractScopeContainer(org.apache.tuscany.sca.core.scope.Scope, org.apache.tuscany.sca.runtime.RuntimeComponent); + protected void checkInit(); + protected org.apache.tuscany.sca.core.factory.InstanceWrapper createInstanceWrapper() throws org.apache.tuscany.sca.core.scope.TargetResolutionException; + public org.apache.tuscany.sca.core.factory.InstanceWrapper getAssociatedWrapper(java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException; + public org.apache.tuscany.sca.core.scope.Scope getScope(); + public org.apache.tuscany.sca.core.factory.InstanceWrapper getWrapper(java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException; + public void addWrapperReference(java.lang.Object, java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException; + public void registerWrapper(org.apache.tuscany.sca.core.factory.InstanceWrapper, java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException; + protected boolean isEagerInit(); + public void returnWrapper(org.apache.tuscany.sca.core.factory.InstanceWrapper, java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetDestructionException; + public void remove(java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetDestructionException; + public synchronized void start(); + public void startContext(java.lang.Object); + public synchronized void stop(); + public void stopContext(java.lang.Object); + public java.lang.String toString(); + public org.apache.tuscany.sca.runtime.RuntimeComponent getComponent(); + public void setComponent(org.apache.tuscany.sca.runtime.RuntimeComponent); + public int getLifecycleState(); + protected void setLifecycleState(int); +} + +Compiled from "DefaultScopeRegistry.java" +public class org.apache.tuscany.sca.core.scope.DefaultScopeRegistry extends org.apache.tuscany.sca.core.scope.impl.ScopeRegistryImpl implements org.apache.tuscany.sca.core.scope.ScopeRegistry{ + public org.apache.tuscany.sca.core.scope.DefaultScopeRegistry(); +} + +Compiled from "Scope.java" +public class org.apache.tuscany.sca.core.scope.Scope extends java.lang.Object{ + public static final org.apache.tuscany.sca.core.scope.Scope STATELESS; + public static final org.apache.tuscany.sca.core.scope.Scope COMPOSITE; + public static final org.apache.tuscany.sca.core.scope.Scope INVALID; + public org.apache.tuscany.sca.core.scope.Scope(java.lang.String); + public java.lang.String getScope(); + public boolean equals(java.lang.Object); + public int hashCode(); + public java.lang.String toString(); + static {}; +} + +Compiled from "ScopeContainer.java" +public interface org.apache.tuscany.sca.core.scope.ScopeContainer{ + public static final int CONFIG_ERROR; + public static final int UNINITIALIZED; + public static final int INITIALIZING; + public static final int INITIALIZED; + public static final int RUNNING; + public static final int STOPPING; + public static final int STOPPED; + public static final int ERROR; + public abstract org.apache.tuscany.sca.core.scope.Scope getScope(); + public abstract void startContext(java.lang.Object); + public abstract void stopContext(java.lang.Object); + public abstract org.apache.tuscany.sca.core.factory.InstanceWrapper getWrapper(java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException; + public abstract void addWrapperReference(java.lang.Object, java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException; + public abstract void registerWrapper(org.apache.tuscany.sca.core.factory.InstanceWrapper, java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException; + public abstract org.apache.tuscany.sca.core.factory.InstanceWrapper getAssociatedWrapper(java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException; + public abstract void returnWrapper(org.apache.tuscany.sca.core.factory.InstanceWrapper, java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetDestructionException; + public abstract void remove(java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetDestructionException; + public abstract int getLifecycleState(); + public abstract void start(); + public abstract void stop(); +} + +Compiled from "ScopeContainerFactory.java" +public interface org.apache.tuscany.sca.core.scope.ScopeContainerFactory{ + public abstract org.apache.tuscany.sca.core.scope.ScopeContainer createScopeContainer(org.apache.tuscany.sca.runtime.RuntimeComponent); + public abstract org.apache.tuscany.sca.core.scope.Scope getScope(); +} + +Compiled from "ScopeRegistry.java" +public interface org.apache.tuscany.sca.core.scope.ScopeRegistry{ + public abstract org.apache.tuscany.sca.core.scope.ScopeContainer getScopeContainer(org.apache.tuscany.sca.runtime.RuntimeComponent); + public abstract void register(org.apache.tuscany.sca.core.scope.ScopeContainerFactory); +} + +Compiled from "ScopedImplementationProvider.java" +public interface org.apache.tuscany.sca.core.scope.ScopedImplementationProvider extends org.apache.tuscany.sca.provider.ImplementationProvider{ + public abstract org.apache.tuscany.sca.core.scope.Scope getScope(); + public abstract boolean isEagerInit(); + public abstract org.apache.tuscany.sca.core.factory.InstanceWrapper createInstanceWrapper(); +} + +Compiled from "ScopedRuntimeComponent.java" +public interface org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent extends org.apache.tuscany.sca.runtime.RuntimeComponent{ + public abstract void setScopeContainer(org.apache.tuscany.sca.core.scope.ScopeContainer); + public abstract org.apache.tuscany.sca.core.scope.ScopeContainer getScopeContainer(); +} + +Compiled from "TargetDestructionException.java" +public class org.apache.tuscany.sca.core.scope.TargetDestructionException extends org.apache.tuscany.sca.core.scope.TargetResolutionException{ + public org.apache.tuscany.sca.core.scope.TargetDestructionException(); + public org.apache.tuscany.sca.core.scope.TargetDestructionException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.core.scope.TargetDestructionException(java.lang.String); + public org.apache.tuscany.sca.core.scope.TargetDestructionException(java.lang.Throwable); +} + +Compiled from "TargetInitializationException.java" +public class org.apache.tuscany.sca.core.scope.TargetInitializationException extends org.apache.tuscany.sca.core.scope.TargetResolutionException{ + public org.apache.tuscany.sca.core.scope.TargetInitializationException(); + public org.apache.tuscany.sca.core.scope.TargetInitializationException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.core.scope.TargetInitializationException(java.lang.String); + public org.apache.tuscany.sca.core.scope.TargetInitializationException(java.lang.Throwable); +} + +Compiled from "TargetNotFoundException.java" +public class org.apache.tuscany.sca.core.scope.TargetNotFoundException extends org.apache.tuscany.sca.core.scope.TargetResolutionException{ + public org.apache.tuscany.sca.core.scope.TargetNotFoundException(); + public org.apache.tuscany.sca.core.scope.TargetNotFoundException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.core.scope.TargetNotFoundException(java.lang.String); + public org.apache.tuscany.sca.core.scope.TargetNotFoundException(java.lang.Throwable); +} + +Compiled from "TargetResolutionException.java" +public class org.apache.tuscany.sca.core.scope.TargetResolutionException extends java.lang.Exception{ + public org.apache.tuscany.sca.core.scope.TargetResolutionException(); + public org.apache.tuscany.sca.core.scope.TargetResolutionException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.core.scope.TargetResolutionException(java.lang.String); + public org.apache.tuscany.sca.core.scope.TargetResolutionException(java.lang.Throwable); +} + +Compiled from "BaseDataBinding.java" +public abstract class org.apache.tuscany.sca.databinding.BaseDataBinding extends java.lang.Object implements org.apache.tuscany.sca.databinding.DataBinding{ + static final boolean $assertionsDisabled; + protected org.apache.tuscany.sca.databinding.BaseDataBinding(java.lang.Class); + protected org.apache.tuscany.sca.databinding.BaseDataBinding(java.lang.String, java.lang.Class); + public boolean introspect(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation); + public org.apache.tuscany.sca.interfacedef.DataType introspect(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation); + public final java.lang.String getName(); + public org.apache.tuscany.sca.databinding.WrapperHandler getWrapperHandler(); + public java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation); + public org.apache.tuscany.sca.databinding.XMLTypeHelper getXMLTypeHelper(); + static {}; +} + +Compiled from "BaseTransformer.java" +public abstract class org.apache.tuscany.sca.databinding.BaseTransformer extends java.lang.Object implements org.apache.tuscany.sca.databinding.Transformer{ + protected org.apache.tuscany.sca.databinding.BaseTransformer(); + protected abstract java.lang.Class getSourceType(); + protected abstract java.lang.Class getTargetType(); + public java.lang.String getSourceDataBinding(); + public java.lang.String getTargetDataBinding(); + public int getWeight(); +} + +Compiled from "DataBinding.java" +public interface org.apache.tuscany.sca.databinding.DataBinding{ + public abstract java.lang.String getName(); + public abstract boolean introspect(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation); + public abstract org.apache.tuscany.sca.interfacedef.DataType introspect(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation); + public abstract org.apache.tuscany.sca.databinding.WrapperHandler getWrapperHandler(); + public abstract java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation); + public abstract org.apache.tuscany.sca.databinding.XMLTypeHelper getXMLTypeHelper(); +} + +Compiled from "DataBindingContext.java" +public class org.apache.tuscany.sca.databinding.DataBindingContext extends java.lang.Object{ + public org.apache.tuscany.sca.databinding.DataBindingContext(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], org.apache.tuscany.sca.interfacedef.Operation, java.lang.String); + public org.apache.tuscany.sca.databinding.DataBindingContext(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[]); + public org.apache.tuscany.sca.databinding.DataBindingContext(java.lang.Class); + public java.lang.Class getType(); + public java.lang.reflect.Type getGenericType(); + public java.lang.annotation.Annotation[] getAnnotations(); + public org.apache.tuscany.sca.interfacedef.Operation getOperation(); + public java.lang.annotation.Annotation getAnnotation(java.lang.Class); + public java.lang.String getContentType(); +} + +Compiled from "DataBindingExtensionPoint.java" +public interface org.apache.tuscany.sca.databinding.DataBindingExtensionPoint{ + public abstract void addDataBinding(org.apache.tuscany.sca.databinding.DataBinding); + public abstract org.apache.tuscany.sca.databinding.DataBinding getDataBinding(java.lang.String); + public abstract org.apache.tuscany.sca.databinding.DataBinding removeDataBinding(java.lang.String); + public abstract boolean introspectType(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation); + public abstract org.apache.tuscany.sca.interfacedef.DataType introspectType(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation); +} + +Compiled from "DataPipe.java" +public interface org.apache.tuscany.sca.databinding.DataPipe{ + public abstract java.lang.Object getSink(); + public abstract java.lang.Object getResult(); +} + +Compiled from "DataPipeTransformer.java" +public interface org.apache.tuscany.sca.databinding.DataPipeTransformer extends org.apache.tuscany.sca.databinding.Transformer{ + public abstract org.apache.tuscany.sca.databinding.DataPipe newInstance(); +} + +Compiled from "DefaultDataBindingExtensionPoint.java" +public class org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.databinding.DataBindingExtensionPoint{ + public org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.apache.tuscany.sca.databinding.DataBinding getDataBinding(java.lang.String); + public void addDataBinding(org.apache.tuscany.sca.databinding.DataBinding); + public org.apache.tuscany.sca.databinding.DataBinding removeDataBinding(java.lang.String); + public boolean introspectType(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation); + public org.apache.tuscany.sca.interfacedef.DataType introspectType(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation); + static org.apache.tuscany.sca.core.ExtensionPointRegistry access$200(org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint); + static {}; +} + +Compiled from "DefaultTransformerExtensionPoint.java" +public class org.apache.tuscany.sca.databinding.DefaultTransformerExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.databinding.TransformerExtensionPoint{ + public org.apache.tuscany.sca.databinding.DefaultTransformerExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void addTransformer(java.lang.String, java.lang.String, int, org.apache.tuscany.sca.databinding.Transformer, boolean); + public void addTransformer(org.apache.tuscany.sca.databinding.Transformer, boolean); + public boolean removeTransformer(java.lang.String, java.lang.String); + public org.apache.tuscany.sca.databinding.Transformer getTransformer(java.lang.String, java.lang.String); + public java.util.List getTransformerChain(java.lang.String, java.lang.String); + public java.lang.String toString(); + static org.apache.tuscany.sca.core.ExtensionPointRegistry access$200(org.apache.tuscany.sca.databinding.DefaultTransformerExtensionPoint); + static {}; +} + +Compiled from "Mediator.java" +public interface org.apache.tuscany.sca.databinding.Mediator{ + public static final java.lang.String SOURCE_OPERATION; + public static final java.lang.String TARGET_OPERATION; + public static final java.lang.String BODY_TYPE; + public static final java.lang.String BODY_TYPE_INPUT; + public static final java.lang.String BODY_TYPE_OUTPUT; + public static final java.lang.String BODY_TYPE_FAULT; + public abstract java.lang.Object mediate(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map); + public abstract void mediate(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map); + public abstract java.lang.Object mediateInput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, java.util.Map); + public abstract java.lang.Object mediateOutput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, java.util.Map); + public abstract java.lang.Object mediateFault(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, java.util.Map); + public abstract java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType); + public abstract java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType); + public abstract java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation); + public abstract java.lang.Object copyInput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation); + public abstract java.lang.Object copyInput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation); + public abstract java.lang.Object copyOutput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation); + public abstract java.lang.Object copyOutput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation); + public abstract java.lang.Object copyFault(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation); + public abstract java.lang.Object copyFault(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation); + public abstract org.apache.tuscany.sca.databinding.DataBindingExtensionPoint getDataBindings(); + public abstract org.apache.tuscany.sca.databinding.TransformerExtensionPoint getTransformers(); + public abstract org.apache.tuscany.sca.databinding.TransformationContext createTransformationContext(); + public abstract org.apache.tuscany.sca.databinding.TransformationContext createTransformationContext(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map); +} + +Compiled from "PullTransformer.java" +public interface org.apache.tuscany.sca.databinding.PullTransformer extends org.apache.tuscany.sca.databinding.Transformer{ + public abstract java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "PushTransformer.java" +public interface org.apache.tuscany.sca.databinding.PushTransformer extends org.apache.tuscany.sca.databinding.Transformer{ + public abstract void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "SimpleTypeMapper.java" +public interface org.apache.tuscany.sca.databinding.SimpleTypeMapper{ + public abstract java.lang.Object toJavaObject(javax.xml.namespace.QName, java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext); + public abstract java.lang.String toXMLLiteral(javax.xml.namespace.QName, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); + public abstract java.lang.Class getJavaType(javax.xml.namespace.QName); + public abstract org.apache.tuscany.sca.interfacedef.util.TypeInfo getXMLType(java.lang.Class); + public abstract boolean isSimpleXSDType(javax.xml.namespace.QName); +} + +Compiled from "TransformationContext.java" +public interface org.apache.tuscany.sca.databinding.TransformationContext{ + public abstract org.apache.tuscany.sca.interfacedef.Operation getSourceOperation(); + public abstract void setSourceOperation(org.apache.tuscany.sca.interfacedef.Operation); + public abstract org.apache.tuscany.sca.interfacedef.Operation getTargetOperation(); + public abstract void setTargetOperation(org.apache.tuscany.sca.interfacedef.Operation); + public abstract org.apache.tuscany.sca.interfacedef.DataType getSourceDataType(); + public abstract org.apache.tuscany.sca.interfacedef.DataType getTargetDataType(); + public abstract void setSourceDataType(org.apache.tuscany.sca.interfacedef.DataType); + public abstract void setTargetDataType(org.apache.tuscany.sca.interfacedef.DataType); + public abstract java.util.Map getMetadata(); +} + +Compiled from "TransformationException.java" +public class org.apache.tuscany.sca.databinding.TransformationException extends java.lang.RuntimeException{ + public org.apache.tuscany.sca.databinding.TransformationException(); + public org.apache.tuscany.sca.databinding.TransformationException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.databinding.TransformationException(java.lang.String); + public org.apache.tuscany.sca.databinding.TransformationException(java.lang.Throwable); + public java.lang.String getSourceDataBinding(); + public void setSourceDataBinding(java.lang.String); + public java.lang.String getTargetDataBinding(); + public void setTargetDataBinding(java.lang.String); +} + +Compiled from "Transformer.java" +public interface org.apache.tuscany.sca.databinding.Transformer{ + public abstract java.lang.String getSourceDataBinding(); + public abstract java.lang.String getTargetDataBinding(); + public abstract int getWeight(); +} + +Compiled from "TransformerExtensionPoint.java" +public interface org.apache.tuscany.sca.databinding.TransformerExtensionPoint{ + public abstract void addTransformer(java.lang.String, java.lang.String, int, org.apache.tuscany.sca.databinding.Transformer, boolean); + public abstract void addTransformer(org.apache.tuscany.sca.databinding.Transformer, boolean); + public abstract boolean removeTransformer(java.lang.String, java.lang.String); + public abstract org.apache.tuscany.sca.databinding.Transformer getTransformer(java.lang.String, java.lang.String); + public abstract java.util.List getTransformerChain(java.lang.String, java.lang.String); +} + +Compiled from "WrapperHandler.java" +public interface org.apache.tuscany.sca.databinding.WrapperHandler{ + public abstract java.lang.Object create(org.apache.tuscany.sca.interfacedef.Operation, boolean); + public abstract org.apache.tuscany.sca.interfacedef.DataType getWrapperType(org.apache.tuscany.sca.interfacedef.Operation, boolean); + public abstract boolean isInstance(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, boolean); + public abstract void setChildren(java.lang.Object, java.lang.Object[], org.apache.tuscany.sca.interfacedef.Operation, boolean); + public abstract java.util.List getChildren(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, boolean); +} + +Compiled from "XMLTypeHelper.java" +public interface org.apache.tuscany.sca.databinding.XMLTypeHelper{ + public abstract org.apache.tuscany.sca.interfacedef.util.TypeInfo getTypeInfo(java.lang.Class, java.lang.Object); + public abstract java.util.List getSchemaDefinitions(org.apache.tuscany.sca.xsd.XSDFactory, org.apache.tuscany.sca.contribution.resolver.ModelResolver, java.util.List); + public abstract java.util.List getSchemaDefinitions(org.apache.tuscany.sca.xsd.XSDFactory, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.interfacedef.Interface); +} + +Compiled from "DataBinding.java" +public interface org.apache.tuscany.sca.databinding.annotation.DataBinding extends java.lang.annotation.Annotation{ + public abstract java.lang.String value(); + public abstract boolean wrapped(); +} + +Compiled from "DataType.java" +public interface org.apache.tuscany.sca.databinding.annotation.DataType extends java.lang.annotation.Annotation{ + public abstract java.lang.String value(); +} + +Compiled from "DirectedGraph.java" +public class org.apache.tuscany.sca.databinding.impl.DirectedGraph extends java.lang.Object implements java.lang.Cloneable{ + public org.apache.tuscany.sca.databinding.impl.DirectedGraph(); + public void addEdge(java.lang.Object, java.lang.Object, java.lang.Object, int, boolean); + public void addEdge(java.lang.Object, java.lang.Object); + public org.apache.tuscany.sca.databinding.impl.DirectedGraph$Vertex getVertex(java.lang.Object); + public boolean removeEdge(java.lang.Object, java.lang.Object); + public void removeEdge(org.apache.tuscany.sca.databinding.impl.DirectedGraph$Edge); + public void removeVertex(org.apache.tuscany.sca.databinding.impl.DirectedGraph$Vertex); + public org.apache.tuscany.sca.databinding.impl.DirectedGraph$Edge getEdge(org.apache.tuscany.sca.databinding.impl.DirectedGraph$Vertex, org.apache.tuscany.sca.databinding.impl.DirectedGraph$Vertex); + public org.apache.tuscany.sca.databinding.impl.DirectedGraph$Edge getEdge(java.lang.Object, java.lang.Object); + public org.apache.tuscany.sca.databinding.impl.DirectedGraph$Path getShortestPath(java.lang.Object, java.lang.Object); + public java.lang.String toString(); + public java.util.Map getVertices(); + public void addGraph(org.apache.tuscany.sca.databinding.impl.DirectedGraph); + public java.util.List topologicalSort(boolean); + public java.lang.Object clone(); + static {}; +} + +Compiled from "Group2GroupTransformer.java" +public class org.apache.tuscany.sca.databinding.impl.Group2GroupTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + protected org.apache.tuscany.sca.databinding.Mediator mediator; + public org.apache.tuscany.sca.databinding.impl.Group2GroupTransformer(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public java.lang.String getSourceDataBinding(); + public java.lang.String getTargetDataBinding(); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "GroupDataBinding.java" +public abstract class org.apache.tuscany.sca.databinding.impl.GroupDataBinding extends org.apache.tuscany.sca.databinding.BaseDataBinding{ + public static final java.lang.String NAME; + protected java.lang.Class[] markerTypes; + public org.apache.tuscany.sca.databinding.impl.GroupDataBinding(java.lang.Class[]); + public boolean introspect(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation); + protected boolean isTypeOf(java.lang.Class, java.lang.Class); + protected java.lang.String getDataBinding(java.lang.Class); + protected abstract java.lang.Object getLogical(java.lang.Class, org.apache.tuscany.sca.interfacedef.Operation); +} + +Compiled from "Java2SimpleTypeTransformer.java" +public abstract class org.apache.tuscany.sca.databinding.impl.Java2SimpleTypeTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + protected org.apache.tuscany.sca.databinding.SimpleTypeMapper mapper; + public org.apache.tuscany.sca.databinding.impl.Java2SimpleTypeTransformer(); + public org.apache.tuscany.sca.databinding.impl.Java2SimpleTypeTransformer(org.apache.tuscany.sca.databinding.SimpleTypeMapper); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); + public java.lang.Class getSourceType(); + public int getWeight(); + protected abstract java.lang.Object createElement(javax.xml.namespace.QName, java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext); + public java.lang.String getSourceDataBinding(); +} + +Compiled from "MediatorImpl.java" +public class org.apache.tuscany.sca.databinding.impl.MediatorImpl extends java.lang.Object implements org.apache.tuscany.sca.databinding.Mediator{ + org.apache.tuscany.sca.databinding.impl.MediatorImpl(org.apache.tuscany.sca.databinding.DataBindingExtensionPoint, org.apache.tuscany.sca.databinding.TransformerExtensionPoint); + public org.apache.tuscany.sca.databinding.impl.MediatorImpl(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public java.lang.Object mediate(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map); + public void mediate(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map); + public org.apache.tuscany.sca.databinding.DataBindingExtensionPoint getDataBindings(); + public org.apache.tuscany.sca.databinding.TransformerExtensionPoint getTransformers(); + public java.lang.Object mediateFault(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, java.util.Map); + public java.lang.Object mediateOutput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, java.util.Map); + public java.lang.Object mediateInput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, java.util.Map); + public org.apache.tuscany.sca.databinding.TransformationContext createTransformationContext(); + public org.apache.tuscany.sca.databinding.TransformationContext createTransformationContext(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map); + public java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType); + public java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType); + public java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation); + public java.lang.Object copyInput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation); + public java.lang.Object copyInput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation); + public java.lang.Object copyOutput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation); + public java.lang.Object copyOutput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation); + public java.lang.Object copyFault(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation); + public java.lang.Object copyFault(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation); +} + +Compiled from "PipedTransformer.java" +public class org.apache.tuscany.sca.databinding.impl.PipedTransformer extends java.lang.Object implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.impl.PipedTransformer(org.apache.tuscany.sca.databinding.PushTransformer, org.apache.tuscany.sca.databinding.DataPipeTransformer); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); + public java.lang.String getSourceDataBinding(); + public java.lang.String getTargetDataBinding(); + public int getWeight(); +} + +Compiled from "SimpleType2JavaTransformer.java" +public abstract class org.apache.tuscany.sca.databinding.impl.SimpleType2JavaTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + protected org.apache.tuscany.sca.databinding.SimpleTypeMapper mapper; + public org.apache.tuscany.sca.databinding.impl.SimpleType2JavaTransformer(); + public org.apache.tuscany.sca.databinding.impl.SimpleType2JavaTransformer(org.apache.tuscany.sca.databinding.SimpleTypeMapper); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getTargetType(); + public int getWeight(); + protected abstract java.lang.String getText(java.lang.Object); + protected void close(java.lang.Object); + public java.lang.String getTargetDataBinding(); +} + +Compiled from "SimpleTypeMapperImpl.java" +public class org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl extends org.apache.tuscany.sca.databinding.impl.XSDDataTypeConverter implements org.apache.tuscany.sca.databinding.SimpleTypeMapper{ + public static final java.util.Map JAVA2XML; + public static final java.lang.String URI_2001_SCHEMA_XSD; + public static final java.util.Map XML2JAVA; + public static final javax.xml.namespace.QName XSD_ANY; + public static final javax.xml.namespace.QName XSD_ANYSIMPLETYPE; + public static final javax.xml.namespace.QName XSD_ANYTYPE; + public static final javax.xml.namespace.QName XSD_ANYURI; + public static final javax.xml.namespace.QName XSD_BASE64; + public static final javax.xml.namespace.QName XSD_BOOLEAN; + public static final javax.xml.namespace.QName XSD_BYTE; + public static final javax.xml.namespace.QName XSD_DATE; + public static final javax.xml.namespace.QName XSD_DATETIME; + public static final javax.xml.namespace.QName XSD_DAY; + public static final javax.xml.namespace.QName XSD_DECIMAL; + public static final javax.xml.namespace.QName XSD_DOUBLE; + public static final javax.xml.namespace.QName XSD_DURATION; + public static final javax.xml.namespace.QName XSD_ENTITIES; + public static final javax.xml.namespace.QName XSD_ENTITY; + public static final javax.xml.namespace.QName XSD_FLOAT; + public static final javax.xml.namespace.QName XSD_HEXBIN; + public static final javax.xml.namespace.QName XSD_IDREF; + public static final javax.xml.namespace.QName XSD_IDREFS; + public static final javax.xml.namespace.QName XSD_INT; + public static final javax.xml.namespace.QName XSD_INTEGER; + public static final javax.xml.namespace.QName XSD_LONG; + public static final javax.xml.namespace.QName XSD_MONTH; + public static final javax.xml.namespace.QName XSD_MONTHDAY; + public static final javax.xml.namespace.QName XSD_NAME; + public static final javax.xml.namespace.QName XSD_NCNAME; + public static final javax.xml.namespace.QName XSD_NEGATIVEINTEGER; + public static final javax.xml.namespace.QName XSD_NMTOKEN; + public static final javax.xml.namespace.QName XSD_NMTOKENS; + public static final javax.xml.namespace.QName XSD_NONNEGATIVEINTEGER; + public static final javax.xml.namespace.QName XSD_NONPOSITIVEINTEGER; + public static final javax.xml.namespace.QName XSD_NORMALIZEDSTRING; + public static final javax.xml.namespace.QName XSD_NOTATION; + public static final javax.xml.namespace.QName XSD_POSITIVEINTEGER; + public static final javax.xml.namespace.QName XSD_QNAME; + public static final javax.xml.namespace.QName XSD_SHORT; + public static final java.util.Map XSD_SIMPLE_TYPES; + public static final javax.xml.namespace.QName XSD_STRING; + public static final javax.xml.namespace.QName XSD_TIME; + public static final javax.xml.namespace.QName XSD_TOKEN; + public static final javax.xml.namespace.QName XSD_UNSIGNEDBYTE; + public static final javax.xml.namespace.QName XSD_UNSIGNEDINT; + public static final javax.xml.namespace.QName XSD_UNSIGNEDLONG; + public static final javax.xml.namespace.QName XSD_UNSIGNEDSHORT; + public static final javax.xml.namespace.QName XSD_YEAR; + public static final javax.xml.namespace.QName XSD_YEARMONTH; + public org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl(); + public java.lang.Class getJavaType(javax.xml.namespace.QName); + public org.apache.tuscany.sca.interfacedef.util.TypeInfo getXMLType(java.lang.Class); + public java.lang.Object toJavaObject(javax.xml.namespace.QName, java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext); + public java.lang.String toXMLLiteral(javax.xml.namespace.QName, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); + public boolean isSimpleXSDType(javax.xml.namespace.QName); + static {}; +} + +Compiled from "TransformationContextImpl.java" +public class org.apache.tuscany.sca.databinding.impl.TransformationContextImpl extends java.lang.Object implements org.apache.tuscany.sca.databinding.TransformationContext{ + public org.apache.tuscany.sca.databinding.impl.TransformationContextImpl(); + public org.apache.tuscany.sca.databinding.impl.TransformationContextImpl(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map); + public org.apache.tuscany.sca.interfacedef.DataType getSourceDataType(); + public org.apache.tuscany.sca.interfacedef.DataType getTargetDataType(); + public void setSourceDataType(org.apache.tuscany.sca.interfacedef.DataType); + public void setTargetDataType(org.apache.tuscany.sca.interfacedef.DataType); + public java.util.Map getMetadata(); + public org.apache.tuscany.sca.interfacedef.Operation getSourceOperation(); + public void setSourceOperation(org.apache.tuscany.sca.interfacedef.Operation); + public org.apache.tuscany.sca.interfacedef.Operation getTargetOperation(); + public void setTargetOperation(org.apache.tuscany.sca.interfacedef.Operation); +} + +Compiled from "XSDDataTypeConverter.java" +public class org.apache.tuscany.sca.databinding.impl.XSDDataTypeConverter extends java.lang.Object{ + public org.apache.tuscany.sca.databinding.impl.XSDDataTypeConverter(); + public java.lang.String parseAnySimpleType(java.lang.String); + public byte[] parseBase64Binary(java.lang.String); + public boolean parseBoolean(java.lang.String); + public byte parseByte(java.lang.String); + public java.util.Calendar parseDate(java.lang.String); + public java.util.Calendar parseDateTime(java.lang.String); + public java.math.BigDecimal parseDecimal(java.lang.String); + public double parseDouble(java.lang.String); + public javax.xml.datatype.Duration parseDuration(java.lang.String); + public float parseFloat(java.lang.String); + public byte[] parseHexBinary(java.lang.String); + public int parseInt(java.lang.String); + public java.math.BigInteger parseInteger(java.lang.String); + public long parseLong(java.lang.String); + public javax.xml.namespace.QName parseQName(java.lang.String, javax.xml.namespace.NamespaceContext); + public short parseShort(java.lang.String); + public java.lang.String parseString(java.lang.String); + public java.util.Calendar parseTime(java.lang.String); + public long parseUnsignedInt(java.lang.String); + public int parseUnsignedShort(java.lang.String); + public java.lang.String printAnySimpleType(java.lang.String); + public java.lang.String printBase64Binary(byte[]); + public java.lang.String printBoolean(boolean); + public java.lang.String printByte(byte); + public java.lang.String printDate(java.util.Calendar); + public java.lang.String printDateTime(java.util.Calendar); + public java.lang.String printDecimal(java.math.BigDecimal); + public java.lang.String printDouble(double); + public java.lang.String printDuration(javax.xml.datatype.Duration); + public java.lang.String printFloat(float); + public java.lang.String printHexBinary(byte[]); + public java.lang.String printInt(int); + public java.lang.String printInteger(java.math.BigInteger); + public java.lang.String printLong(long); + public java.lang.String printQName(javax.xml.namespace.QName, javax.xml.namespace.NamespaceContext); + public java.lang.String printShort(short); + public java.lang.String printString(java.lang.String); + public java.lang.String printTime(java.util.Calendar); + public java.lang.String printUnsignedInt(long); + public java.lang.String printUnsignedShort(int); +} + +Compiled from "BeanXMLStreamReaderImpl.java" +public class org.apache.tuscany.sca.databinding.xml.BeanXMLStreamReaderImpl extends org.apache.tuscany.sca.common.xml.stax.reader.XmlTreeStreamReaderImpl{ + public org.apache.tuscany.sca.databinding.xml.BeanXMLStreamReaderImpl(javax.xml.namespace.QName, java.lang.Object); + static java.util.Map access$000(java.lang.Object) throws java.lang.Exception; + static java.util.Comparator access$100(); + static {}; +} + +Compiled from "DOMDataBinding.java" +public class org.apache.tuscany.sca.databinding.xml.DOMDataBinding extends org.apache.tuscany.sca.databinding.BaseDataBinding{ + public static final java.lang.String NAME; + public static final java.lang.String ROOT_NAMESPACE; + public static final javax.xml.namespace.QName ROOT_ELEMENT; + public org.apache.tuscany.sca.databinding.xml.DOMDataBinding(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.apache.tuscany.sca.databinding.WrapperHandler getWrapperHandler(); + public java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation); + public boolean introspect(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation); + public static org.w3c.dom.Element adjustElementName(org.apache.tuscany.sca.databinding.TransformationContext, org.w3c.dom.Element); + static {}; +} + +Compiled from "DOMWrapperHandler.java" +public class org.apache.tuscany.sca.databinding.xml.DOMWrapperHandler extends java.lang.Object implements org.apache.tuscany.sca.databinding.WrapperHandler{ + static final boolean $assertionsDisabled; + public org.apache.tuscany.sca.databinding.xml.DOMWrapperHandler(org.apache.tuscany.sca.common.xml.dom.DOMHelper); + public org.w3c.dom.Node create(org.apache.tuscany.sca.interfacedef.Operation, boolean); + public void setChildren(org.w3c.dom.Node, java.lang.Object[], org.apache.tuscany.sca.interfacedef.Operation, boolean); + public void setChild(org.w3c.dom.Node, int, org.apache.tuscany.sca.interfacedef.util.ElementInfo, java.lang.Object); + public java.util.List getChildren(org.w3c.dom.Node, org.apache.tuscany.sca.interfacedef.Operation, boolean); + public org.apache.tuscany.sca.interfacedef.DataType getWrapperType(org.apache.tuscany.sca.interfacedef.Operation, boolean); + public boolean isInstance(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, boolean); + public java.util.List getChildren(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, boolean); + public void setChildren(java.lang.Object, java.lang.Object[], org.apache.tuscany.sca.interfacedef.Operation, boolean); + public java.lang.Object create(org.apache.tuscany.sca.interfacedef.Operation, boolean); + static {}; +} + +Compiled from "InputSource2Node.java" +public class org.apache.tuscany.sca.databinding.xml.InputSource2Node extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.xml.InputSource2Node(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.w3c.dom.Node transform(org.xml.sax.InputSource, org.apache.tuscany.sca.databinding.TransformationContext); + public java.lang.Class getSourceType(); + public java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "InputSource2SAX.java" +public class org.apache.tuscany.sca.databinding.xml.InputSource2SAX extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{ + public org.apache.tuscany.sca.databinding.xml.InputSource2SAX(); + public void transform(org.xml.sax.InputSource, org.xml.sax.ContentHandler, org.apache.tuscany.sca.databinding.TransformationContext); + public java.lang.Class getSourceType(); + public java.lang.Class getTargetType(); + public int getWeight(); + public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "InputStream2Node.java" +public class org.apache.tuscany.sca.databinding.xml.InputStream2Node extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.xml.InputStream2Node(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.w3c.dom.Node transform(java.io.InputStream, org.apache.tuscany.sca.databinding.TransformationContext); + public java.lang.Class getSourceType(); + public java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "InputStream2SAX.java" +public class org.apache.tuscany.sca.databinding.xml.InputStream2SAX extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{ + public org.apache.tuscany.sca.databinding.xml.InputStream2SAX(); + public void transform(java.io.InputStream, org.xml.sax.ContentHandler, org.apache.tuscany.sca.databinding.TransformationContext); + public java.lang.Class getSourceType(); + public java.lang.Class getTargetType(); + public int getWeight(); + public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "Node2OutputStream.java" +public class org.apache.tuscany.sca.databinding.xml.Node2OutputStream extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{ + public org.apache.tuscany.sca.databinding.xml.Node2OutputStream(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void transform(org.w3c.dom.Node, java.io.OutputStream, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "Node2SimpleJavaType.java" +public class org.apache.tuscany.sca.databinding.xml.Node2SimpleJavaType extends org.apache.tuscany.sca.databinding.impl.SimpleType2JavaTransformer{ + public org.apache.tuscany.sca.databinding.xml.Node2SimpleJavaType(); + protected java.lang.String getText(org.w3c.dom.Node); + public java.lang.Class getSourceType(); + protected java.lang.String getText(java.lang.Object); +} + +Compiled from "Node2SourceTransformer.java" +public class org.apache.tuscany.sca.databinding.xml.Node2SourceTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.xml.Node2SourceTransformer(); + public javax.xml.transform.Source transform(org.w3c.dom.Node, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "Node2String.java" +public class org.apache.tuscany.sca.databinding.xml.Node2String extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.xml.Node2String(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public java.lang.String transform(org.w3c.dom.Node, org.apache.tuscany.sca.databinding.TransformationContext); + public java.lang.Class getSourceType(); + public java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "Node2Writer.java" +public class org.apache.tuscany.sca.databinding.xml.Node2Writer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{ + public org.apache.tuscany.sca.databinding.xml.Node2Writer(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void transform(org.w3c.dom.Node, java.io.Writer, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "Node2XMLStreamReader.java" +public class org.apache.tuscany.sca.databinding.xml.Node2XMLStreamReader extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.xml.Node2XMLStreamReader(); + public javax.xml.stream.XMLStreamReader transform(org.w3c.dom.Node, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "Reader2Node.java" +public class org.apache.tuscany.sca.databinding.xml.Reader2Node extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.xml.Reader2Node(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.w3c.dom.Node transform(java.io.Reader, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "Reader2SAX.java" +public class org.apache.tuscany.sca.databinding.xml.Reader2SAX extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{ + public org.apache.tuscany.sca.databinding.xml.Reader2SAX(); + public void transform(java.io.Reader, org.xml.sax.ContentHandler, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "SAX2DOMPipe.java" +public class org.apache.tuscany.sca.databinding.xml.SAX2DOMPipe extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.DataPipeTransformer{ + public org.apache.tuscany.sca.databinding.xml.SAX2DOMPipe(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.apache.tuscany.sca.databinding.DataPipe newInstance(); + protected java.lang.Class getTargetType(); + protected java.lang.Class getSourceType(); + public int getWeight(); + static org.apache.tuscany.sca.common.xml.dom.DOMHelper access$000(org.apache.tuscany.sca.databinding.xml.SAX2DOMPipe); +} + +Compiled from "SimpleJavaType2Node.java" +public class org.apache.tuscany.sca.databinding.xml.SimpleJavaType2Node extends org.apache.tuscany.sca.databinding.impl.Java2SimpleTypeTransformer{ + public org.apache.tuscany.sca.databinding.xml.SimpleJavaType2Node(org.apache.tuscany.sca.core.ExtensionPointRegistry); + protected org.w3c.dom.Node createElement(javax.xml.namespace.QName, java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext); + public java.lang.Class getTargetType(); + protected java.lang.Object createElement(javax.xml.namespace.QName, java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "Source2NodeTransformer.java" +public class org.apache.tuscany.sca.databinding.xml.Source2NodeTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.xml.Source2NodeTransformer(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.w3c.dom.Node transform(javax.xml.transform.Source, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "Source2ResultTransformer.java" +public class org.apache.tuscany.sca.databinding.xml.Source2ResultTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{ + public org.apache.tuscany.sca.databinding.xml.Source2ResultTransformer(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void transform(javax.xml.transform.Source, javax.xml.transform.Result, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "Source2StringTransformer.java" +public class org.apache.tuscany.sca.databinding.xml.Source2StringTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.xml.Source2StringTransformer(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public java.lang.String transform(javax.xml.transform.Source, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "StAXDataBinding.java" +public class org.apache.tuscany.sca.databinding.xml.StAXDataBinding extends org.apache.tuscany.sca.databinding.BaseDataBinding{ + public static final java.lang.String NAME; + public org.apache.tuscany.sca.databinding.xml.StAXDataBinding(); + public boolean introspect(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation); + static {}; +} + +Compiled from "StreamDataPipe.java" +public class org.apache.tuscany.sca.databinding.xml.StreamDataPipe extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.DataPipeTransformer{ + public org.apache.tuscany.sca.databinding.xml.StreamDataPipe(); + public org.apache.tuscany.sca.databinding.DataPipe newInstance(); + protected java.lang.Class getTargetType(); + public int getWeight(); + protected java.lang.Class getSourceType(); +} + +Compiled from "String2Node.java" +public class org.apache.tuscany.sca.databinding.xml.String2Node extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.xml.String2Node(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.w3c.dom.Node transform(java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "String2SAX.java" +public class org.apache.tuscany.sca.databinding.xml.String2SAX extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{ + public org.apache.tuscany.sca.databinding.xml.String2SAX(); + public void transform(java.lang.String, org.xml.sax.ContentHandler, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "String2SourceTransformer.java" +public class org.apache.tuscany.sca.databinding.xml.String2SourceTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.xml.String2SourceTransformer(); + public javax.xml.transform.Source transform(java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "String2XMLStreamReader.java" +public class org.apache.tuscany.sca.databinding.xml.String2XMLStreamReader extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.xml.String2XMLStreamReader(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public javax.xml.stream.XMLStreamReader transform(java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "Writer2ReaderDataPipe.java" +public class org.apache.tuscany.sca.databinding.xml.Writer2ReaderDataPipe extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.DataPipeTransformer{ + public org.apache.tuscany.sca.databinding.xml.Writer2ReaderDataPipe(); + public org.apache.tuscany.sca.databinding.DataPipe newInstance(); + protected java.lang.Class getTargetType(); + public int getWeight(); + protected java.lang.Class getSourceType(); +} + +Compiled from "XMLGroupDataBinding.java" +public class org.apache.tuscany.sca.databinding.xml.XMLGroupDataBinding extends org.apache.tuscany.sca.databinding.impl.GroupDataBinding{ + public org.apache.tuscany.sca.databinding.xml.XMLGroupDataBinding(); + protected java.lang.Object getLogical(java.lang.Class, org.apache.tuscany.sca.interfacedef.Operation); +} + +Compiled from "XMLStreamReader2Node.java" +public class org.apache.tuscany.sca.databinding.xml.XMLStreamReader2Node extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.xml.XMLStreamReader2Node(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public org.w3c.dom.Node transform(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "XMLStreamReader2SAX.java" +public class org.apache.tuscany.sca.databinding.xml.XMLStreamReader2SAX extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{ + public org.apache.tuscany.sca.databinding.xml.XMLStreamReader2SAX(org.apache.tuscany.sca.core.ExtensionPointRegistry); + protected java.lang.Class getTargetType(); + protected java.lang.Class getSourceType(); + public int getWeight(); + public void transform(javax.xml.stream.XMLStreamReader, org.xml.sax.ContentHandler, org.apache.tuscany.sca.databinding.TransformationContext); + public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "XMLStreamReader2String.java" +public class org.apache.tuscany.sca.databinding.xml.XMLStreamReader2String extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{ + public org.apache.tuscany.sca.databinding.xml.XMLStreamReader2String(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public java.lang.String transform(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.databinding.TransformationContext); + protected java.lang.Class getSourceType(); + protected java.lang.Class getTargetType(); + public int getWeight(); + public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext); +} + +Compiled from "XMLStringDataBinding.java" +public class org.apache.tuscany.sca.databinding.xml.XMLStringDataBinding extends org.apache.tuscany.sca.databinding.BaseDataBinding{ + public static final java.lang.String NAME; + public org.apache.tuscany.sca.databinding.xml.XMLStringDataBinding(); + public boolean introspect(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation); + static {}; +} + +Compiled from "DefaultDeployer.java" +public class org.apache.tuscany.sca.deployment.DefaultDeployer extends org.apache.tuscany.sca.deployment.impl.DeployerImpl{ + public org.apache.tuscany.sca.deployment.DefaultDeployer(); + public org.apache.tuscany.sca.deployment.DefaultDeployer(org.apache.tuscany.sca.core.ExtensionPointRegistry); +} + +Compiled from "Deployer.java" +public interface org.apache.tuscany.sca.deployment.Deployer extends org.apache.tuscany.sca.core.LifeCycleListener{ + public abstract boolean isSchemaValidationEnabled(); + public abstract void setSchemaValidationEnabled(boolean); + public abstract java.lang.String attachDeploymentComposite(org.apache.tuscany.sca.contribution.Contribution, org.apache.tuscany.sca.assembly.Composite, boolean); + public abstract org.apache.tuscany.sca.assembly.Composite build(java.util.List, java.util.List, java.util.Map, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException, org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; + public abstract org.apache.tuscany.sca.contribution.Artifact loadArtifact(java.net.URI, java.net.URL, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException; + public abstract org.apache.tuscany.sca.contribution.Contribution loadContribution(java.net.URI, java.net.URL, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException; + public abstract java.lang.Object loadDocument(java.net.URI, java.net.URL, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException; + public abstract java.lang.Object loadXMLDocument(java.io.Reader, org.apache.tuscany.sca.monitor.Monitor) throws javax.xml.stream.XMLStreamException, org.apache.tuscany.sca.contribution.processor.ContributionReadException; + public abstract java.lang.Object loadXMLDocument(java.net.URL, org.apache.tuscany.sca.monitor.Monitor) throws javax.xml.stream.XMLStreamException, org.apache.tuscany.sca.contribution.processor.ContributionReadException; + public abstract java.lang.Object loadXMLElement(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException; + public abstract void saveXMLDocument(java.lang.Object, java.io.Writer, org.apache.tuscany.sca.monitor.Monitor) throws javax.xml.stream.XMLStreamException, org.apache.tuscany.sca.contribution.processor.ContributionWriteException; + public abstract void saveXMLElement(java.lang.Object, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.monitor.Monitor) throws javax.xml.stream.XMLStreamException, org.apache.tuscany.sca.contribution.processor.ContributionWriteException; + public abstract org.apache.tuscany.sca.monitor.Monitor createMonitor(); + public abstract org.apache.tuscany.sca.assembly.builder.BuilderContext createBuilderContext(); + public abstract org.apache.tuscany.sca.contribution.processor.ProcessorContext createProcessorContext(); + public abstract org.apache.tuscany.sca.core.ExtensionPointRegistry getExtensionPointRegistry(); + public abstract org.apache.tuscany.sca.definitions.Definitions getSystemDefinitions(); + public abstract void resolve(org.apache.tuscany.sca.contribution.Contribution, java.util.List, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException, org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; +} + +Compiled from "DefaultExtensionPointRegistry.java" +public class org.apache.tuscany.sca.core.DefaultExtensionPointRegistry extends java.lang.Object implements org.apache.tuscany.sca.core.ExtensionPointRegistry{ + protected java.util.Map extensionPoints; + public org.apache.tuscany.sca.core.DefaultExtensionPointRegistry(); + public org.apache.tuscany.sca.core.DefaultExtensionPointRegistry(org.apache.tuscany.sca.extensibility.ServiceDiscovery); + public synchronized void addExtensionPoint(java.lang.Object); + public synchronized void addExtensionPoint(java.lang.Object, org.apache.tuscany.sca.extensibility.ServiceDeclaration); + protected void registerExtensionPoint(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.extensibility.ServiceDeclaration); + public synchronized java.lang.Object getExtensionPoint(java.lang.Class); + protected java.lang.Object findExtensionPoint(java.lang.Class); + public synchronized void removeExtensionPoint(java.lang.Object); + protected void unregisterExtensionPoint(java.lang.Class); + public synchronized void start(); + public synchronized void stop(); + public org.apache.tuscany.sca.extensibility.ServiceDiscovery getServiceDiscovery(); +} + +Compiled from "DefaultFactoryExtensionPoint.java" +public class org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.core.FactoryExtensionPoint{ + public org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void addFactory(java.lang.Object); + public void removeFactory(java.lang.Object); + public java.lang.Object getFactory(java.lang.Class); +} + +Compiled from "DefaultModuleActivatorExtensionPoint.java" +public class org.apache.tuscany.sca.core.DefaultModuleActivatorExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint{ + public org.apache.tuscany.sca.core.DefaultModuleActivatorExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void addModuleActivator(org.apache.tuscany.sca.core.ModuleActivator); + public java.util.List getModuleActivators(); + public void removeModuleActivator(org.apache.tuscany.sca.core.ModuleActivator); + public void start(); + public void stop(); + static {}; +} + +Compiled from "DefaultUtilityExtensionPoint.java" +public class org.apache.tuscany.sca.core.DefaultUtilityExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.core.UtilityExtensionPoint{ + public org.apache.tuscany.sca.core.DefaultUtilityExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public void addUtility(java.lang.Object); + public void addUtility(java.lang.Object, java.lang.Object); + public java.lang.Object getUtility(java.lang.Class); + public void removeUtility(java.lang.Object); + public java.lang.Object getUtility(java.lang.Class, java.lang.Object); + public void start(); + public synchronized void stop(); +} + +Compiled from "ExtensionPointRegistry.java" +public interface org.apache.tuscany.sca.core.ExtensionPointRegistry extends org.apache.tuscany.sca.core.LifeCycleListener{ + public abstract void addExtensionPoint(java.lang.Object); + public abstract java.lang.Object getExtensionPoint(java.lang.Class); + public abstract void removeExtensionPoint(java.lang.Object); + public abstract org.apache.tuscany.sca.extensibility.ServiceDiscovery getServiceDiscovery(); +} + +Compiled from "FactoryExtensionPoint.java" +public interface org.apache.tuscany.sca.core.FactoryExtensionPoint{ + public abstract void addFactory(java.lang.Object); + public abstract void removeFactory(java.lang.Object); + public abstract java.lang.Object getFactory(java.lang.Class); +} + +Compiled from "LifeCycleListener.java" +public interface org.apache.tuscany.sca.core.LifeCycleListener{ + public abstract void start(); + public abstract void stop(); +} + +Compiled from "ModuleActivator.java" +public interface org.apache.tuscany.sca.core.ModuleActivator extends org.apache.tuscany.sca.core.LifeCycleListener{ + public abstract void start(); + public abstract void stop(); +} + +Compiled from "ModuleActivatorExtensionPoint.java" +public interface org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint extends org.apache.tuscany.sca.core.LifeCycleListener{ + public abstract void addModuleActivator(org.apache.tuscany.sca.core.ModuleActivator); + public abstract java.util.List getModuleActivators(); + public abstract void removeModuleActivator(org.apache.tuscany.sca.core.ModuleActivator); +} + +Compiled from "UtilityExtensionPoint.java" +public interface org.apache.tuscany.sca.core.UtilityExtensionPoint extends org.apache.tuscany.sca.core.LifeCycleListener{ + public abstract void addUtility(java.lang.Object); + public abstract void addUtility(java.lang.Object, java.lang.Object); + public abstract java.lang.Object getUtility(java.lang.Class); + public abstract java.lang.Object getUtility(java.lang.Class, java.lang.Object); + public abstract void removeUtility(java.lang.Object); +} + +Compiled from "ClassLoaderContext.java" +public class org.apache.tuscany.sca.extensibility.ClassLoaderContext extends java.lang.Object{ + public org.apache.tuscany.sca.extensibility.ClassLoaderContext(java.lang.ClassLoader, org.apache.tuscany.sca.extensibility.ServiceDiscovery, java.lang.Class[]); + public org.apache.tuscany.sca.extensibility.ClassLoaderContext(java.lang.ClassLoader, java.lang.ClassLoader[]); + public org.apache.tuscany.sca.extensibility.ClassLoaderContext(java.lang.ClassLoader, org.apache.tuscany.sca.extensibility.ServiceDiscovery, java.lang.String[]); + public java.lang.Object doPrivileged(java.security.PrivilegedAction); + public java.lang.Object doPrivileged(java.security.PrivilegedExceptionAction) throws java.security.PrivilegedActionException; + public static java.lang.ClassLoader setContextClassLoader(java.lang.ClassLoader, java.lang.ClassLoader[]); + public static java.lang.ClassLoader setContextClassLoader(java.lang.ClassLoader, org.apache.tuscany.sca.extensibility.ServiceDiscovery, java.lang.String[]); + public static java.lang.ClassLoader setContextClassLoader(java.lang.ClassLoader, org.apache.tuscany.sca.extensibility.ServiceDiscovery, java.lang.Class[]); + public java.lang.ClassLoader setContextClassLoader(); + public java.lang.ClassLoader getClassLoader(); +} + +Compiled from "ContextClassLoaderServiceDiscoverer.java" +public class org.apache.tuscany.sca.extensibility.ContextClassLoaderServiceDiscoverer extends java.lang.Object implements org.apache.tuscany.sca.extensibility.ServiceDiscoverer{ + public org.apache.tuscany.sca.extensibility.ContextClassLoaderServiceDiscoverer(); + public org.apache.tuscany.sca.extensibility.ContextClassLoaderServiceDiscoverer(java.lang.ClassLoader); + public java.lang.ClassLoader getContextClassLoader(); + public org.apache.tuscany.sca.extensibility.ServiceDeclaration getServiceDeclaration(java.lang.String) throws java.io.IOException; + public java.util.Collection getServiceDeclarations(java.lang.String); + static java.lang.ref.WeakReference access$000(org.apache.tuscany.sca.extensibility.ContextClassLoaderServiceDiscoverer); + static java.util.Collection access$100(org.apache.tuscany.sca.extensibility.ContextClassLoaderServiceDiscoverer, java.lang.String) throws java.io.IOException; + static {}; +} + +Compiled from "ServiceDeclaration.java" +public interface org.apache.tuscany.sca.extensibility.ServiceDeclaration{ + public abstract java.lang.Class loadClass(java.lang.String) throws java.lang.ClassNotFoundException; + public abstract java.lang.Class loadClass() throws java.lang.ClassNotFoundException; + public abstract java.util.Map getAttributes(); + public abstract boolean isAssignableTo(java.lang.Class); + public abstract java.net.URL getLocation(); + public abstract java.lang.String getClassName(); + public abstract java.net.URL getResource(java.lang.String); + public abstract java.util.Enumeration getResources(java.lang.String) throws java.io.IOException; + public abstract boolean equals(java.lang.Object); + public abstract int hashCode(); +} + +Compiled from "ServiceDeclarationParser.java" +public class org.apache.tuscany.sca.extensibility.ServiceDeclarationParser extends java.lang.Object{ + public org.apache.tuscany.sca.extensibility.ServiceDeclarationParser(); + public static java.util.List parse(java.lang.String); + public static java.util.Map parseDeclaration(java.lang.String); + public static javax.xml.namespace.QName getQName(java.lang.String); + public static java.util.Collection load(java.net.URL, boolean) throws java.io.IOException; +} + +Compiled from "ServiceDiscoverer.java" +public interface org.apache.tuscany.sca.extensibility.ServiceDiscoverer{ + public abstract java.util.Collection getServiceDeclarations(java.lang.String) throws java.io.IOException; + public abstract org.apache.tuscany.sca.extensibility.ServiceDeclaration getServiceDeclaration(java.lang.String) throws java.io.IOException; + public abstract java.lang.ClassLoader getContextClassLoader(); +} + +Compiled from "ServiceDiscovery.java" +public final class org.apache.tuscany.sca.extensibility.ServiceDiscovery extends java.lang.Object implements org.apache.tuscany.sca.extensibility.ServiceDiscoverer{ + public static org.apache.tuscany.sca.extensibility.ServiceDiscovery getInstance(); + public static org.apache.tuscany.sca.extensibility.ServiceDiscovery getInstance(org.apache.tuscany.sca.extensibility.ServiceDiscoverer); + public org.apache.tuscany.sca.extensibility.ServiceDiscoverer getServiceDiscoverer(); + public void setServiceDiscoverer(org.apache.tuscany.sca.extensibility.ServiceDiscoverer); + public java.util.Collection getServiceDeclarations(java.lang.String) throws java.io.IOException; + public java.util.Collection getServiceDeclarations(java.lang.String, boolean) throws java.io.IOException; + public org.apache.tuscany.sca.extensibility.ServiceDeclaration getServiceDeclaration(java.lang.String) throws java.io.IOException; + public java.util.Collection getServiceDeclarations(java.lang.Class, boolean) throws java.io.IOException; + public java.util.Collection getServiceDeclarations(java.lang.Class) throws java.io.IOException; + public java.util.Collection getServiceDeclarations(java.lang.Class, java.lang.String) throws java.io.IOException; + public java.util.Collection getServiceDeclarations(java.lang.String, java.lang.String) throws java.io.IOException; + public org.apache.tuscany.sca.extensibility.ServiceDeclaration getServiceDeclaration(java.lang.Class) throws java.io.IOException; + public java.lang.ClassLoader getContextClassLoader(); + public void setAttribute(java.lang.String, java.util.Map); + public void setAttribute(java.lang.String, java.lang.String, java.lang.String); + public java.util.Map getAttributes(java.lang.String); + public static java.util.Collection removeDuplicateDeclarations(java.util.Collection); + static {}; +} + +Compiled from "ServiceHelper.java" +public class org.apache.tuscany.sca.extensibility.ServiceHelper extends java.lang.Object{ + public static boolean start(java.lang.Object); + public static boolean stop(java.lang.Object); + public static void stop(java.util.Collection); + public static java.lang.Object newInstance(java.lang.Class, java.lang.Class, java.lang.Object) throws java.lang.Exception; + public static java.lang.Object newInstance(java.lang.Class, java.lang.Class[], java.lang.Object[]) throws java.lang.Exception; + public static java.lang.Object newInstance(java.lang.Class) throws java.lang.Exception; + public static java.lang.Object newInstance(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.extensibility.ServiceDeclaration) throws java.lang.Exception; + public static java.lang.Object newLazyInstance(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.extensibility.ServiceDeclaration, java.lang.Class); + static {}; +} + +Compiled from "DefaultJavaInterfaceFactory.java" +public class org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory extends org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceFactoryImpl implements org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory{ + public org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry); + public java.util.List getInterfaceVisitors(); + static {}; +} + +Compiled from "JavaInterface.java" +public interface org.apache.tuscany.sca.interfacedef.java.JavaInterface extends org.apache.tuscany.sca.interfacedef.Interface,org.apache.tuscany.sca.assembly.Base{ + public abstract java.lang.String getName(); + public abstract void setName(java.lang.String); + public abstract javax.xml.namespace.QName getQName(); + public abstract void setQName(javax.xml.namespace.QName); + public abstract java.lang.Class getJavaClass(); + public abstract void setJavaClass(java.lang.Class); + public abstract java.lang.Class getCallbackClass(); + public abstract void setCallbackClass(java.lang.Class); + public abstract java.lang.String getJAXWSWSDLLocation(); + public abstract void setJAXWSWSDLLocation(java.lang.String); + public abstract java.lang.String getJAXWSJavaInterfaceName(); + public abstract void setJAXWSJavaInterfaceName(java.lang.String); + public abstract org.apache.tuscany.sca.contribution.Contribution getContributionContainingClass(); + public abstract void setContributionContainingClass(org.apache.tuscany.sca.contribution.Contribution); +} + +Compiled from "JavaInterfaceContract.java" +public interface org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract extends org.apache.tuscany.sca.interfacedef.InterfaceContract{ +} + +Compiled from "JavaInterfaceFactory.java" +public interface org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory{ + public abstract org.apache.tuscany.sca.interfacedef.java.JavaInterface createJavaInterface(); + public abstract org.apache.tuscany.sca.interfacedef.java.JavaInterface createJavaInterface(java.lang.Class) throws org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; + public abstract void createJavaInterface(org.apache.tuscany.sca.interfacedef.java.JavaInterface, java.lang.Class) throws org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; + public abstract org.apache.tuscany.sca.interfacedef.java.JavaOperation createJavaOperation(java.lang.reflect.Method); + public abstract org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract createJavaInterfaceContract(); + public abstract void addInterfaceVisitor(org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor); + public abstract void removeInterfaceVisitor(org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor); + public abstract java.util.List getInterfaceVisitors(); +} + +Compiled from "JavaOperation.java" +public interface org.apache.tuscany.sca.interfacedef.java.JavaOperation extends org.apache.tuscany.sca.interfacedef.Operation{ + public abstract java.lang.reflect.Method getJavaMethod(); + public abstract void setJavaMethod(java.lang.reflect.Method); + public abstract java.lang.String getAction(); + public abstract void setAction(java.lang.String); + public abstract void setAsyncServer(boolean); + public abstract boolean isAsyncServer(); + public abstract boolean hasReturnTypeVoid(); + public abstract void setReturnTypeVoid(boolean); +} + +Compiled from "BPELPartnerLinkTypeExt.java" +public class org.apache.tuscany.sca.interfacedef.wsdl.BPELPartnerLinkTypeExt extends java.lang.Object implements javax.wsdl.extensions.ExtensibilityElement{ + public org.apache.tuscany.sca.interfacedef.wsdl.BPELPartnerLinkTypeExt(); + public javax.xml.namespace.QName getElementType(); + public java.lang.Boolean getRequired(); + public void setElementType(javax.xml.namespace.QName); + public void setRequired(java.lang.Boolean); + public void setName(java.lang.String); + public java.lang.String getName(); + public void setRole(int, java.lang.String, javax.xml.namespace.QName); + public java.lang.String getRoleName(int); + public javax.xml.namespace.QName getRolePortType(int); +} + +Compiled from "DefaultWSDLFactory.java" +public class org.apache.tuscany.sca.interfacedef.wsdl.DefaultWSDLFactory extends org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLFactoryImpl implements org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory{ + public org.apache.tuscany.sca.interfacedef.wsdl.DefaultWSDLFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry); +} + +Compiled from "WSDLDefinition.java" +public interface org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition extends org.apache.tuscany.sca.assembly.Base{ + public abstract javax.wsdl.Definition getDefinition(); + public abstract void setDefinition(javax.wsdl.Definition); + public abstract java.lang.String getNamespace(); + public abstract void setNamespace(java.lang.String); + public abstract java.util.List getXmlSchemas(); + public abstract java.net.URI getLocation(); + public abstract void setLocation(java.net.URI); + public abstract java.net.URI getURI(); + public abstract void setURI(java.net.URI); + public abstract java.util.List getImportedDefinitions(); + public abstract org.apache.ws.commons.schema.XmlSchemaElement getXmlSchemaElement(javax.xml.namespace.QName); + public abstract org.apache.ws.commons.schema.XmlSchemaType getXmlSchemaType(javax.xml.namespace.QName); + public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLObject getWSDLObject(java.lang.Class, javax.xml.namespace.QName); + public abstract javax.wsdl.Binding getBinding(); + public abstract void setBinding(javax.wsdl.Binding); + public abstract javax.xml.namespace.QName getNameOfPortTypeToResolve(); + public abstract void setNameOfPortTypeToResolve(javax.xml.namespace.QName); + public abstract javax.xml.namespace.QName getNameOfBindingToResolve(); + public abstract void setNameOfBindingToResolve(javax.xml.namespace.QName); + public abstract javax.xml.namespace.QName getNameOfServiceToResolve(); + public abstract void setNameOfServiceToResolve(javax.xml.namespace.QName); + public abstract java.util.Map getWsdliLocations(); +} + +Compiled from "WSDLFactory.java" +public interface org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory{ + public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface createWSDLInterface(); + public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface createWSDLInterface(javax.wsdl.PortType, org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; + public abstract void createWSDLInterface(org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface, javax.wsdl.PortType, org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; + public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition createWSDLDefinition(); + public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract createWSDLInterfaceContract(); +} + +Compiled from "WSDLInterface.java" +public interface org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface extends org.apache.tuscany.sca.interfacedef.Interface,org.apache.tuscany.sca.assembly.Base{ + public abstract javax.xml.namespace.QName getName(); + public abstract void setName(javax.xml.namespace.QName); + public abstract javax.wsdl.PortType getPortType(); + public abstract void setPortType(javax.wsdl.PortType); + public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface getCallbackInterface(); + public abstract void setCallbackInterface(org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface); + public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition getWsdlDefinition(); + public abstract void setWsdlDefinition(org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition); +} + +Compiled from "WSDLInterfaceContract.java" +public interface org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract extends org.apache.tuscany.sca.interfacedef.InterfaceContract{ + public abstract void setLocation(java.lang.String); + public abstract java.lang.String getLocation(); +} + +Compiled from "WSDLObject.java" +public interface org.apache.tuscany.sca.interfacedef.wsdl.WSDLObject{ + public abstract javax.wsdl.Definition getDefinition(); + public abstract void setDefinition(javax.wsdl.Definition); + public abstract java.io.Serializable getElement(); + public abstract void setElement(java.io.Serializable); +} + +Compiled from "WSDLOperation.java" +public interface org.apache.tuscany.sca.interfacedef.wsdl.WSDLOperation extends org.apache.tuscany.sca.interfacedef.Operation{ + public abstract javax.wsdl.Operation getWsdlOperation(); + public abstract void setWsdlOperation(javax.wsdl.Operation); +} + +Compiled from "DefaultMonitorFactory.java" +public class org.apache.tuscany.sca.monitor.DefaultMonitorFactory extends java.lang.Object implements org.apache.tuscany.sca.monitor.MonitorFactory{ + public org.apache.tuscany.sca.monitor.DefaultMonitorFactory(); + public org.apache.tuscany.sca.monitor.Monitor createMonitor(); + public org.apache.tuscany.sca.monitor.Monitor getContextMonitor(); + public org.apache.tuscany.sca.monitor.Monitor getContextMonitor(boolean); + public org.apache.tuscany.sca.monitor.Monitor removeContextMonitor(); + public org.apache.tuscany.sca.monitor.Monitor setContextMonitor(org.apache.tuscany.sca.monitor.Monitor); +} + +Compiled from "Monitor.java" +public abstract class org.apache.tuscany.sca.monitor.Monitor extends java.lang.Object{ + public org.apache.tuscany.sca.monitor.Monitor(); + public static void error(org.apache.tuscany.sca.monitor.Monitor, java.lang.Object, java.lang.String, java.lang.String, java.lang.Object[]); + public static void error(org.apache.tuscany.sca.monitor.Monitor, java.lang.Object, java.lang.String, java.lang.String, java.lang.Throwable); + public static void error(org.apache.tuscany.sca.monitor.Monitor, java.lang.Object, java.lang.String, java.lang.String, java.lang.Throwable, java.lang.Object[]); + public static void warning(org.apache.tuscany.sca.monitor.Monitor, java.lang.Object, java.lang.String, java.lang.String, java.lang.Object[]); + public static void warning(org.apache.tuscany.sca.monitor.Monitor, java.lang.Object, java.lang.String, java.lang.String, java.lang.Throwable); + public static void warning(org.apache.tuscany.sca.monitor.Monitor, java.lang.Object, java.lang.String, java.lang.String, java.lang.Throwable, java.lang.Object[]); + public abstract org.apache.tuscany.sca.monitor.Problem createProblem(java.lang.String, java.lang.String, org.apache.tuscany.sca.monitor.Problem$Severity, java.lang.Object, java.lang.String, java.lang.Object[]); + public abstract org.apache.tuscany.sca.monitor.Problem createProblem(java.lang.String, java.lang.String, org.apache.tuscany.sca.monitor.Problem$Severity, java.lang.Object, java.lang.String, java.lang.Throwable); + public abstract java.lang.String getArtifactName(); + public abstract org.apache.tuscany.sca.monitor.Problem getLastProblem(); + public abstract java.util.List getProblems(); + public abstract java.lang.Object popContext(); + public abstract void problem(org.apache.tuscany.sca.monitor.Problem); + public abstract void pushContext(java.lang.Object); + public abstract void reset(); + public abstract void setArtifactName(java.lang.String); + public void analyzeProblems() throws org.apache.tuscany.sca.monitor.ValidationException; + static {}; +} + +Compiled from "MonitorFactory.java" +public interface org.apache.tuscany.sca.monitor.MonitorFactory{ + public abstract org.apache.tuscany.sca.monitor.Monitor createMonitor(); + public abstract org.apache.tuscany.sca.monitor.Monitor getContextMonitor(); + public abstract org.apache.tuscany.sca.monitor.Monitor getContextMonitor(boolean); + public abstract org.apache.tuscany.sca.monitor.Monitor removeContextMonitor(); + public abstract org.apache.tuscany.sca.monitor.Monitor setContextMonitor(org.apache.tuscany.sca.monitor.Monitor); +} + +Compiled from "Problem.java" +public interface org.apache.tuscany.sca.monitor.Problem{ + public abstract java.lang.String getSourceClassName(); + public abstract java.lang.String getResourceBundleName(); + public abstract org.apache.tuscany.sca.monitor.Problem$Severity getSeverity(); + public abstract java.lang.String getContext(); + public abstract java.lang.Object getProblemObject(); + public abstract java.lang.String getMessageId(); + public abstract java.lang.Throwable getCause(); + public abstract java.lang.Object[] getMessageParams(); +} + +Compiled from "ValidationException.java" +public class org.apache.tuscany.sca.monitor.ValidationException extends java.lang.Exception{ + public org.apache.tuscany.sca.monitor.ValidationException(); + public org.apache.tuscany.sca.monitor.ValidationException(java.lang.String, java.lang.Throwable); + public org.apache.tuscany.sca.monitor.ValidationException(java.lang.String); + public org.apache.tuscany.sca.monitor.ValidationException(java.lang.Throwable); +} + +Compiled from "Contribution.java" +public final class org.apache.tuscany.sca.node.Contribution extends java.lang.Object{ + public org.apache.tuscany.sca.node.Contribution(java.lang.String, java.lang.String); + public java.lang.String getURI(); + public java.lang.String getLocation(); +} + +Compiled from "ContributionLocationHelper.java" +public class org.apache.tuscany.sca.node.ContributionLocationHelper extends java.lang.Object{ + public org.apache.tuscany.sca.node.ContributionLocationHelper(); + public static java.lang.String getContributionLocation(java.lang.Class); + public static java.lang.String getContributionLocation(java.lang.String); + public static java.util.List getContributionLocations(java.lang.String); + public static java.lang.String getContributionLocation(java.lang.ClassLoader, java.lang.String); + public static java.util.List getContributionLocations(java.lang.ClassLoader, java.lang.String); +} + +Compiled from "Node.java" +public interface org.apache.tuscany.sca.node.Node{ + public static final java.lang.String DEFAULT_DOMAIN_URI; + public static final java.lang.String DEFAULT_NODE_URI; + public abstract org.apache.tuscany.sca.node.Node start(); + public abstract void stop(); + public abstract org.oasisopen.sca.ServiceReference cast(java.lang.Object) throws java.lang.IllegalArgumentException; + public abstract java.lang.Object getService(java.lang.Class, java.lang.String); + public abstract org.oasisopen.sca.ServiceReference getServiceReference(java.lang.Class, java.lang.String); +} + +Compiled from "NodeFactory.java" +public abstract class org.apache.tuscany.sca.node.NodeFactory extends org.apache.tuscany.sca.node.configuration.DefaultNodeConfigurationFactory{ + protected static org.apache.tuscany.sca.node.NodeFactory instance; + protected static java.lang.Class factoryImplClass; + protected static java.util.List factories; + protected java.util.Properties properties; + protected static void setNodeFactory(org.apache.tuscany.sca.node.NodeFactory); + public static synchronized org.apache.tuscany.sca.node.NodeFactory getInstance(); + public static org.apache.tuscany.sca.node.NodeFactory newInstance(); + public static org.apache.tuscany.sca.node.NodeFactory newInstance(java.util.Map); + protected org.apache.tuscany.sca.node.NodeFactory(); + public static org.apache.tuscany.sca.node.NodeFactory newInstance(java.util.Properties); + public static org.apache.tuscany.sca.node.NodeFactory newInstance(java.lang.String); + public void configure(java.util.Map); + public org.apache.tuscany.sca.node.Node createNode(java.net.URL); + public org.apache.tuscany.sca.node.Node createNode(java.io.InputStream); + public org.apache.tuscany.sca.node.Node createNode(java.lang.String, org.apache.tuscany.sca.node.Contribution[]); + public final org.apache.tuscany.sca.node.Node createNode(java.net.URI, java.lang.String[]); + public final org.apache.tuscany.sca.node.Node createNode(java.net.URI, java.lang.String, java.lang.String[]); + public static java.lang.String getDomainURI(java.net.URI); + public final org.apache.tuscany.sca.node.Node createNode(java.lang.String, java.lang.String[], java.lang.String[]); + public final org.apache.tuscany.sca.node.Node createNode(java.lang.String, java.lang.String[]); + public final org.apache.tuscany.sca.node.Node createNode(java.io.Reader, java.lang.String[], java.lang.String[]); + public final org.apache.tuscany.sca.node.Node createNode(java.lang.String, java.lang.ClassLoader); + public org.apache.tuscany.sca.node.Node createNode(org.apache.tuscany.sca.node.Contribution[]); + public org.apache.tuscany.sca.node.Node createNode(java.io.InputStream, org.apache.tuscany.sca.node.Contribution[]); + public org.apache.tuscany.sca.node.Node createNode(java.io.Reader, org.apache.tuscany.sca.node.Contribution[]); + public org.apache.tuscany.sca.node.Node createNode(); + protected synchronized java.lang.String generateNodeURI(); + public void destroy(); + public static java.util.List getNodeFactories(); + public abstract org.apache.tuscany.sca.node.Node createNode(org.apache.tuscany.sca.node.configuration.NodeConfiguration); + public abstract org.apache.tuscany.sca.node.Node createNode(java.util.List); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration loadConfiguration(java.io.InputStream, java.net.URL); + public abstract java.lang.Object getExtensionPointRegistry(); + public abstract void init(); + public void setAutoDestroy(boolean); + static {}; +} + +Compiled from "NodeMain2.java" +public class org.apache.tuscany.sca.node.NodeMain2 extends java.lang.Object{ + public org.apache.tuscany.sca.node.NodeMain2(); + public static void main(java.lang.String[]) throws java.lang.Exception; +} + +Compiled from "BindingConfiguration.java" +public interface org.apache.tuscany.sca.node.configuration.BindingConfiguration{ + public abstract javax.xml.namespace.QName getBindingType(); + public abstract org.apache.tuscany.sca.node.configuration.BindingConfiguration setBindingType(javax.xml.namespace.QName); + public abstract java.util.List getBaseURIs(); + public abstract org.apache.tuscany.sca.node.configuration.BindingConfiguration addBaseURI(java.lang.String); +} + +Compiled from "ContributionConfiguration.java" +public interface org.apache.tuscany.sca.node.configuration.ContributionConfiguration{ + public abstract java.lang.String getURI(); + public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration setURI(java.lang.String); + public abstract java.lang.String getLocation(); + public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration setLocation(java.lang.String); + public abstract java.util.List getDeploymentComposites(); + public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration addDeploymentComposite(org.apache.tuscany.sca.node.configuration.DeploymentComposite); + public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration addDeploymentComposite(java.net.URI); + public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration addDeploymentComposite(java.net.URL); + public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration addDeploymentComposite(java.lang.String); + public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration addDeploymentComposite(java.io.Reader); + public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration addDeploymentComposite(java.io.InputStream); + public abstract void setStartDeployables(boolean); + public abstract boolean isStartDeployables(); + public abstract java.util.List getDependentContributionURIs(); + public abstract void setDependentContributionURIs(java.util.List); + public abstract java.lang.String getMetaDataURL(); + public abstract void setMetaDataURL(java.lang.String); +} + +Compiled from "DefaultNodeConfigurationFactory.java" +public class org.apache.tuscany.sca.node.configuration.DefaultNodeConfigurationFactory extends java.lang.Object implements org.apache.tuscany.sca.node.configuration.NodeConfigurationFactory{ + public org.apache.tuscany.sca.node.configuration.DefaultNodeConfigurationFactory(); + public org.apache.tuscany.sca.node.configuration.BindingConfiguration createBindingConfiguration(); + public org.apache.tuscany.sca.node.configuration.ContributionConfiguration createContributionConfiguration(); + public org.apache.tuscany.sca.node.configuration.DeploymentComposite createDeploymentComposite(); + public org.apache.tuscany.sca.node.configuration.NodeConfiguration createNodeConfiguration(); +} + +Compiled from "DeploymentComposite.java" +public interface org.apache.tuscany.sca.node.configuration.DeploymentComposite{ + public abstract java.lang.String getLocation(); + public abstract org.apache.tuscany.sca.node.configuration.DeploymentComposite setLocation(java.lang.String); + public abstract java.lang.String getContent(); + public abstract org.apache.tuscany.sca.node.configuration.DeploymentComposite setContent(java.lang.String); + public abstract java.lang.String getContributionURI(); + public abstract org.apache.tuscany.sca.node.configuration.DeploymentComposite setContributionURI(java.lang.String); +} + +Compiled from "NodeConfiguration.java" +public interface org.apache.tuscany.sca.node.configuration.NodeConfiguration{ + public static final java.lang.String DEFAULT_DOMAIN_URI; + public static final java.lang.String DEFAULT_NODE_URI; + public static final java.lang.String DEFAULT_DOMAIN_REGISTRY_URI; + public abstract java.lang.String getDomainURI(); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration setDomainURI(java.lang.String); + public abstract java.lang.String getDomainRegistryURI(); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration setDomainRegistryURI(java.lang.String); + public abstract java.lang.String getURI(); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration setURI(java.lang.String); + public abstract java.util.List getContributions(); + public abstract java.util.List getBindings(); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addContribution(org.apache.tuscany.sca.node.configuration.ContributionConfiguration); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addContribution(java.lang.String, java.lang.String); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addContribution(java.lang.String, java.net.URL); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addContribution(java.net.URI, java.net.URL); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addContribution(java.net.URL[]); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addDeploymentComposite(java.lang.String, java.lang.String); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addDeploymentComposite(java.lang.String, java.io.Reader); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addDeploymentComposite(java.lang.String, java.io.InputStream); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addBinding(org.apache.tuscany.sca.node.configuration.BindingConfiguration); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addBinding(javax.xml.namespace.QName, java.lang.String[]); + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addBinding(javax.xml.namespace.QName, java.net.URI[]); + public abstract java.util.List getExtensions(); +} + +Compiled from "NodeConfigurationFactory.java" +public interface org.apache.tuscany.sca.node.configuration.NodeConfigurationFactory{ + public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration createNodeConfiguration(); + public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration createContributionConfiguration(); + public abstract org.apache.tuscany.sca.node.configuration.BindingConfiguration createBindingConfiguration(); + public abstract org.apache.tuscany.sca.node.configuration.DeploymentComposite createDeploymentComposite(); +} + +Compiled from "ComponentContext.java" +public interface org.oasisopen.sca.ComponentContext{ + public abstract java.lang.String getURI(); + public abstract java.lang.Object getService(java.lang.Class, java.lang.String) throws java.lang.IllegalArgumentException; + public abstract org.oasisopen.sca.ServiceReference getServiceReference(java.lang.Class, java.lang.String) throws java.lang.IllegalArgumentException; + public abstract java.util.Collection getServices(java.lang.Class, java.lang.String) throws java.lang.IllegalArgumentException; + public abstract java.util.Collection getServiceReferences(java.lang.Class, java.lang.String) throws java.lang.IllegalArgumentException; + public abstract org.oasisopen.sca.ServiceReference createSelfReference(java.lang.Class) throws java.lang.IllegalArgumentException; + public abstract org.oasisopen.sca.ServiceReference createSelfReference(java.lang.Class, java.lang.String) throws java.lang.IllegalArgumentException; + public abstract java.lang.Object getProperty(java.lang.Class, java.lang.String) throws java.lang.IllegalArgumentException; + public abstract org.oasisopen.sca.ServiceReference cast(java.lang.Object) throws java.lang.IllegalArgumentException; + public abstract org.oasisopen.sca.RequestContext getRequestContext(); +} + +Compiled from "Constants.java" +public interface org.oasisopen.sca.Constants{ + public static final java.lang.String SCA_NS; + public static final java.lang.String SCA_PREFIX; + public static final java.lang.String SERVERAUTHENTICATION; + public static final java.lang.String CLIENTAUTHENTICATION; + public static final java.lang.String ATLEASTONCE; + public static final java.lang.String ATMOSTONCE; + public static final java.lang.String EXACTLYONCE; + public static final java.lang.String ORDERED; + public static final java.lang.String TRANSACTEDONEWAY; + public static final java.lang.String IMMEDIATEONEWAY; + public static final java.lang.String PROPAGATESTRANSACTION; + public static final java.lang.String SUSPENDSTRANSACTION; + public static final java.lang.String ASYNCINVOCATION; + public static final java.lang.String SOAP; + public static final java.lang.String JMS; + public static final java.lang.String NOLISTENER; + public static final java.lang.String EJB; +} + +Compiled from "InvalidServiceException.java" +public class org.oasisopen.sca.InvalidServiceException extends org.oasisopen.sca.ServiceRuntimeException{ + public org.oasisopen.sca.InvalidServiceException(); + public org.oasisopen.sca.InvalidServiceException(java.lang.String); + public org.oasisopen.sca.InvalidServiceException(java.lang.String, java.lang.Throwable); + public org.oasisopen.sca.InvalidServiceException(java.lang.Throwable); +} + +Compiled from "NoSuchDomainException.java" +public class org.oasisopen.sca.NoSuchDomainException extends java.lang.Exception{ + public org.oasisopen.sca.NoSuchDomainException(); + public org.oasisopen.sca.NoSuchDomainException(java.lang.String); + public org.oasisopen.sca.NoSuchDomainException(java.lang.String, java.lang.Throwable); + public org.oasisopen.sca.NoSuchDomainException(java.lang.Throwable); +} + +Compiled from "NoSuchServiceException.java" +public class org.oasisopen.sca.NoSuchServiceException extends java.lang.Exception{ + public org.oasisopen.sca.NoSuchServiceException(); + public org.oasisopen.sca.NoSuchServiceException(java.lang.String); + public org.oasisopen.sca.NoSuchServiceException(java.lang.String, java.lang.Throwable); + public org.oasisopen.sca.NoSuchServiceException(java.lang.Throwable); +} + +Compiled from "RequestContext.java" +public interface org.oasisopen.sca.RequestContext{ + public abstract javax.security.auth.Subject getSecuritySubject(); + public abstract java.lang.String getServiceName(); + public abstract org.oasisopen.sca.ServiceReference getCallbackReference(); + public abstract java.lang.Object getCallback(); + public abstract org.oasisopen.sca.ServiceReference getServiceReference(); +} + +Compiled from "ResponseDispatch.java" +public interface org.oasisopen.sca.ResponseDispatch{ + public abstract void sendResponse(java.lang.Object); + public abstract void sendFault(java.lang.Throwable); + public abstract java.util.Map getContext(); +} + +Compiled from "ServiceReference.java" +public interface org.oasisopen.sca.ServiceReference extends java.io.Serializable{ + public abstract java.lang.Object getService(); + public abstract java.lang.Class getBusinessInterface(); +} + +Compiled from "ServiceRuntimeException.java" +public class org.oasisopen.sca.ServiceRuntimeException extends java.lang.RuntimeException{ + public org.oasisopen.sca.ServiceRuntimeException(); + public org.oasisopen.sca.ServiceRuntimeException(java.lang.String); + public org.oasisopen.sca.ServiceRuntimeException(java.lang.String, java.lang.Throwable); + public org.oasisopen.sca.ServiceRuntimeException(java.lang.Throwable); +} + +Compiled from "ServiceUnavailableException.java" +public class org.oasisopen.sca.ServiceUnavailableException extends org.oasisopen.sca.ServiceRuntimeException{ + public org.oasisopen.sca.ServiceUnavailableException(); + public org.oasisopen.sca.ServiceUnavailableException(java.lang.String); + public org.oasisopen.sca.ServiceUnavailableException(java.lang.String, java.lang.Throwable); + public org.oasisopen.sca.ServiceUnavailableException(java.lang.Throwable); +} + +Compiled from "AllowsPassByReference.java" +public interface org.oasisopen.sca.annotation.AllowsPassByReference extends java.lang.annotation.Annotation{ + public abstract boolean value(); +} + +Compiled from "AsyncFault.java" +public interface org.oasisopen.sca.annotation.AsyncFault extends java.lang.annotation.Annotation{ + public abstract java.lang.Class[] value(); +} + +Compiled from "AsyncInvocation.java" +public interface org.oasisopen.sca.annotation.AsyncInvocation extends java.lang.annotation.Annotation{ + public static final java.lang.String ASYNCINVOCATION; + public abstract boolean value(); +} + +Compiled from "Authentication.java" +public interface org.oasisopen.sca.annotation.Authentication extends java.lang.annotation.Annotation{ + public static final java.lang.String AUTHENTICATION; + public static final java.lang.String AUTHENTICATION_MESSAGE; + public static final java.lang.String AUTHENTICATION_TRANSPORT; + public abstract java.lang.String[] value(); +} + +Compiled from "Authorization.java" +public interface org.oasisopen.sca.annotation.Authorization extends java.lang.annotation.Annotation{ + public static final java.lang.String AUTHORIZATION; +} + +Compiled from "Callback.java" +public interface org.oasisopen.sca.annotation.Callback extends java.lang.annotation.Annotation{ + public abstract java.lang.Class value(); +} + +Compiled from "ComponentName.java" +public interface org.oasisopen.sca.annotation.ComponentName extends java.lang.annotation.Annotation{ +} + +Compiled from "Confidentiality.java" +public interface org.oasisopen.sca.annotation.Confidentiality extends java.lang.annotation.Annotation{ + public static final java.lang.String CONFIDENTIALITY; + public static final java.lang.String CONFIDENTIALITY_MESSAGE; + public static final java.lang.String CONFIDENTIALITY_TRANSPORT; + public abstract java.lang.String[] value(); +} + +Compiled from "Constructor.java" +public interface org.oasisopen.sca.annotation.Constructor extends java.lang.annotation.Annotation{ + public abstract java.lang.String[] value(); +} + +Compiled from "Context.java" +public interface org.oasisopen.sca.annotation.Context extends java.lang.annotation.Annotation{ +} + +Compiled from "Destroy.java" +public interface org.oasisopen.sca.annotation.Destroy extends java.lang.annotation.Annotation{ +} + +Compiled from "EagerInit.java" +public interface org.oasisopen.sca.annotation.EagerInit extends java.lang.annotation.Annotation{ +} + +Compiled from "Init.java" +public interface org.oasisopen.sca.annotation.Init extends java.lang.annotation.Annotation{ +} + +Compiled from "Integrity.java" +public interface org.oasisopen.sca.annotation.Integrity extends java.lang.annotation.Annotation{ + public static final java.lang.String INTEGRITY; + public static final java.lang.String INTEGRITY_MESSAGE; + public static final java.lang.String INTEGRITY_TRANSPORT; + public abstract java.lang.String[] value(); +} + +Compiled from "Intent.java" +public interface org.oasisopen.sca.annotation.Intent extends java.lang.annotation.Annotation{ + public abstract java.lang.String value(); + public abstract java.lang.String targetNamespace(); + public abstract java.lang.String localPart(); +} + +Compiled from "ManagedSharedTransaction.java" +public interface org.oasisopen.sca.annotation.ManagedSharedTransaction extends java.lang.annotation.Annotation{ + public static final java.lang.String MANAGEDSHAREDTRANSACTION; +} + +Compiled from "ManagedTransaction.java" +public interface org.oasisopen.sca.annotation.ManagedTransaction extends java.lang.annotation.Annotation{ + public static final java.lang.String MANAGEDTRANSACTION; + public static final java.lang.String MANAGEDTRANSACTION_MESSAGE; + public static final java.lang.String MANAGEDTRANSACTION_TRANSPORT; + public abstract java.lang.String[] value(); +} + +Compiled from "MutualAuthentication.java" +public interface org.oasisopen.sca.annotation.MutualAuthentication extends java.lang.annotation.Annotation{ + public static final java.lang.String MUTUALAUTHENTICATION; +} + +Compiled from "NoManagedTransaction.java" +public interface org.oasisopen.sca.annotation.NoManagedTransaction extends java.lang.annotation.Annotation{ + public static final java.lang.String NOMANAGEDTRANSACTION; +} + +Compiled from "OneWay.java" +public interface org.oasisopen.sca.annotation.OneWay extends java.lang.annotation.Annotation{ +} + +Compiled from "PolicySets.java" +public interface org.oasisopen.sca.annotation.PolicySets extends java.lang.annotation.Annotation{ + public abstract java.lang.String[] value(); +} + +Compiled from "Property.java" +public interface org.oasisopen.sca.annotation.Property extends java.lang.annotation.Annotation{ + public abstract java.lang.String name(); + public abstract boolean required(); +} + +Compiled from "Qualifier.java" +public interface org.oasisopen.sca.annotation.Qualifier extends java.lang.annotation.Annotation{ +} + +Compiled from "Reference.java" +public interface org.oasisopen.sca.annotation.Reference extends java.lang.annotation.Annotation{ + public abstract java.lang.String name(); + public abstract boolean required(); +} + +Compiled from "Remotable.java" +public interface org.oasisopen.sca.annotation.Remotable extends java.lang.annotation.Annotation{ +} + +Compiled from "Requires.java" +public interface org.oasisopen.sca.annotation.Requires extends java.lang.annotation.Annotation{ + public abstract java.lang.String[] value(); +} + +Compiled from "Scope.java" +public interface org.oasisopen.sca.annotation.Scope extends java.lang.annotation.Annotation{ + public abstract java.lang.String value(); +} + +Compiled from "Service.java" +public interface org.oasisopen.sca.annotation.Service extends java.lang.annotation.Annotation{ + public abstract java.lang.Class[] value(); + public abstract java.lang.String[] names(); +} + +Compiled from "DefaultXSDFactory.java" +public class org.apache.tuscany.sca.xsd.DefaultXSDFactory extends org.apache.tuscany.sca.xsd.impl.XSDFactoryImpl implements org.apache.tuscany.sca.xsd.XSDFactory{ + public org.apache.tuscany.sca.xsd.DefaultXSDFactory(); +} + +Compiled from "XSDFactory.java" +public interface org.apache.tuscany.sca.xsd.XSDFactory{ + public abstract org.apache.tuscany.sca.xsd.XSDefinition createXSDefinition(); +} + +Compiled from "XSDefinition.java" +public interface org.apache.tuscany.sca.xsd.XSDefinition extends org.apache.tuscany.sca.assembly.Base{ + public abstract org.apache.ws.commons.schema.XmlSchemaCollection getSchemaCollection(); + public abstract void setSchemaCollection(org.apache.ws.commons.schema.XmlSchemaCollection); + public abstract org.apache.ws.commons.schema.XmlSchema getSchema(); + public abstract void setSchema(org.apache.ws.commons.schema.XmlSchema); + public abstract java.lang.String getNamespace(); + public abstract void setNamespace(java.lang.String); + public abstract java.net.URI getLocation(); + public abstract void setLocation(java.net.URI); + public abstract org.w3c.dom.Document getDocument(); + public abstract void setDocument(org.w3c.dom.Document); + public abstract org.apache.ws.commons.schema.XmlSchemaElement getXmlSchemaElement(javax.xml.namespace.QName); + public abstract org.apache.ws.commons.schema.XmlSchemaType getXmlSchemaType(javax.xml.namespace.QName); + public abstract java.util.List getAggregatedDefinitions(); + public abstract void setAggregatedDefinitions(java.util.List); +} + +Compiled from "XSDDocumentProcessor.java" +public class org.apache.tuscany.sca.xsd.xml.XSDDocumentProcessor extends java.lang.Object implements org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor{ + public static final javax.xml.namespace.QName XSD; + public org.apache.tuscany.sca.xsd.xml.XSDDocumentProcessor(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor); + public org.apache.tuscany.sca.xsd.XSDefinition read(java.net.URL, java.net.URI, java.net.URL, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException; + public void resolve(org.apache.tuscany.sca.xsd.XSDefinition, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException; + public java.lang.String getArtifactType(); + public java.lang.Class getModelType(); + protected org.apache.tuscany.sca.xsd.XSDefinition indexRead(java.net.URL) throws java.lang.Exception; + public java.lang.Object read(java.net.URL, java.net.URI, java.net.URL, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException; + public void resolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException; + static {}; +} + +Compiled from "XSDModelResolver.java" +public class org.apache.tuscany.sca.xsd.xml.XSDModelResolver extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolver{ + public org.apache.tuscany.sca.xsd.xml.XSDModelResolver(org.apache.tuscany.sca.contribution.Contribution, org.apache.tuscany.sca.core.FactoryExtensionPoint); + public void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); + public java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext); +} + From 94bd5e277bbad75be88faaed4fe380f3ddbfdd12 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Thu, 3 Feb 2011 07:58:26 +0000 Subject: [PATCH 114/157] Update saxon to a version thats in the central repo git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1066750 13f79535-47bb-0310-9956-ffa450edef68 --- modules/implementation-bpel-runtime/pom.xml | 25 ++++++++++++--------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/modules/implementation-bpel-runtime/pom.xml b/modules/implementation-bpel-runtime/pom.xml index fdb2ea87ea..6ad45efc9f 100644 --- a/modules/implementation-bpel-runtime/pom.xml +++ b/modules/implementation-bpel-runtime/pom.xml @@ -366,24 +366,27 @@ - net.sf.saxon + net.sourceforge.saxon saxon - 9.x + 9.1.0.8 - net.sf.saxon - saxon-dom - 9.x + net.sourceforge.saxon + saxon + dom + 9.1.0.8 - net.sf.saxon - saxon-xpath - 9.x + net.sourceforge.saxon + saxon + xpath + 9.1.0.8 - net.sf.saxon - saxon-xqj - 9.x + net.sourceforge.saxon + saxon + xqj + 9.1.0.8 commons-codec From 227143065acfe91cab3b774affd87d0a84dd4319 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Thu, 3 Feb 2011 07:58:54 +0000 Subject: [PATCH 115/157] Update LICENSE for saxon version change git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1066751 13f79535-47bb-0310-9956-ffa450edef68 --- distribution/all/src/main/release/bin/LICENSE | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/distribution/all/src/main/release/bin/LICENSE b/distribution/all/src/main/release/bin/LICENSE index e6ccd7b6cc..86d0b98dcb 100644 --- a/distribution/all/src/main/release/bin/LICENSE +++ b/distribution/all/src/main/release/bin/LICENSE @@ -1270,10 +1270,10 @@ $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $ ================================================================================ For Saxon including - saxon-9.x.jar - saxon-dom-9.x.jar - saxon-xpath-9.x.jar - saxon-xqj-9.x.jar + saxon-9.1.0.8.jar + saxon-9.1.0.8-dom.jar + saxon-9.1.0.8-xpath.jar + saxon-9.1.0.8-xqj.jar MOZILLA PUBLIC LICENSE Version 1.0 From ee995031a6ec793d77b279129e5c926619a84902 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Thu, 3 Feb 2011 09:16:44 +0000 Subject: [PATCH 116/157] Correct typos git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1066765 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/spi/build.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/itest/spi/build.xml b/testing/itest/spi/build.xml index 47e1f85357..c9d5d44c84 100644 --- a/testing/itest/spi/build.xml +++ b/testing/itest/spi/build.xml @@ -88,7 +88,7 @@ - + @@ -98,7 +98,7 @@ - + From ed744d724c9721f22c4481406b3c7868da48e2c4 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Thu, 3 Feb 2011 11:19:19 +0000 Subject: [PATCH 117/157] As we have a list of SPI files here use it to generate stand-alone javadoc for the SPI git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1066779 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/spi/build.xml | 165 ++++++++++++++++++++---------------- 1 file changed, 94 insertions(+), 71 deletions(-) diff --git a/testing/itest/spi/build.xml b/testing/itest/spi/build.xml index c9d5d44c84..1f169966d0 100644 --- a/testing/itest/spi/build.xml +++ b/testing/itest/spi/build.xml @@ -17,77 +17,76 @@ * under the License. --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + ${file.names.separate.lines} + + + + + + + + + + + + + From 533c5d4a9213f501c8b2504629021bb359729a65 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Thu, 3 Feb 2011 12:37:58 +0000 Subject: [PATCH 118/157] Correcting error message for BWS_2016 to match latest Tuscany code git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1066795 13f79535-47bb-0310-9956-ffa450edef68 --- .../test/resources/tuscany-oasis-sca-tests-errors.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/compliance-tests/binding-ws/src/test/resources/tuscany-oasis-sca-tests-errors.properties b/testing/compliance-tests/binding-ws/src/test/resources/tuscany-oasis-sca-tests-errors.properties index 51fa102a53..61d55f8548 100644 --- a/testing/compliance-tests/binding-ws/src/test/resources/tuscany-oasis-sca-tests-errors.properties +++ b/testing/compliance-tests/binding-ws/src/test/resources/tuscany-oasis-sca-tests-errors.properties @@ -23,7 +23,7 @@ BWS_2007=org.apache.tuscany.sca.runtime.ActivationException: org.apache.tuscany. BWS_2011=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2011, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_BWS_2011] - [BWS20005][BWS20010] The WSDL binding transport http://example.com/foo/bar is not supported by Tuscany BWS_2013=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2013, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_BWS_2013] - [BWS20005][BWS20010] The WSDL binding transport http://example.com/foo/bar is not supported by Tuscany BWS_2015=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2015, Artifact: Test_BWS_2015.composite] - [BWS20017] binding.ws has a @wsdli:wsdlLocation attribute but no @wsdlElement attribute -BWS_2016=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2016, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_BWS_2016] - Exception locating wsdli:location resource: org.apache.tuscany.sca.contribution.processor.ContributionReadException: java.io.FileNotFoundException: http://example.org/Service1.wsdl +BWS_2016=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2016, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_BWS_2016] - Exception locating wsdli:location resource: org.apache.tuscany.sca.contribution.processor.ContributionReadException: BWS_2017=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2017, Artifact: Test_BWS_2017.composite] - [BWS20019] with binding.ws you can only specify one of url, wsa:EndpointReference, #wsdl.service or #wsdl.port. The following were found [uri, wsa:EndpointReference] BWS_2018=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2018, Artifact: Test_BWS_2018.composite] - [BWS20020] For the callback element of an SCA service, the binding must not specify an endpoint address URI or a WS-Addressing wsa:EndpointReference BWS_2019=org.oasisopen.sca.ServiceRuntimeException: [Contribution: BWS_2019, Artifact: Test_BWS_2019.composite] - XMLSchema validation error occured in: Test_BWS_2019.composite ,line = 36, column = 10, Message = cvc-complex-type.3.2.2: Attribute 'invalidAttribute' is not allowed to appear in element 'binding.ws'. From 56de09f456630f3244f95da552462bbfe5cda342 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Thu, 3 Feb 2011 13:01:33 +0000 Subject: [PATCH 119/157] Fix to enable Tuscany to pass compliance testcase BWS_2016, as described in TUSCANY-3831 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1066801 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java b/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java index 0e66c41a02..fdb562b1b7 100644 --- a/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java +++ b/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java @@ -493,7 +493,7 @@ private void loadDefinition(WSDLDefinition wsdlDef, ProcessorContext context) th reader.setExtensionRegistry(wsdlExtensionRegistry); // use a custom registry // Collection of namespace,location for wsdl:import definition - Map wsdlImports = indexRead(wsdlDef.getLocation().toURL()); + Map wsdlImports = indexRead(artifactURL); wsdlImports.putAll(wsdlDef.getWsdliLocations()); WSDLLocatorImpl locator = new WSDLLocatorImpl(context, artifactURL, is, wsdlImports); Definition definition = reader.readWSDL(locator); From daa42b0b8b55090c8fb094644cb90f5ac4b2ab41 Mon Sep 17 00:00:00 2001 From: Mike Edwards Date: Thu, 3 Feb 2011 13:26:15 +0000 Subject: [PATCH 120/157] Fix Eclipse module transitive dependencies with POM updates git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1066810 13f79535-47bb-0310-9956-ffa450edef68 --- modules/node-launcher-equinox/pom.xml | 68 +++++++++++++++------------ 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/modules/node-launcher-equinox/pom.xml b/modules/node-launcher-equinox/pom.xml index de19177f81..f6121829e3 100644 --- a/modules/node-launcher-equinox/pom.xml +++ b/modules/node-launcher-equinox/pom.xml @@ -44,28 +44,6 @@ compile - - org.apache.tuscany.sca tuscany-base-runtime-pom @@ -87,13 +65,11 @@ test - - + org.eclipse.core runtime @@ -103,7 +79,7 @@ org.eclipse.core contenttype - + org.eclipse.equinox registry @@ -138,8 +114,40 @@ + + org.eclipse.equinox + registry + 3.4.100-v20090520-1800 + runtime + + + org.eclipse.core + jobs + 3.4.0-v20080512 + runtime + + + org.eclipse.equinox + common + 3.5.0-v20090520-1800 + runtime + + + org.eclipse.equinox + app + 1.2.0-v20090520-1800 + runtime + + + org.eclipse.equinox + preferences + 3.2.300-v20090520-1800 + runtime + + + From 85ee0ca9af9a56c7aeb7fdd1bc68a45ac832a9ff Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Fri, 4 Feb 2011 14:35:04 +0000 Subject: [PATCH 121/157] Update LICENSE for OSGi dependency changes git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067183 13f79535-47bb-0310-9956-ffa450edef68 --- distribution/all/src/main/release/bin/LICENSE | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/distribution/all/src/main/release/bin/LICENSE b/distribution/all/src/main/release/bin/LICENSE index 86d0b98dcb..e934b46560 100644 --- a/distribution/all/src/main/release/bin/LICENSE +++ b/distribution/all/src/main/release/bin/LICENSE @@ -402,6 +402,10 @@ The Equinox OSGi Runtime jars: osgi-3.5.0-v20090520.jar common-3.5.0-v20090520-1800.jar services-3.2.0-v20090520-1800.jar + app-1.2.0-v20090520-1800.jar + jobs-3.4.0-v20080512.jar + preferences-3.2.300-v20090520-1800.jar + registry-3.4.100-v20090520-1800.jar Tuscany SDO dependencies on Eclipse: ecore-2.2.3.jar From b13dd0875408d9e310e7d1760314584c903525e3 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Fri, 4 Feb 2011 14:39:05 +0000 Subject: [PATCH 122/157] Update all samples to use the top level samples as their parent. Whatever happens with the other sample discussion this hopefully gets them working from the bin distro without having to do a local build first git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067184 13f79535-47bb-0310-9956-ffa450edef68 --- samples/applications/eightball-demo/pom.xml | 4 +- .../logging-scribe/helloworld-scribe/pom.xml | 4 +- samples/applications/logging-scribe/pom.xml | 6 +- samples/applications/pom.xml | 1 - samples/applications/store-webapp/pom.xml | 4 +- samples/applications/store/pom.xml | 4 +- .../extending-tuscany/binding-sample/pom.xml | 4 +- .../implementation-sample/pom.xml | 4 +- samples/extending-tuscany/pom.xml | 1 - samples/getting-started/callback-api/pom.xml | 102 +++++++++--------- samples/getting-started/pom.xml | 1 - 11 files changed, 66 insertions(+), 69 deletions(-) diff --git a/samples/applications/eightball-demo/pom.xml b/samples/applications/eightball-demo/pom.xml index b58b73c0d4..2499576fec 100644 --- a/samples/applications/eightball-demo/pom.xml +++ b/samples/applications/eightball-demo/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-applications + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../pom.xml tuscany-eightball-demo pom diff --git a/samples/applications/logging-scribe/helloworld-scribe/pom.xml b/samples/applications/logging-scribe/helloworld-scribe/pom.xml index 7cef24e977..6a99a1e13e 100644 --- a/samples/applications/logging-scribe/helloworld-scribe/pom.xml +++ b/samples/applications/logging-scribe/helloworld-scribe/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-sample-logging-scribe + tuscany-sample 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml jar diff --git a/samples/applications/logging-scribe/pom.xml b/samples/applications/logging-scribe/pom.xml index dd759ff2f0..e073c4ed09 100644 --- a/samples/applications/logging-scribe/pom.xml +++ b/samples/applications/logging-scribe/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-applications + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../pom.xml tuscany-sample-logging-scribe pom @@ -36,7 +36,7 @@ true - + diff --git a/samples/applications/pom.xml b/samples/applications/pom.xml index 13420065d2..cb5972cb5d 100644 --- a/samples/applications/pom.xml +++ b/samples/applications/pom.xml @@ -23,7 +23,6 @@ org.apache.tuscany.sca tuscany-samples 2.0-SNAPSHOT - ../pom.xml tuscany-samples-applications org.apache.tuscany.sca diff --git a/samples/applications/store-webapp/pom.xml b/samples/applications/store-webapp/pom.xml index a68bce2ea6..1eb5160538 100644 --- a/samples/applications/store-webapp/pom.xml +++ b/samples/applications/store-webapp/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-applications + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../pom.xml sample-store-webapp war diff --git a/samples/applications/store/pom.xml b/samples/applications/store/pom.xml index 057df05a61..e3eadf8dc3 100644 --- a/samples/applications/store/pom.xml +++ b/samples/applications/store/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-applications + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../pom.xml sample-store Apache Tuscany SCA Sample Getting Started Online Store diff --git a/samples/extending-tuscany/binding-sample/pom.xml b/samples/extending-tuscany/binding-sample/pom.xml index fa2b574338..4af16a6871 100644 --- a/samples/extending-tuscany/binding-sample/pom.xml +++ b/samples/extending-tuscany/binding-sample/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-extending-tuscany + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../pom.xml sample-binding-extension diff --git a/samples/extending-tuscany/implementation-sample/pom.xml b/samples/extending-tuscany/implementation-sample/pom.xml index 8d54e83ed8..94dbe0ddb7 100644 --- a/samples/extending-tuscany/implementation-sample/pom.xml +++ b/samples/extending-tuscany/implementation-sample/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-extending-tuscany + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../pom.xml sample-implementation-extension Apache Tuscany SCA Sample Implementation Extension diff --git a/samples/extending-tuscany/pom.xml b/samples/extending-tuscany/pom.xml index b03551994f..482bb39060 100644 --- a/samples/extending-tuscany/pom.xml +++ b/samples/extending-tuscany/pom.xml @@ -23,7 +23,6 @@ org.apache.tuscany.sca tuscany-samples 2.0-SNAPSHOT - ../pom.xml tuscany-samples-extending-tuscany diff --git a/samples/getting-started/callback-api/pom.xml b/samples/getting-started/callback-api/pom.xml index 2fb5eb9b15..a87560b9f2 100644 --- a/samples/getting-started/callback-api/pom.xml +++ b/samples/getting-started/callback-api/pom.xml @@ -1,51 +1,51 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-samples-getting-started-contributions - 2.0-SNAPSHOT - ../pom.xml - - sample-callback-api-contribution - Apache Tuscany SCA Sample Callback API Contribution - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-SNAPSHOT - - - - + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-samples + 2.0-SNAPSHOT + ../../pom.xml + + sample-callback-api-contribution + Apache Tuscany SCA Sample Callback API Contribution + + + + org.apache.tuscany.sca + tuscany-node-api + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-node-impl + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 2.0-SNAPSHOT + + + + diff --git a/samples/getting-started/pom.xml b/samples/getting-started/pom.xml index 5e64979214..56195a1997 100644 --- a/samples/getting-started/pom.xml +++ b/samples/getting-started/pom.xml @@ -23,7 +23,6 @@ org.apache.tuscany.sca tuscany-samples 2.0-SNAPSHOT - ../pom.xml tuscany-samples-getting-started-contributions org.apache.tuscany.sca From b5658599660296af810f3aa8831bde4c250963dc Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Sat, 5 Feb 2011 00:57:39 +0000 Subject: [PATCH 123/157] Making XMLStreamReader private, to avoid extra transformations when parsing json streams git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067364 13f79535-47bb-0310-9956-ffa450edef68 --- .../services/org.apache.tuscany.sca.databinding.PullTransformer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/databinding-json/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PullTransformer b/modules/databinding-json/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PullTransformer index 39426ce844..f4464b7997 100644 --- a/modules/databinding-json/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PullTransformer +++ b/modules/databinding-json/src/main/resources/META-INF/services/org.apache.tuscany.sca.databinding.PullTransformer @@ -16,7 +16,7 @@ # under the License. # Implementation classes for the transformers -org.apache.tuscany.sca.databinding.json.JSON2XMLStreamReader;source=JSON,target=javax.xml.stream.XMLStreamReader,weight=5000 +org.apache.tuscany.sca.databinding.json.JSON2XMLStreamReader;source=JSON,target=javax.xml.stream.XMLStreamReader,weight=5000,public=false org.apache.tuscany.sca.databinding.json.XMLStreamReader2JSON;source=javax.xml.stream.XMLStreamReader,target=JSON,weight=5000,public=false org.apache.tuscany.sca.databinding.json.jackson.Object2JSON;source=java:complexType,target=JSON,weight=90000,public=true org.apache.tuscany.sca.databinding.json.jackson.Object2JSON;source=java:simpleType,target=JSON,weight=90000,public=false From 14eb62d6c266fb0734af723a11358c0201ee8d1e Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sat, 5 Feb 2011 10:36:02 +0000 Subject: [PATCH 124/157] Update depricated maven varriables to avoid maven v3 warnings git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067418 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index d75c87d1b4..eb8bd06c49 100644 --- a/pom.xml +++ b/pom.xml @@ -776,13 +776,13 @@ org.apache.tuscany.sca.assembly:org.apache.tuscany.sca.assembly.builder:org.apac ${project.artifactId} - ${name} + ${project.name} The Apache Software Foundation - ${version} - ${name} + ${project.version} + ${project.name} org.apache The Apache Software Foundation - ${version} + ${project.version} From b9fbe27510a6aba3f5709fa7467b4a4abfe7ddef Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sat, 5 Feb 2011 10:47:28 +0000 Subject: [PATCH 125/157] Fix maven 3.0 warnings git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067423 13f79535-47bb-0310-9956-ffa450edef68 --- modules/base-runtime-pom/pom.xml | 62 ++++++++++---------- modules/base-runtime/pom.xml | 58 +++++++++--------- modules/core-runtime-pom/pom.xml | 50 ++++++++-------- modules/implementation-jaxrs-runtime/pom.xml | 7 --- modules/osgi-runtime-pom/pom.xml | 10 ++-- modules/web-javascript-dojo/pom.xml | 4 +- 6 files changed, 92 insertions(+), 99 deletions(-) diff --git a/modules/base-runtime-pom/pom.xml b/modules/base-runtime-pom/pom.xml index 9d8839a132..acf8ff76b5 100644 --- a/modules/base-runtime-pom/pom.xml +++ b/modules/base-runtime-pom/pom.xml @@ -38,56 +38,56 @@ org.apache.tuscany.sca tuscany-core-runtime-pom - ${pom.version} + ${project.version} pom org.apache.tuscany.sca tuscany-binding-sca-runtime - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-ws-runtime-jaxws-ri - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-data-api - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-domain-node - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-web-runtime - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-launcher - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-sca-client-impl - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-host-jetty - ${pom.version} + ${project.version} org.apache.tuscany.sca @@ -111,19 +111,19 @@ org.apache.tuscany.sca tuscany-shell - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-wink - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-policy-security - ${pom.version} + ${project.version} @@ -131,97 +131,97 @@ org.apache.tuscany.sca tuscany-binding-atom - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-comet - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-corba - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-ejb - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-http - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-jms - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-jsonp - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-jsonrpc - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-rest - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-rmi - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-ws - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-bpel - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-java - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-jaxrs - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-python - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-script - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-spring - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-web - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-widget - ${pom.version} + ${project.version} diff --git a/modules/base-runtime/pom.xml b/modules/base-runtime/pom.xml index f33352252b..6092233e38 100644 --- a/modules/base-runtime/pom.xml +++ b/modules/base-runtime/pom.xml @@ -36,27 +36,27 @@ org.apache.tuscany.sca tuscany-domain-node - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-web-runtime - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-launcher - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-sca-client-impl - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-host-jetty - ${pom.version} + ${project.version} org.apache.tuscany.sca @@ -80,13 +80,13 @@ org.apache.tuscany.sca tuscany-shell - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-stripes - ${pom.version} + ${project.version} net.sourceforge.stripes @@ -98,25 +98,25 @@ org.apache.tuscany.sca tuscany-wink - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-ws-runtime-jaxws-ri - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-data-api - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-policy-security - ${pom.version} + ${project.version} @@ -124,92 +124,92 @@ org.apache.tuscany.sca tuscany-binding-atom - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-comet - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-corba - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-ejb - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-http - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-jms - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-jsonp - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-jsonrpc - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-rest - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-rmi - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-ws - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-bpel - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-java - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-script - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-spring - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-web - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-widget - ${pom.version} + ${project.version} diff --git a/modules/core-runtime-pom/pom.xml b/modules/core-runtime-pom/pom.xml index 317b98b391..d7f70a9396 100644 --- a/modules/core-runtime-pom/pom.xml +++ b/modules/core-runtime-pom/pom.xml @@ -39,153 +39,153 @@ org.apache.tuscany.sca tuscany-assembly - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-assembly-xml - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-assembly-xsd - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-ws - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-binding-ws-wsdlgen - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-builder - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-common-java - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-common-http - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-common-xml - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-contribution - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-core - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-core-databinding - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-core-spi - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-databinding - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-databinding-jaxb - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-deployment - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-extensibility - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-host-http - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-interface-java - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-interface-java-jaxws - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-interface-wsdl - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-monitor - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-node-api - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-sca-api - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-xsd - ${pom.version} + ${project.version} diff --git a/modules/implementation-jaxrs-runtime/pom.xml b/modules/implementation-jaxrs-runtime/pom.xml index 937a51927c..c588f65554 100644 --- a/modules/implementation-jaxrs-runtime/pom.xml +++ b/modules/implementation-jaxrs-runtime/pom.xml @@ -118,13 +118,6 @@ provided - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-SNAPSHOT - compile - - org.apache.tuscany.sca tuscany-node-impl diff --git a/modules/osgi-runtime-pom/pom.xml b/modules/osgi-runtime-pom/pom.xml index 176d05b2e5..5aba4b461d 100644 --- a/modules/osgi-runtime-pom/pom.xml +++ b/modules/osgi-runtime-pom/pom.xml @@ -39,31 +39,31 @@ org.apache.tuscany.sca tuscany-contribution-osgi - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-extensibility-equinox - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-node-impl-osgi - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-node-launcher-equinox - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-osgi-runtime - ${pom.version} + ${project.version} diff --git a/modules/web-javascript-dojo/pom.xml b/modules/web-javascript-dojo/pom.xml index f41739a7cb..47ff6f5a9b 100644 --- a/modules/web-javascript-dojo/pom.xml +++ b/modules/web-javascript-dojo/pom.xml @@ -93,7 +93,7 @@ - + @@ -108,7 +108,7 @@ - + From 5b185b911441d0ea0468d7f9604ae79abb580bc9 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sat, 5 Feb 2011 12:24:14 +0000 Subject: [PATCH 126/157] Add another file without a license header to rat excludes git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067430 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/distribution/src-distro-rat/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/testing/itest/distribution/src-distro-rat/pom.xml b/testing/itest/distribution/src-distro-rat/pom.xml index 7c886e87d1..4c31709fc3 100644 --- a/testing/itest/distribution/src-distro-rat/pom.xml +++ b/testing/itest/distribution/src-distro-rat/pom.xml @@ -61,6 +61,7 @@ tuscany-sca-2.0-SNAPSHOT-src/CHANGES **/*.MF + tuscany-sca-2.0-SNAPSHOT-src/testing/itest/spi/spi-safe.txt tuscany-sca-2.0-SNAPSHOT-src/testing/compliance-tests/binding-ws/sca_variables.dtd tuscany-sca-2.0-SNAPSHOT-src/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config tuscany-sca-2.0-SNAPSHOT-src/modules/binding-ws-runtime-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/repository/modules/modules.list From f948eaa640cd3436f4df6f7dbfeee2fd930d8f80 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sat, 5 Feb 2011 13:42:26 +0000 Subject: [PATCH 127/157] Fix lots of depricated maven variable warnings for Maven v3 git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067440 13f79535-47bb-0310-9956-ffa450edef68 --- .../base-runtime-aggregation/pom.xml | 4 +- .../aggregations/base-runtime-nodep/pom.xml | 2 +- .../binding-rmi-runtime-aggregation/pom.xml | 2 +- .../pom.xml | 2 +- distribution/all/pom.xml | 6 +-- .../testing/helloworld-client-webapp/pom.xml | 2 +- .../helloworld-reference-contribution/pom.xml | 2 +- .../testing/helloworld-scaclient-jsp/pom.xml | 2 +- .../helloworld-scaclient-servlet/pom.xml | 2 +- .../helloworld-service-contribution/pom.xml | 2 +- .../resources/archetype-resources/pom.xml | 4 +- .../resources/archetype-resources/pom.xml | 8 ++-- .../resources/archetype-resources/pom.xml | 6 +-- .../resources/archetype-resources/pom.xml | 6 +-- .../resources/archetype-resources/pom.xml | 6 +-- .../resources/archetype-resources/pom.xml | 6 +-- .../resources/archetype-resources/pom.xml | 6 +-- .../resources/archetype-resources/pom.xml | 6 +-- modules/core-spi/pom.xml | 2 +- .../eightball-demo/eightball-process/pom.xml | 4 +- .../eightball-demo/eightball-webapp/pom.xml | 8 ++-- .../eightball-demo/eightball/pom.xml | 4 +- .../eightball-demo/translator/pom.xml | 4 +- .../logging-scribe/helloworld-scribe/pom.xml | 2 +- samples/applications/store-webapp/pom.xml | 4 +- samples/applications/store/pom.xml | 2 +- .../implementation-sample/pom.xml | 2 +- .../helloworld-contribution/pom.xml | 2 +- .../getting-started/helloworld-webapp/pom.xml | 2 +- .../scdl-include-contribution/pom.xml | 4 +- .../async/calculator-contribution/pom.xml | 2 +- .../calculator-contribution/pom.xml | 2 +- .../binding-jsonrpc/calculator-webapp/pom.xml | 6 +-- .../calculator-reference-contribution/pom.xml | 2 +- .../calculator-service-contribution/pom.xml | 2 +- .../calculator-contribution/pom.xml | 2 +- .../calculator-contribution/pom.xml | 2 +- .../helloworld-ws-sdo-contribution/pom.xml | 2 +- .../binding-ws/holder-ws-service/pom.xml | 2 +- .../pom.xml | 4 +- .../dosgi-dynamic-calculator/pom.xml | 4 +- .../helloworld-bpel-contribution/pom.xml | 2 +- .../helloworld-recursive-ws/pom.xml | 2 +- .../helloworld-recursive/pom.xml | 2 +- .../calculator-contribution/pom.xml | 2 +- .../dosgi-calculator-operations/pom.xml | 4 +- .../dosgi-calculator/pom.xml | 4 +- .../calculator-contribution/pom.xml | 2 +- .../helloworld-spring-contribution/pom.xml | 2 +- .../sca-client/calculator-scaclient/pom.xml | 2 +- .../sca-client/helloworld-scaclient/pom.xml | 2 +- samples/running-tuscany/embedded-jse/pom.xml | 2 +- .../embedded-osgi-base/pom.xml | 2 +- samples/running-tuscany/embedded-osgi/pom.xml | 2 +- .../calculator-contribution/pom.xml | 2 +- .../maven-osgi-junit/calculator-osgi/pom.xml | 4 +- .../calculator-rest-osgi/pom.xml | 4 +- testing/compliance-tests/assembly/pom.xml | 2 +- testing/compliance-tests/binding-jms/pom.xml | 2 +- testing/compliance-tests/binding-ws/pom.xml | 2 +- testing/compliance-tests/java-caa/pom.xml | 2 +- testing/compliance-tests/java-ci/pom.xml | 2 +- testing/compliance-tests/policy/pom.xml | 2 +- .../itest/bpel/helloworld-reference/pom.xml | 2 +- testing/itest/bpel/helloworld-ws/pom.xml | 2 +- testing/itest/bpel/helloworld/pom.xml | 42 +------------------ testing/itest/builder/pom.xml | 2 +- .../distribution/bin-distro-unzip/pom.xml | 4 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../launcher-embedded-jse/pom.xml | 2 +- .../launcher-embedded-osgi/pom.xml | 2 +- .../distribution/src-distro-unzip/pom.xml | 4 +- testing/itest/domains/distributed/pom.xml | 2 +- testing/itest/domains/helloworld/pom.xml | 2 +- testing/itest/domains/interfaces/pom.xml | 2 +- testing/itest/domains/standalone/pom.xml | 2 +- testing/itest/jms/DynamicReplyQ/pom.xml | 2 +- testing/itest/jms/callbacks/pom.xml | 2 +- testing/itest/jms/defaults/pom.xml | 2 +- testing/itest/jms/definitions/pom.xml | 2 +- testing/itest/jms/exceptions/pom.xml | 2 +- testing/itest/jms/exceptions1/pom.xml | 2 +- testing/itest/jms/externalBroker/pom.xml | 2 +- testing/itest/jms/format-jmsbytes/pom.xml | 2 +- testing/itest/jms/format-jmsbytesxml/pom.xml | 2 +- testing/itest/jms/format-jmsdefault/pom.xml | 2 +- testing/itest/jms/format-jmsmessage/pom.xml | 2 +- testing/itest/jms/format-jmsobject/pom.xml | 2 +- testing/itest/jms/format-jmstext/pom.xml | 2 +- testing/itest/jms/format-jmstextxml/pom.xml | 2 +- .../format-jmstextxmlinjmsobjectout/pom.xml | 2 +- testing/itest/jms/non-sca-client/pom.xml | 2 +- testing/itest/jms/noreplyto/pom.xml | 2 +- testing/itest/jms/nulls/pom.xml | 2 +- testing/itest/jms/oneway-nocf/pom.xml | 2 +- testing/itest/jms/oneway/pom.xml | 2 +- testing/itest/jms/policy-headers/pom.xml | 2 +- testing/itest/jms/properties/pom.xml | 2 +- testing/itest/jms/responsecf/pom.xml | 2 +- testing/itest/jms/rpc/pom.xml | 2 +- testing/itest/jms/selectors/pom.xml | 2 +- testing/itest/jms/topics/pom.xml | 2 +- testing/itest/jms/ttl/pom.xml | 2 +- testing/itest/jms/uri-rpc/pom.xml | 2 +- testing/itest/node-launcher-equinox/pom.xml | 2 +- .../nodes/three-nodes-three-vms-test/pom.xml | 2 +- .../nodes/two-nodes-two-vms-hazelcast/pom.xml | 2 +- .../nodes/two-nodes-two-vms-test/pom.xml | 2 +- testing/itest/policy/matching/pom.xml | 2 +- testing/itest/policy/wspolicy/pom.xml | 2 +- testing/itest/recursive-ws/pom.xml | 12 +++--- testing/itest/scaclient-api-osgi/pom.xml | 4 +- testing/itest/spi/pom.xml | 2 +- .../ws-jaxws/contribution-java-first/pom.xml | 2 +- .../ws-jaxws/contribution-wsdl-first/pom.xml | 2 +- .../itest/ws-jaxws/external-client/pom.xml | 2 +- .../itest/ws-jaxws/external-service/pom.xml | 2 +- testing/itest/ws-jaxws/launcher-ri/pom.xml | 2 +- testing/itest/ws/authentication-basic/pom.xml | 2 +- .../contribution-callback-forwardspec/pom.xml | 2 +- .../ws/contribution-callback-fullspec/pom.xml | 2 +- .../contribution-callback-promotion/pom.xml | 2 +- .../itest/ws/contribution-callback/pom.xml | 2 +- .../ws/contribution-doc-lit-wrapped/pom.xml | 2 +- testing/itest/ws/contribution-doc-lit/pom.xml | 2 +- .../itest/ws/contribution-java-first/pom.xml | 2 +- testing/itest/ws/contribution-rpc-lit/pom.xml | 2 +- .../itest/ws/contribution-wsdl-first/pom.xml | 2 +- testing/itest/ws/defaults/pom.xml | 2 +- testing/itest/ws/endpoint-references/pom.xml | 2 +- testing/itest/ws/endpoints/pom.xml | 2 +- testing/itest/ws/external-client/pom.xml | 2 +- testing/itest/ws/external-service/pom.xml | 2 +- .../pom.xml | 2 +- testing/itest/ws/http-ssl/pom.xml | 2 +- testing/itest/ws/launcher-axis2/pom.xml | 2 +- testing/itest/ws/launcher-base/pom.xml | 2 +- testing/itest/ws/wsdl/pom.xml | 2 +- .../contribution-add/pom.xml | 2 +- .../contribution-calculator/pom.xml | 2 +- .../implementation-sample-async/pom.xml | 2 +- .../launcher-embedded-jse-spec/pom.xml | 2 +- unreleased/samples/reporting/pom.xml | 2 +- 147 files changed, 191 insertions(+), 229 deletions(-) diff --git a/distribution/aggregations/base-runtime-aggregation/pom.xml b/distribution/aggregations/base-runtime-aggregation/pom.xml index 8b68f8a102..b23cdfa565 100644 --- a/distribution/aggregations/base-runtime-aggregation/pom.xml +++ b/distribution/aggregations/base-runtime-aggregation/pom.xml @@ -31,7 +31,7 @@ Apache Tuscany SCA Base Runtime Aggregation - ${project.groupId}.${artifactId} + ${project.groupId}.${project.artifactId} @@ -45,7 +45,7 @@ org.apache.tuscany.sca tuscany-base-runtime-pom - ${pom.version} + ${project.version} pom true diff --git a/distribution/aggregations/base-runtime-nodep/pom.xml b/distribution/aggregations/base-runtime-nodep/pom.xml index 1765df5bea..6e896e93f5 100644 --- a/distribution/aggregations/base-runtime-nodep/pom.xml +++ b/distribution/aggregations/base-runtime-nodep/pom.xml @@ -34,7 +34,7 @@ org.apache.tuscany.sca tuscany-base-runtime - ${pom.version} + ${project.version} jline diff --git a/distribution/aggregations/binding-rmi-runtime-aggregation/pom.xml b/distribution/aggregations/binding-rmi-runtime-aggregation/pom.xml index 468bee8455..9c93d600ac 100644 --- a/distribution/aggregations/binding-rmi-runtime-aggregation/pom.xml +++ b/distribution/aggregations/binding-rmi-runtime-aggregation/pom.xml @@ -34,7 +34,7 @@ org.apache.tuscany.sca tuscany-binding-rmi-runtime - ${pom.version} + ${project.version} true diff --git a/distribution/aggregations/binding-ws-runtime-axis2-aggregation/pom.xml b/distribution/aggregations/binding-ws-runtime-axis2-aggregation/pom.xml index 33c7466a1b..2e6effbf4d 100644 --- a/distribution/aggregations/binding-ws-runtime-axis2-aggregation/pom.xml +++ b/distribution/aggregations/binding-ws-runtime-axis2-aggregation/pom.xml @@ -34,7 +34,7 @@ org.apache.tuscany.sca tuscany-binding-ws-runtime-axis2 - ${pom.version} + ${project.version} true diff --git a/distribution/all/pom.xml b/distribution/all/pom.xml index 92801a9a3c..7b23674c39 100644 --- a/distribution/all/pom.xml +++ b/distribution/all/pom.xml @@ -121,7 +121,7 @@ src/main/assembly/bin-default.xml gnu - apache-tuscany-sca-all-${version} + apache-tuscany-sca-all-${project.version} true false @@ -163,7 +163,7 @@ src/main/assembly/src.xml gnu - apache-tuscany-sca-all-${version} + apache-tuscany-sca-all-${project.version} true true true @@ -470,7 +470,7 @@ src/main/assembly/src.xml gnu - apache-tuscany-sca-all-${version} + apache-tuscany-sca-all-${project.version} true true diff --git a/distribution/tomcat/testing/helloworld-client-webapp/pom.xml b/distribution/tomcat/testing/helloworld-client-webapp/pom.xml index 27816ddb00..3aa5aa3809 100644 --- a/distribution/tomcat/testing/helloworld-client-webapp/pom.xml +++ b/distribution/tomcat/testing/helloworld-client-webapp/pom.xml @@ -40,7 +40,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/distribution/tomcat/testing/helloworld-reference-contribution/pom.xml b/distribution/tomcat/testing/helloworld-reference-contribution/pom.xml index d1ea28fc54..9497949fb5 100644 --- a/distribution/tomcat/testing/helloworld-reference-contribution/pom.xml +++ b/distribution/tomcat/testing/helloworld-reference-contribution/pom.xml @@ -40,6 +40,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/distribution/tomcat/testing/helloworld-scaclient-jsp/pom.xml b/distribution/tomcat/testing/helloworld-scaclient-jsp/pom.xml index b11a6bb687..704ee91174 100644 --- a/distribution/tomcat/testing/helloworld-scaclient-jsp/pom.xml +++ b/distribution/tomcat/testing/helloworld-scaclient-jsp/pom.xml @@ -40,7 +40,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/distribution/tomcat/testing/helloworld-scaclient-servlet/pom.xml b/distribution/tomcat/testing/helloworld-scaclient-servlet/pom.xml index d8a4831e82..67de9b020e 100644 --- a/distribution/tomcat/testing/helloworld-scaclient-servlet/pom.xml +++ b/distribution/tomcat/testing/helloworld-scaclient-servlet/pom.xml @@ -46,7 +46,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/distribution/tomcat/testing/helloworld-service-contribution/pom.xml b/distribution/tomcat/testing/helloworld-service-contribution/pom.xml index 3b43a4fa59..e37b2021cb 100644 --- a/distribution/tomcat/testing/helloworld-service-contribution/pom.xml +++ b/distribution/tomcat/testing/helloworld-service-contribution/pom.xml @@ -40,6 +40,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/maven/archetypes/binding/src/main/resources/archetype-resources/pom.xml b/maven/archetypes/binding/src/main/resources/archetype-resources/pom.xml index 2ed94936a9..583ff605b6 100644 --- a/maven/archetypes/binding/src/main/resources/archetype-resources/pom.xml +++ b/maven/archetypes/binding/src/main/resources/archetype-resources/pom.xml @@ -26,9 +26,9 @@ ../pom.xml - binding-${artifactId} + binding-${project.artifactId} ${groupId} - ${version} + ${project.version} Apache Tuscany SCA ${bindingName} Binding Extension diff --git a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml index 8b2ad3d3a9..5a2755a325 100644 --- a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml +++ b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml @@ -22,9 +22,9 @@ 4.0.0 ${groupId} - ${artifactId} - ${version} - ${artifactId} + ${project.artifactId} + ${project.version} + ${project.artifactId} @@ -46,7 +46,7 @@ install - ${artifactId} + ${project.artifactId} diff --git a/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/pom.xml b/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/pom.xml index 873b45ee39..76183eafc7 100644 --- a/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/pom.xml +++ b/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/pom.xml @@ -22,9 +22,9 @@ 4.0.0 ${groupId} - ${artifactId} + ${project.artifactId} jar - ${version} + ${project.version} #literal() quickstart @@ -64,7 +64,7 @@ install - ${artifactId} + ${project.artifactId} false diff --git a/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/pom.xml b/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/pom.xml index 30be6b66e3..ecc47712a9 100644 --- a/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/pom.xml +++ b/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/pom.xml @@ -22,9 +22,9 @@ 4.0.0 ${groupId} - ${artifactId} + ${project.artifactId} war - ${version} + ${project.version} #literal() quickstart @@ -81,7 +81,7 @@ install - ${artifactId} + ${project.artifactId} false diff --git a/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml b/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml index f252e602ab..19c1181f1b 100644 --- a/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml +++ b/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml @@ -22,9 +22,9 @@ 4.0.0 ${groupId} - ${artifactId} + ${project.artifactId} war - ${version} + ${project.version} #literal() quickstart-jsf @@ -89,7 +89,7 @@ install - ${artifactId} + ${project.artifactId} false diff --git a/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/pom.xml b/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/pom.xml index 8fc4bde625..95c2f5800d 100644 --- a/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/pom.xml +++ b/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/pom.xml @@ -22,9 +22,9 @@ 4.0.0 ${groupId} - ${artifactId} + ${project.artifactId} war - ${version} + ${project.version} quickstart-jsonp @@ -92,7 +92,7 @@ install - ${artifactId} + ${project.artifactId} false diff --git a/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/pom.xml b/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/pom.xml index 312affaba9..8e8bbe128f 100644 --- a/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/pom.xml +++ b/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/pom.xml @@ -22,9 +22,9 @@ 4.0.0 ${groupId} - ${artifactId} + ${project.artifactId} war - ${version} + ${project.version} #literal() quickstart-stripes @@ -59,7 +59,7 @@ install - ${artifactId} + ${project.artifactId} false diff --git a/maven/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml b/maven/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml index bad07a995e..3ec16988b1 100644 --- a/maven/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml +++ b/maven/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml @@ -22,9 +22,9 @@ 4.0.0 ${groupId} - ${artifactId} + ${project.artifactId} war - ${version} + ${project.version} quickstart @@ -81,7 +81,7 @@ install - ${artifactId} + ${project.artifactId} false diff --git a/modules/core-spi/pom.xml b/modules/core-spi/pom.xml index ec8f1a680f..ade0aa6170 100644 --- a/modules/core-spi/pom.xml +++ b/modules/core-spi/pom.xml @@ -86,7 +86,7 @@ process-resources - + install - ${artifactId} + ${project.artifactId} false @@ -106,4 +106,4 @@ 2.0-SNAPSHOT - \ No newline at end of file + diff --git a/samples/applications/eightball-demo/eightball-webapp/pom.xml b/samples/applications/eightball-demo/eightball-webapp/pom.xml index eeabfc5fa4..054d13c52f 100644 --- a/samples/applications/eightball-demo/eightball-webapp/pom.xml +++ b/samples/applications/eightball-demo/eightball-webapp/pom.xml @@ -133,19 +133,19 @@ demo eightball - ${pom.version} + ${project.version} src/main/webapp/WEB-INF/sca-contributions demo eightball-process - ${pom.version} + ${project.version} src/main/webapp/WEB-INF/sca-contributions demo translator - ${pom.version} + ${project.version} src/main/webapp/WEB-INF/sca-contributions @@ -159,4 +159,4 @@ 2.0-SNAPSHOT 6.1.18 - \ No newline at end of file + diff --git a/samples/applications/eightball-demo/eightball/pom.xml b/samples/applications/eightball-demo/eightball/pom.xml index 5bd58d3dae..86a0407b24 100644 --- a/samples/applications/eightball-demo/eightball/pom.xml +++ b/samples/applications/eightball-demo/eightball/pom.xml @@ -49,7 +49,7 @@ install - ${artifactId} + ${project.artifactId} false @@ -106,4 +106,4 @@ 2.0-SNAPSHOT - \ No newline at end of file + diff --git a/samples/applications/eightball-demo/translator/pom.xml b/samples/applications/eightball-demo/translator/pom.xml index 858fa1b4eb..0f04558eff 100644 --- a/samples/applications/eightball-demo/translator/pom.xml +++ b/samples/applications/eightball-demo/translator/pom.xml @@ -49,7 +49,7 @@ install - ${artifactId} + ${project.artifactId} false @@ -106,4 +106,4 @@ 2.0-SNAPSHOT - \ No newline at end of file + diff --git a/samples/applications/logging-scribe/helloworld-scribe/pom.xml b/samples/applications/logging-scribe/helloworld-scribe/pom.xml index 6a99a1e13e..94234147e7 100644 --- a/samples/applications/logging-scribe/helloworld-scribe/pom.xml +++ b/samples/applications/logging-scribe/helloworld-scribe/pom.xml @@ -84,7 +84,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/samples/applications/store-webapp/pom.xml b/samples/applications/store-webapp/pom.xml index 1eb5160538..190ed73d98 100644 --- a/samples/applications/store-webapp/pom.xml +++ b/samples/applications/store-webapp/pom.xml @@ -95,7 +95,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo @@ -106,7 +106,7 @@ tomcat - /${artifactId} + /${project.artifactId} diff --git a/samples/applications/store/pom.xml b/samples/applications/store/pom.xml index e3eadf8dc3..c9c6c2a639 100644 --- a/samples/applications/store/pom.xml +++ b/samples/applications/store/pom.xml @@ -107,7 +107,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/samples/extending-tuscany/implementation-sample/pom.xml b/samples/extending-tuscany/implementation-sample/pom.xml index 94dbe0ddb7..9490ff8c17 100644 --- a/samples/extending-tuscany/implementation-sample/pom.xml +++ b/samples/extending-tuscany/implementation-sample/pom.xml @@ -65,6 +65,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/samples/getting-started/helloworld-contribution/pom.xml b/samples/getting-started/helloworld-contribution/pom.xml index 4c9e17d553..cf9ca44ec8 100644 --- a/samples/getting-started/helloworld-contribution/pom.xml +++ b/samples/getting-started/helloworld-contribution/pom.xml @@ -45,7 +45,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/samples/getting-started/helloworld-webapp/pom.xml b/samples/getting-started/helloworld-webapp/pom.xml index 058ba84bd8..f7c375a8c3 100644 --- a/samples/getting-started/helloworld-webapp/pom.xml +++ b/samples/getting-started/helloworld-webapp/pom.xml @@ -66,7 +66,7 @@ org.apache.tuscany.sca sample-helloworld-contribution - ${pom.version} + ${project.version} src/main/webapp/WEB-INF/sca-contributions diff --git a/samples/getting-started/scdl-include-contribution/pom.xml b/samples/getting-started/scdl-include-contribution/pom.xml index a4afa47cb3..9d61acbd45 100644 --- a/samples/getting-started/scdl-include-contribution/pom.xml +++ b/samples/getting-started/scdl-include-contribution/pom.xml @@ -46,7 +46,7 @@ - ${artifactId} + ${project.artifactId} @@ -66,7 +66,7 @@ - ..\helloworld-contribution\target\helloworld-contribution.jar + ..\helloworld-contribution\target\sample-helloworld-contribution.jar diff --git a/samples/learning-more/async/calculator-contribution/pom.xml b/samples/learning-more/async/calculator-contribution/pom.xml index 01555e08df..eca47cb8e8 100644 --- a/samples/learning-more/async/calculator-contribution/pom.xml +++ b/samples/learning-more/async/calculator-contribution/pom.xml @@ -44,7 +44,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/samples/learning-more/binding-jsonrpc/calculator-contribution/pom.xml b/samples/learning-more/binding-jsonrpc/calculator-contribution/pom.xml index c511880900..f611d71402 100644 --- a/samples/learning-more/binding-jsonrpc/calculator-contribution/pom.xml +++ b/samples/learning-more/binding-jsonrpc/calculator-contribution/pom.xml @@ -45,7 +45,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/samples/learning-more/binding-jsonrpc/calculator-webapp/pom.xml b/samples/learning-more/binding-jsonrpc/calculator-webapp/pom.xml index bb56cd4eaf..eb3eda368a 100644 --- a/samples/learning-more/binding-jsonrpc/calculator-webapp/pom.xml +++ b/samples/learning-more/binding-jsonrpc/calculator-webapp/pom.xml @@ -59,7 +59,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins @@ -80,7 +80,7 @@ - + @@ -95,7 +95,7 @@ - + diff --git a/samples/learning-more/binding-rmi/calculator-reference-contribution/pom.xml b/samples/learning-more/binding-rmi/calculator-reference-contribution/pom.xml index 4fda33803a..d8257ed8ee 100644 --- a/samples/learning-more/binding-rmi/calculator-reference-contribution/pom.xml +++ b/samples/learning-more/binding-rmi/calculator-reference-contribution/pom.xml @@ -61,7 +61,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/samples/learning-more/binding-rmi/calculator-service-contribution/pom.xml b/samples/learning-more/binding-rmi/calculator-service-contribution/pom.xml index 7c862beee7..01807f6b87 100644 --- a/samples/learning-more/binding-rmi/calculator-service-contribution/pom.xml +++ b/samples/learning-more/binding-rmi/calculator-service-contribution/pom.xml @@ -61,7 +61,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/samples/learning-more/binding-sca/calculator-contribution/pom.xml b/samples/learning-more/binding-sca/calculator-contribution/pom.xml index 6f08be42ed..fb102b7c32 100644 --- a/samples/learning-more/binding-sca/calculator-contribution/pom.xml +++ b/samples/learning-more/binding-sca/calculator-contribution/pom.xml @@ -45,7 +45,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/samples/learning-more/binding-ws/calculator-contribution/pom.xml b/samples/learning-more/binding-ws/calculator-contribution/pom.xml index 76cd542889..33ab0cde19 100644 --- a/samples/learning-more/binding-ws/calculator-contribution/pom.xml +++ b/samples/learning-more/binding-ws/calculator-contribution/pom.xml @@ -45,7 +45,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/samples/learning-more/binding-ws/helloworld-ws-sdo-contribution/pom.xml b/samples/learning-more/binding-ws/helloworld-ws-sdo-contribution/pom.xml index d2472291e1..3f2f9e4177 100644 --- a/samples/learning-more/binding-ws/helloworld-ws-sdo-contribution/pom.xml +++ b/samples/learning-more/binding-ws/helloworld-ws-sdo-contribution/pom.xml @@ -100,7 +100,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/samples/learning-more/binding-ws/holder-ws-service/pom.xml b/samples/learning-more/binding-ws/holder-ws-service/pom.xml index 37e9fef9f7..c1b66724e9 100644 --- a/samples/learning-more/binding-ws/holder-ws-service/pom.xml +++ b/samples/learning-more/binding-ws/holder-ws-service/pom.xml @@ -112,7 +112,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/pom.xml b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/pom.xml index 1de7aff7a5..e0b5d6962e 100644 --- a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/pom.xml +++ b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/pom.xml @@ -94,7 +94,7 @@ - ${artifactId} + ${project.artifactId} maven-eclipse-plugin @@ -132,7 +132,7 @@ org.apache.tuscany.sca tuscany-node-launcher-equinox - ${pom.version} + ${project.version} diff --git a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator/pom.xml b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator/pom.xml index 9739662478..978ada93d0 100644 --- a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator/pom.xml +++ b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator/pom.xml @@ -88,7 +88,7 @@ - ${artifactId} + ${project.artifactId} maven-eclipse-plugin @@ -126,7 +126,7 @@ org.apache.tuscany.sca tuscany-node-launcher-equinox - ${pom.version} + ${project.version} diff --git a/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/pom.xml b/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/pom.xml index f847ff9322..611b5a9366 100644 --- a/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/pom.xml +++ b/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/pom.xml @@ -46,7 +46,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/samples/learning-more/implementation-composite/helloworld-recursive-ws/pom.xml b/samples/learning-more/implementation-composite/helloworld-recursive-ws/pom.xml index 9aea2223b3..a6c338475f 100644 --- a/samples/learning-more/implementation-composite/helloworld-recursive-ws/pom.xml +++ b/samples/learning-more/implementation-composite/helloworld-recursive-ws/pom.xml @@ -52,7 +52,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/samples/learning-more/implementation-composite/helloworld-recursive/pom.xml b/samples/learning-more/implementation-composite/helloworld-recursive/pom.xml index ab959a5f54..ef462dffba 100644 --- a/samples/learning-more/implementation-composite/helloworld-recursive/pom.xml +++ b/samples/learning-more/implementation-composite/helloworld-recursive/pom.xml @@ -46,7 +46,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/samples/learning-more/implementation-java/calculator-contribution/pom.xml b/samples/learning-more/implementation-java/calculator-contribution/pom.xml index 5b5375f6db..e43f92a862 100644 --- a/samples/learning-more/implementation-java/calculator-contribution/pom.xml +++ b/samples/learning-more/implementation-java/calculator-contribution/pom.xml @@ -44,7 +44,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/samples/learning-more/implementation-osgi/dosgi-calculator-operations/pom.xml b/samples/learning-more/implementation-osgi/dosgi-calculator-operations/pom.xml index 8aee7b735d..f084b0ec3c 100644 --- a/samples/learning-more/implementation-osgi/dosgi-calculator-operations/pom.xml +++ b/samples/learning-more/implementation-osgi/dosgi-calculator-operations/pom.xml @@ -94,7 +94,7 @@ - ${artifactId} + ${project.artifactId} maven-eclipse-plugin @@ -133,7 +133,7 @@ org.apache.tuscany.sca tuscany-node-launcher-equinox - ${pom.version} + ${project.version} diff --git a/samples/learning-more/implementation-osgi/dosgi-calculator/pom.xml b/samples/learning-more/implementation-osgi/dosgi-calculator/pom.xml index f15cab63b1..0a436fc560 100644 --- a/samples/learning-more/implementation-osgi/dosgi-calculator/pom.xml +++ b/samples/learning-more/implementation-osgi/dosgi-calculator/pom.xml @@ -88,7 +88,7 @@ - ${artifactId} + ${project.artifactId} maven-eclipse-plugin @@ -126,7 +126,7 @@ org.apache.tuscany.sca tuscany-node-launcher-equinox - ${pom.version} + ${project.version} diff --git a/samples/learning-more/implementation-script/calculator-contribution/pom.xml b/samples/learning-more/implementation-script/calculator-contribution/pom.xml index 11836ec19b..cd1be13214 100644 --- a/samples/learning-more/implementation-script/calculator-contribution/pom.xml +++ b/samples/learning-more/implementation-script/calculator-contribution/pom.xml @@ -45,7 +45,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/samples/learning-more/implementation-spring/helloworld-spring-contribution/pom.xml b/samples/learning-more/implementation-spring/helloworld-spring-contribution/pom.xml index a1e1c86706..b4cb31e1ef 100644 --- a/samples/learning-more/implementation-spring/helloworld-spring-contribution/pom.xml +++ b/samples/learning-more/implementation-spring/helloworld-spring-contribution/pom.xml @@ -45,7 +45,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/samples/learning-more/sca-client/calculator-scaclient/pom.xml b/samples/learning-more/sca-client/calculator-scaclient/pom.xml index 2122876b47..a29fdc345d 100644 --- a/samples/learning-more/sca-client/calculator-scaclient/pom.xml +++ b/samples/learning-more/sca-client/calculator-scaclient/pom.xml @@ -47,7 +47,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/samples/learning-more/sca-client/helloworld-scaclient/pom.xml b/samples/learning-more/sca-client/helloworld-scaclient/pom.xml index a123478729..a9c4ef0dc0 100644 --- a/samples/learning-more/sca-client/helloworld-scaclient/pom.xml +++ b/samples/learning-more/sca-client/helloworld-scaclient/pom.xml @@ -47,7 +47,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/samples/running-tuscany/embedded-jse/pom.xml b/samples/running-tuscany/embedded-jse/pom.xml index c17594033b..e590286090 100644 --- a/samples/running-tuscany/embedded-jse/pom.xml +++ b/samples/running-tuscany/embedded-jse/pom.xml @@ -75,7 +75,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/samples/running-tuscany/embedded-osgi-base/pom.xml b/samples/running-tuscany/embedded-osgi-base/pom.xml index d20dd90b35..086b80a5fc 100644 --- a/samples/running-tuscany/embedded-osgi-base/pom.xml +++ b/samples/running-tuscany/embedded-osgi-base/pom.xml @@ -62,7 +62,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/samples/running-tuscany/embedded-osgi/pom.xml b/samples/running-tuscany/embedded-osgi/pom.xml index 06b2945c17..5f68dc649f 100644 --- a/samples/running-tuscany/embedded-osgi/pom.xml +++ b/samples/running-tuscany/embedded-osgi/pom.xml @@ -66,7 +66,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/samples/running-tuscany/maven-junit/calculator-contribution/pom.xml b/samples/running-tuscany/maven-junit/calculator-contribution/pom.xml index 82e0845349..13e52b91c2 100644 --- a/samples/running-tuscany/maven-junit/calculator-contribution/pom.xml +++ b/samples/running-tuscany/maven-junit/calculator-contribution/pom.xml @@ -45,7 +45,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/samples/running-tuscany/maven-osgi-junit/calculator-osgi/pom.xml b/samples/running-tuscany/maven-osgi-junit/calculator-osgi/pom.xml index d4e149f5a6..6df94d3e8d 100644 --- a/samples/running-tuscany/maven-osgi-junit/calculator-osgi/pom.xml +++ b/samples/running-tuscany/maven-osgi-junit/calculator-osgi/pom.xml @@ -52,7 +52,7 @@ - ${artifactId} + ${project.artifactId} maven-eclipse-plugin @@ -90,7 +90,7 @@ org.apache.tuscany.sca tuscany-node-launcher-equinox - ${pom.version} + ${project.version} diff --git a/samples/running-tuscany/maven-osgi-junit/calculator-rest-osgi/pom.xml b/samples/running-tuscany/maven-osgi-junit/calculator-rest-osgi/pom.xml index 99af50b3eb..c31324d21f 100644 --- a/samples/running-tuscany/maven-osgi-junit/calculator-rest-osgi/pom.xml +++ b/samples/running-tuscany/maven-osgi-junit/calculator-rest-osgi/pom.xml @@ -95,7 +95,7 @@ - ${artifactId} + ${project.artifactId} maven-eclipse-plugin @@ -144,7 +144,7 @@ org.apache.tuscany.sca tuscany-node-launcher-equinox - ${pom.version} + ${project.version} diff --git a/testing/compliance-tests/assembly/pom.xml b/testing/compliance-tests/assembly/pom.xml index 650db484e7..e8df87a914 100644 --- a/testing/compliance-tests/assembly/pom.xml +++ b/testing/compliance-tests/assembly/pom.xml @@ -73,7 +73,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/compliance-tests/binding-jms/pom.xml b/testing/compliance-tests/binding-jms/pom.xml index 6964ecf1f9..34caab4ab6 100644 --- a/testing/compliance-tests/binding-jms/pom.xml +++ b/testing/compliance-tests/binding-jms/pom.xml @@ -89,7 +89,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/compliance-tests/binding-ws/pom.xml b/testing/compliance-tests/binding-ws/pom.xml index f659186c75..f8a50f9c7d 100644 --- a/testing/compliance-tests/binding-ws/pom.xml +++ b/testing/compliance-tests/binding-ws/pom.xml @@ -74,7 +74,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/compliance-tests/java-caa/pom.xml b/testing/compliance-tests/java-caa/pom.xml index 1251437645..ec54decec3 100644 --- a/testing/compliance-tests/java-caa/pom.xml +++ b/testing/compliance-tests/java-caa/pom.xml @@ -78,7 +78,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/compliance-tests/java-ci/pom.xml b/testing/compliance-tests/java-ci/pom.xml index 5b8b938157..03ca3fe5bf 100644 --- a/testing/compliance-tests/java-ci/pom.xml +++ b/testing/compliance-tests/java-ci/pom.xml @@ -64,7 +64,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/compliance-tests/policy/pom.xml b/testing/compliance-tests/policy/pom.xml index afdc97a1af..2e0bd8e6a7 100644 --- a/testing/compliance-tests/policy/pom.xml +++ b/testing/compliance-tests/policy/pom.xml @@ -73,7 +73,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/bpel/helloworld-reference/pom.xml b/testing/itest/bpel/helloworld-reference/pom.xml index cc2ea3676f..efef84de17 100644 --- a/testing/itest/bpel/helloworld-reference/pom.xml +++ b/testing/itest/bpel/helloworld-reference/pom.xml @@ -90,7 +90,7 @@ - ${artifactId} + ${project.artifactId} org.apache.maven.plugins diff --git a/testing/itest/bpel/helloworld-ws/pom.xml b/testing/itest/bpel/helloworld-ws/pom.xml index dffbb4f9a9..7cc80fa468 100644 --- a/testing/itest/bpel/helloworld-ws/pom.xml +++ b/testing/itest/bpel/helloworld-ws/pom.xml @@ -81,7 +81,7 @@ - ${artifactId} + ${project.artifactId} org.apache.maven.plugins diff --git a/testing/itest/bpel/helloworld/pom.xml b/testing/itest/bpel/helloworld/pom.xml index ad5b69ec69..dcca2ebec9 100644 --- a/testing/itest/bpel/helloworld/pom.xml +++ b/testing/itest/bpel/helloworld/pom.xml @@ -54,7 +54,7 @@ - ${artifactId} + ${project.artifactId} org.apache.maven.plugins @@ -65,6 +65,7 @@ false false true + -Djava.endorsed.dirs=target/endorsed @@ -93,45 +94,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - - -Djava.endorsed.dirs=target/endorsed - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - generate-sources - - copy - - - - - javax.xml.ws - jaxws-api - 2.1 - jar - - - javax.xml.bind - jaxb-api - 2.1 - jar - - - ${project.build.directory}/endorsed - false - true - - - - org.codehaus.mojo build-helper-maven-plugin diff --git a/testing/itest/builder/pom.xml b/testing/itest/builder/pom.xml index 66ac4cd5dc..a16f3e12cd 100644 --- a/testing/itest/builder/pom.xml +++ b/testing/itest/builder/pom.xml @@ -58,6 +58,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/distribution/bin-distro-unzip/pom.xml b/testing/itest/distribution/bin-distro-unzip/pom.xml index d9793d810d..246119275f 100644 --- a/testing/itest/distribution/bin-distro-unzip/pom.xml +++ b/testing/itest/distribution/bin-distro-unzip/pom.xml @@ -62,7 +62,7 @@ - + @@ -113,7 +113,7 @@ - + diff --git a/testing/itest/distribution/contribution-binding-jsonrpc-calculator/pom.xml b/testing/itest/distribution/contribution-binding-jsonrpc-calculator/pom.xml index 90151dc9b7..40515d69b5 100644 --- a/testing/itest/distribution/contribution-binding-jsonrpc-calculator/pom.xml +++ b/testing/itest/distribution/contribution-binding-jsonrpc-calculator/pom.xml @@ -74,7 +74,7 @@ - + diff --git a/testing/itest/distribution/contribution-binding-rmi-calculator/pom.xml b/testing/itest/distribution/contribution-binding-rmi-calculator/pom.xml index 35058e8300..9a599ac695 100644 --- a/testing/itest/distribution/contribution-binding-rmi-calculator/pom.xml +++ b/testing/itest/distribution/contribution-binding-rmi-calculator/pom.xml @@ -56,7 +56,7 @@ - + diff --git a/testing/itest/distribution/contribution-binding-sca-calculator/pom.xml b/testing/itest/distribution/contribution-binding-sca-calculator/pom.xml index 5ea30a20f7..69263cd54f 100644 --- a/testing/itest/distribution/contribution-binding-sca-calculator/pom.xml +++ b/testing/itest/distribution/contribution-binding-sca-calculator/pom.xml @@ -74,7 +74,7 @@ - + diff --git a/testing/itest/distribution/contribution-binding-ws-calculator/pom.xml b/testing/itest/distribution/contribution-binding-ws-calculator/pom.xml index c598f122e0..37ed0a2af2 100644 --- a/testing/itest/distribution/contribution-binding-ws-calculator/pom.xml +++ b/testing/itest/distribution/contribution-binding-ws-calculator/pom.xml @@ -57,7 +57,7 @@ - + diff --git a/testing/itest/distribution/contribution-implementation-java-calculator/pom.xml b/testing/itest/distribution/contribution-implementation-java-calculator/pom.xml index a0a1790c00..0dcd2866d8 100644 --- a/testing/itest/distribution/contribution-implementation-java-calculator/pom.xml +++ b/testing/itest/distribution/contribution-implementation-java-calculator/pom.xml @@ -74,7 +74,7 @@ - + diff --git a/testing/itest/distribution/launcher-embedded-jse/pom.xml b/testing/itest/distribution/launcher-embedded-jse/pom.xml index 93bd2e3327..f6d95e214e 100644 --- a/testing/itest/distribution/launcher-embedded-jse/pom.xml +++ b/testing/itest/distribution/launcher-embedded-jse/pom.xml @@ -57,7 +57,7 @@ - + diff --git a/testing/itest/distribution/launcher-embedded-osgi/pom.xml b/testing/itest/distribution/launcher-embedded-osgi/pom.xml index 0e4a97a07f..44c9088237 100644 --- a/testing/itest/distribution/launcher-embedded-osgi/pom.xml +++ b/testing/itest/distribution/launcher-embedded-osgi/pom.xml @@ -57,7 +57,7 @@ - + diff --git a/testing/itest/distribution/src-distro-unzip/pom.xml b/testing/itest/distribution/src-distro-unzip/pom.xml index c4b6e5eb5f..148208b508 100644 --- a/testing/itest/distribution/src-distro-unzip/pom.xml +++ b/testing/itest/distribution/src-distro-unzip/pom.xml @@ -62,7 +62,7 @@ - + @@ -113,7 +113,7 @@ - + diff --git a/testing/itest/domains/distributed/pom.xml b/testing/itest/domains/distributed/pom.xml index 61073b8990..9abd2df2ba 100644 --- a/testing/itest/domains/distributed/pom.xml +++ b/testing/itest/domains/distributed/pom.xml @@ -45,7 +45,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/domains/helloworld/pom.xml b/testing/itest/domains/helloworld/pom.xml index ab3e8ecd8f..458f5d44d1 100644 --- a/testing/itest/domains/helloworld/pom.xml +++ b/testing/itest/domains/helloworld/pom.xml @@ -49,7 +49,7 @@ - ${artifactId} + ${project.artifactId} maven-assembly-plugin diff --git a/testing/itest/domains/interfaces/pom.xml b/testing/itest/domains/interfaces/pom.xml index 73ee94fef1..f6f7112a61 100644 --- a/testing/itest/domains/interfaces/pom.xml +++ b/testing/itest/domains/interfaces/pom.xml @@ -46,6 +46,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/domains/standalone/pom.xml b/testing/itest/domains/standalone/pom.xml index d434ce9816..ab1897793e 100644 --- a/testing/itest/domains/standalone/pom.xml +++ b/testing/itest/domains/standalone/pom.xml @@ -51,7 +51,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/DynamicReplyQ/pom.xml b/testing/itest/jms/DynamicReplyQ/pom.xml index fac000bb9c..9c7ac27e02 100644 --- a/testing/itest/jms/DynamicReplyQ/pom.xml +++ b/testing/itest/jms/DynamicReplyQ/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS with dynamic replyq - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/callbacks/pom.xml b/testing/itest/jms/callbacks/pom.xml index e7ee6b3a69..ec035111d1 100644 --- a/testing/itest/jms/callbacks/pom.xml +++ b/testing/itest/jms/callbacks/pom.xml @@ -29,6 +29,6 @@ Apache Tuscany SCA iTest JMS Tests For Callbacks - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/defaults/pom.xml b/testing/itest/jms/defaults/pom.xml index a1ebdf2a38..975cbc8402 100644 --- a/testing/itest/jms/defaults/pom.xml +++ b/testing/itest/jms/defaults/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS with Defaults - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/definitions/pom.xml b/testing/itest/jms/definitions/pom.xml index 041b0a11bf..c90b9a8eba 100644 --- a/testing/itest/jms/definitions/pom.xml +++ b/testing/itest/jms/definitions/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Tests For Properties - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/exceptions/pom.xml b/testing/itest/jms/exceptions/pom.xml index 8bb3f33174..7f6f0512e0 100644 --- a/testing/itest/jms/exceptions/pom.xml +++ b/testing/itest/jms/exceptions/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS NonSCA Client Exceptions - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/exceptions1/pom.xml b/testing/itest/jms/exceptions1/pom.xml index 7cfc4cdfb3..56a18e111e 100644 --- a/testing/itest/jms/exceptions1/pom.xml +++ b/testing/itest/jms/exceptions1/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS with Exceptions1 - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/externalBroker/pom.xml b/testing/itest/jms/externalBroker/pom.xml index ca14525f3b..0342a115f8 100644 --- a/testing/itest/jms/externalBroker/pom.xml +++ b/testing/itest/jms/externalBroker/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS with External JMS Broker - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/format-jmsbytes/pom.xml b/testing/itest/jms/format-jmsbytes/pom.xml index e1d3acf970..9834ac5793 100644 --- a/testing/itest/jms/format-jmsbytes/pom.xml +++ b/testing/itest/jms/format-jmsbytes/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Message Format jmsbytes - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/format-jmsbytesxml/pom.xml b/testing/itest/jms/format-jmsbytesxml/pom.xml index ad7f5abd0a..9e1410860b 100644 --- a/testing/itest/jms/format-jmsbytesxml/pom.xml +++ b/testing/itest/jms/format-jmsbytesxml/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Message Format jmsbytesxml - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/format-jmsdefault/pom.xml b/testing/itest/jms/format-jmsdefault/pom.xml index 2b19a2a1ca..034b3b8422 100644 --- a/testing/itest/jms/format-jmsdefault/pom.xml +++ b/testing/itest/jms/format-jmsdefault/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Message Format jmsdefault - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/format-jmsmessage/pom.xml b/testing/itest/jms/format-jmsmessage/pom.xml index 8c03593421..f1c145fe2c 100644 --- a/testing/itest/jms/format-jmsmessage/pom.xml +++ b/testing/itest/jms/format-jmsmessage/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Message Format jmsmessage - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/format-jmsobject/pom.xml b/testing/itest/jms/format-jmsobject/pom.xml index 78fd4a2ff7..6b4b6cf777 100644 --- a/testing/itest/jms/format-jmsobject/pom.xml +++ b/testing/itest/jms/format-jmsobject/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Message Format jmsobject - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/format-jmstext/pom.xml b/testing/itest/jms/format-jmstext/pom.xml index 6d7b1514ba..0e3a390b6d 100644 --- a/testing/itest/jms/format-jmstext/pom.xml +++ b/testing/itest/jms/format-jmstext/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Message Format jmstext - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/format-jmstextxml/pom.xml b/testing/itest/jms/format-jmstextxml/pom.xml index 1d9730df35..b675c08cab 100644 --- a/testing/itest/jms/format-jmstextxml/pom.xml +++ b/testing/itest/jms/format-jmstextxml/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Message Format jmstextxml - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml b/testing/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml index 51b5ed7827..82c877065b 100644 --- a/testing/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml +++ b/testing/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Message Format jmstextxmlinjmsobjectout - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/non-sca-client/pom.xml b/testing/itest/jms/non-sca-client/pom.xml index b27ad7fb36..4df87a7b79 100644 --- a/testing/itest/jms/non-sca-client/pom.xml +++ b/testing/itest/jms/non-sca-client/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS with Non SCA Client - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/noreplyto/pom.xml b/testing/itest/jms/noreplyto/pom.xml index 84a48c47a9..0cea656978 100644 --- a/testing/itest/jms/noreplyto/pom.xml +++ b/testing/itest/jms/noreplyto/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS No replyTo - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/nulls/pom.xml b/testing/itest/jms/nulls/pom.xml index 65757ba29f..743f147c82 100644 --- a/testing/itest/jms/nulls/pom.xml +++ b/testing/itest/jms/nulls/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Nulls - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/oneway-nocf/pom.xml b/testing/itest/jms/oneway-nocf/pom.xml index ed9140a151..8f0fbf861b 100644 --- a/testing/itest/jms/oneway-nocf/pom.xml +++ b/testing/itest/jms/oneway-nocf/pom.xml @@ -29,6 +29,6 @@ Apache Tuscany SCA iTest JMS for a oneway service - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/oneway/pom.xml b/testing/itest/jms/oneway/pom.xml index c5ebc91c10..f0cea616c8 100644 --- a/testing/itest/jms/oneway/pom.xml +++ b/testing/itest/jms/oneway/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS with Oneway - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/policy-headers/pom.xml b/testing/itest/jms/policy-headers/pom.xml index 4a51e46671..a70769d850 100644 --- a/testing/itest/jms/policy-headers/pom.xml +++ b/testing/itest/jms/policy-headers/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS with Policy Headers - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/properties/pom.xml b/testing/itest/jms/properties/pom.xml index 0876ca5437..e66d7a5baf 100644 --- a/testing/itest/jms/properties/pom.xml +++ b/testing/itest/jms/properties/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS with Properties - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/responsecf/pom.xml b/testing/itest/jms/responsecf/pom.xml index 2f3af332b4..4b0d701f93 100644 --- a/testing/itest/jms/responsecf/pom.xml +++ b/testing/itest/jms/responsecf/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Response ConnectionFactory - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/rpc/pom.xml b/testing/itest/jms/rpc/pom.xml index 3de74914f9..3c9effe9e2 100644 --- a/testing/itest/jms/rpc/pom.xml +++ b/testing/itest/jms/rpc/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS with RPC - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/selectors/pom.xml b/testing/itest/jms/selectors/pom.xml index 4b3eee5c5d..17b7a42bc7 100644 --- a/testing/itest/jms/selectors/pom.xml +++ b/testing/itest/jms/selectors/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Tests For Selectors - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/topics/pom.xml b/testing/itest/jms/topics/pom.xml index 3b9fa3022e..01f6a570c0 100644 --- a/testing/itest/jms/topics/pom.xml +++ b/testing/itest/jms/topics/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Tests for topics - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/ttl/pom.xml b/testing/itest/jms/ttl/pom.xml index 4f9f9d804c..5c845d4a52 100644 --- a/testing/itest/jms/ttl/pom.xml +++ b/testing/itest/jms/ttl/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS Time To Live - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/jms/uri-rpc/pom.xml b/testing/itest/jms/uri-rpc/pom.xml index 87f0063b56..a30d518648 100644 --- a/testing/itest/jms/uri-rpc/pom.xml +++ b/testing/itest/jms/uri-rpc/pom.xml @@ -30,6 +30,6 @@ Apache Tuscany SCA iTest JMS with URI RPC - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/node-launcher-equinox/pom.xml b/testing/itest/node-launcher-equinox/pom.xml index 8e80bd658c..f3c419c978 100644 --- a/testing/itest/node-launcher-equinox/pom.xml +++ b/testing/itest/node-launcher-equinox/pom.xml @@ -71,6 +71,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/nodes/three-nodes-three-vms-test/pom.xml b/testing/itest/nodes/three-nodes-three-vms-test/pom.xml index 337a4ba5c1..2b4e9f5e51 100644 --- a/testing/itest/nodes/three-nodes-three-vms-test/pom.xml +++ b/testing/itest/nodes/three-nodes-three-vms-test/pom.xml @@ -91,7 +91,7 @@ - + diff --git a/testing/itest/nodes/two-nodes-two-vms-hazelcast/pom.xml b/testing/itest/nodes/two-nodes-two-vms-hazelcast/pom.xml index 8f5a4d3ed8..50ca875f98 100644 --- a/testing/itest/nodes/two-nodes-two-vms-hazelcast/pom.xml +++ b/testing/itest/nodes/two-nodes-two-vms-hazelcast/pom.xml @@ -96,7 +96,7 @@ - + diff --git a/testing/itest/nodes/two-nodes-two-vms-test/pom.xml b/testing/itest/nodes/two-nodes-two-vms-test/pom.xml index 2f80274c47..6380733e6d 100644 --- a/testing/itest/nodes/two-nodes-two-vms-test/pom.xml +++ b/testing/itest/nodes/two-nodes-two-vms-test/pom.xml @@ -91,7 +91,7 @@ - + diff --git a/testing/itest/policy/matching/pom.xml b/testing/itest/policy/matching/pom.xml index 318942d21f..53758ef427 100644 --- a/testing/itest/policy/matching/pom.xml +++ b/testing/itest/policy/matching/pom.xml @@ -47,6 +47,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/policy/wspolicy/pom.xml b/testing/itest/policy/wspolicy/pom.xml index 73526d0200..2e04d32802 100644 --- a/testing/itest/policy/wspolicy/pom.xml +++ b/testing/itest/policy/wspolicy/pom.xml @@ -59,6 +59,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/recursive-ws/pom.xml b/testing/itest/recursive-ws/pom.xml index 46eeeafb18..667abb5864 100644 --- a/testing/itest/recursive-ws/pom.xml +++ b/testing/itest/recursive-ws/pom.xml @@ -33,40 +33,40 @@ org.apache.tuscany.sca tuscany-node-api - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-node-impl - ${pom.version} + ${project.version} org.apache.tuscany.sca tuscany-implementation-java-runtime - ${pom.version} + ${project.version} runtime org.apache.tuscany.sca tuscany-interface-wsdl - ${pom.version} + ${project.version} runtime org.apache.tuscany.sca tuscany-binding-ws-axis2 - ${pom.version} + ${project.version} runtime org.apache.tuscany.sca tuscany-databinding-axiom - ${pom.version} + ${project.version} runtime diff --git a/testing/itest/scaclient-api-osgi/pom.xml b/testing/itest/scaclient-api-osgi/pom.xml index b75879bcad..0c29c06c97 100644 --- a/testing/itest/scaclient-api-osgi/pom.xml +++ b/testing/itest/scaclient-api-osgi/pom.xml @@ -52,7 +52,7 @@ - ${artifactId} + ${project.artifactId} maven-eclipse-plugin @@ -90,7 +90,7 @@ org.apache.tuscany.sca tuscany-node-launcher-equinox - ${pom.version} + ${project.version} diff --git a/testing/itest/spi/pom.xml b/testing/itest/spi/pom.xml index 0a12e2c292..73d33aa041 100644 --- a/testing/itest/spi/pom.xml +++ b/testing/itest/spi/pom.xml @@ -55,7 +55,7 @@ - + diff --git a/testing/itest/ws-jaxws/contribution-java-first/pom.xml b/testing/itest/ws-jaxws/contribution-java-first/pom.xml index 05be037e27..c328a9dc1e 100644 --- a/testing/itest/ws-jaxws/contribution-java-first/pom.xml +++ b/testing/itest/ws-jaxws/contribution-java-first/pom.xml @@ -53,7 +53,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml b/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml index 7fa5daf66e..892976cd12 100644 --- a/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml +++ b/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml @@ -53,7 +53,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/testing/itest/ws-jaxws/external-client/pom.xml b/testing/itest/ws-jaxws/external-client/pom.xml index 915b17e1fe..d92d8d6fcf 100644 --- a/testing/itest/ws-jaxws/external-client/pom.xml +++ b/testing/itest/ws-jaxws/external-client/pom.xml @@ -53,7 +53,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/ws-jaxws/external-service/pom.xml b/testing/itest/ws-jaxws/external-service/pom.xml index d00b8168d2..0bd8a2f4e1 100644 --- a/testing/itest/ws-jaxws/external-service/pom.xml +++ b/testing/itest/ws-jaxws/external-service/pom.xml @@ -35,7 +35,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/ws-jaxws/launcher-ri/pom.xml b/testing/itest/ws-jaxws/launcher-ri/pom.xml index 2ed9ff1742..dc08db9fac 100644 --- a/testing/itest/ws-jaxws/launcher-ri/pom.xml +++ b/testing/itest/ws-jaxws/launcher-ri/pom.xml @@ -53,7 +53,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/ws/authentication-basic/pom.xml b/testing/itest/ws/authentication-basic/pom.xml index dbf22ae810..399559fc02 100644 --- a/testing/itest/ws/authentication-basic/pom.xml +++ b/testing/itest/ws/authentication-basic/pom.xml @@ -58,6 +58,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/ws/contribution-callback-forwardspec/pom.xml b/testing/itest/ws/contribution-callback-forwardspec/pom.xml index ad26d7cac5..c30e5c00ea 100644 --- a/testing/itest/ws/contribution-callback-forwardspec/pom.xml +++ b/testing/itest/ws/contribution-callback-forwardspec/pom.xml @@ -53,7 +53,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/testing/itest/ws/contribution-callback-fullspec/pom.xml b/testing/itest/ws/contribution-callback-fullspec/pom.xml index 24c4982f6b..149151f638 100644 --- a/testing/itest/ws/contribution-callback-fullspec/pom.xml +++ b/testing/itest/ws/contribution-callback-fullspec/pom.xml @@ -53,7 +53,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/testing/itest/ws/contribution-callback-promotion/pom.xml b/testing/itest/ws/contribution-callback-promotion/pom.xml index 3e4afac711..af21f0e0dd 100644 --- a/testing/itest/ws/contribution-callback-promotion/pom.xml +++ b/testing/itest/ws/contribution-callback-promotion/pom.xml @@ -53,7 +53,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/testing/itest/ws/contribution-callback/pom.xml b/testing/itest/ws/contribution-callback/pom.xml index 44e9465e3b..4fa4b2a6a3 100644 --- a/testing/itest/ws/contribution-callback/pom.xml +++ b/testing/itest/ws/contribution-callback/pom.xml @@ -53,7 +53,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml b/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml index fd0d1aa7ee..abc005a413 100644 --- a/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml +++ b/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml @@ -53,7 +53,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/testing/itest/ws/contribution-doc-lit/pom.xml b/testing/itest/ws/contribution-doc-lit/pom.xml index 681230b82a..59e95a35b4 100644 --- a/testing/itest/ws/contribution-doc-lit/pom.xml +++ b/testing/itest/ws/contribution-doc-lit/pom.xml @@ -53,7 +53,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/testing/itest/ws/contribution-java-first/pom.xml b/testing/itest/ws/contribution-java-first/pom.xml index ee9ebe2dd2..2f5ad0e4bf 100644 --- a/testing/itest/ws/contribution-java-first/pom.xml +++ b/testing/itest/ws/contribution-java-first/pom.xml @@ -53,7 +53,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/testing/itest/ws/contribution-rpc-lit/pom.xml b/testing/itest/ws/contribution-rpc-lit/pom.xml index ca6a18d3d4..c71cb76b69 100644 --- a/testing/itest/ws/contribution-rpc-lit/pom.xml +++ b/testing/itest/ws/contribution-rpc-lit/pom.xml @@ -53,7 +53,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/testing/itest/ws/contribution-wsdl-first/pom.xml b/testing/itest/ws/contribution-wsdl-first/pom.xml index 5d56c5cae3..10bfadb083 100644 --- a/testing/itest/ws/contribution-wsdl-first/pom.xml +++ b/testing/itest/ws/contribution-wsdl-first/pom.xml @@ -53,7 +53,7 @@ - ${artifactId} + ${project.artifactId} org.codehaus.mojo diff --git a/testing/itest/ws/defaults/pom.xml b/testing/itest/ws/defaults/pom.xml index fc9c228371..36a664af94 100644 --- a/testing/itest/ws/defaults/pom.xml +++ b/testing/itest/ws/defaults/pom.xml @@ -53,6 +53,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/ws/endpoint-references/pom.xml b/testing/itest/ws/endpoint-references/pom.xml index 095a20f797..3895a742dc 100644 --- a/testing/itest/ws/endpoint-references/pom.xml +++ b/testing/itest/ws/endpoint-references/pom.xml @@ -59,6 +59,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/ws/endpoints/pom.xml b/testing/itest/ws/endpoints/pom.xml index d2c922e8aa..24a38b1ac0 100644 --- a/testing/itest/ws/endpoints/pom.xml +++ b/testing/itest/ws/endpoints/pom.xml @@ -53,6 +53,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/ws/external-client/pom.xml b/testing/itest/ws/external-client/pom.xml index 457ed42035..a4c0851e08 100644 --- a/testing/itest/ws/external-client/pom.xml +++ b/testing/itest/ws/external-client/pom.xml @@ -42,7 +42,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/ws/external-service/pom.xml b/testing/itest/ws/external-service/pom.xml index cf161681ba..aea326ef4d 100644 --- a/testing/itest/ws/external-service/pom.xml +++ b/testing/itest/ws/external-service/pom.xml @@ -35,7 +35,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml b/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml index e26b81edfb..39994fa28f 100644 --- a/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml +++ b/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml @@ -111,7 +111,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/testing/itest/ws/http-ssl/pom.xml b/testing/itest/ws/http-ssl/pom.xml index 0fd407ec66..cb3880d575 100644 --- a/testing/itest/ws/http-ssl/pom.xml +++ b/testing/itest/ws/http-ssl/pom.xml @@ -53,6 +53,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/ws/launcher-axis2/pom.xml b/testing/itest/ws/launcher-axis2/pom.xml index 9458ba7f0b..6b72686395 100644 --- a/testing/itest/ws/launcher-axis2/pom.xml +++ b/testing/itest/ws/launcher-axis2/pom.xml @@ -65,7 +65,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/ws/launcher-base/pom.xml b/testing/itest/ws/launcher-base/pom.xml index 0f3c126281..72a732f8e6 100644 --- a/testing/itest/ws/launcher-base/pom.xml +++ b/testing/itest/ws/launcher-base/pom.xml @@ -52,7 +52,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/testing/itest/ws/wsdl/pom.xml b/testing/itest/ws/wsdl/pom.xml index 75ce482a4b..4c303c596b 100644 --- a/testing/itest/ws/wsdl/pom.xml +++ b/testing/itest/ws/wsdl/pom.xml @@ -53,6 +53,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/unreleased/samples/domain/distributed-calculator/contribution-add/pom.xml b/unreleased/samples/domain/distributed-calculator/contribution-add/pom.xml index c25184e295..a81b2497e4 100644 --- a/unreleased/samples/domain/distributed-calculator/contribution-add/pom.xml +++ b/unreleased/samples/domain/distributed-calculator/contribution-add/pom.xml @@ -61,7 +61,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/unreleased/samples/domain/distributed-calculator/contribution-calculator/pom.xml b/unreleased/samples/domain/distributed-calculator/contribution-calculator/pom.xml index 63c2220108..daa747bcf2 100644 --- a/unreleased/samples/domain/distributed-calculator/contribution-calculator/pom.xml +++ b/unreleased/samples/domain/distributed-calculator/contribution-calculator/pom.xml @@ -61,7 +61,7 @@ - ${artifactId} + ${project.artifactId} org.apache.tuscany.maven.plugins diff --git a/unreleased/samples/implementation-sample-async/pom.xml b/unreleased/samples/implementation-sample-async/pom.xml index 15834ce073..cf996d32a8 100644 --- a/unreleased/samples/implementation-sample-async/pom.xml +++ b/unreleased/samples/implementation-sample-async/pom.xml @@ -65,6 +65,6 @@ - ${artifactId} + ${project.artifactId} diff --git a/unreleased/samples/launcher-embedded-jse-spec/pom.xml b/unreleased/samples/launcher-embedded-jse-spec/pom.xml index b1f8e5c15c..fc003d991c 100644 --- a/unreleased/samples/launcher-embedded-jse-spec/pom.xml +++ b/unreleased/samples/launcher-embedded-jse-spec/pom.xml @@ -74,7 +74,7 @@ - ${artifactId} + ${project.artifactId} diff --git a/unreleased/samples/reporting/pom.xml b/unreleased/samples/reporting/pom.xml index 103734b9f7..1c82f4be5a 100644 --- a/unreleased/samples/reporting/pom.xml +++ b/unreleased/samples/reporting/pom.xml @@ -85,7 +85,7 @@ - ${artifactId} + ${project.artifactId} From 08b15c4bba75a4dd789e923da742f30263b99506 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sat, 5 Feb 2011 21:05:07 +0000 Subject: [PATCH 128/157] Update all samples to use the top level samples as parent git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067524 13f79535-47bb-0310-9956-ffa450edef68 --- .../helloworld-contribution/pom.xml | 4 +- .../getting-started/helloworld-webapp/pom.xml | 4 +- samples/getting-started/sca-scopes/pom.xml | 102 +++++++++--------- .../scdl-include-contribution/pom.xml | 4 +- .../async/calculator-contribution/pom.xml | 4 +- .../binding-comet/weather-webapp/pom.xml | 4 +- .../binding-jms/helloworld-webapp/pom.xml | 4 +- .../calculator-contribution/pom.xml | 4 +- .../binding-jsonrpc/calculator-webapp/pom.xml | 4 +- .../calculator-reference-contribution/pom.xml | 4 +- .../calculator-service-contribution/pom.xml | 4 +- .../calculator-contribution/pom.xml | 4 +- .../calculator-contribution/pom.xml | 4 +- .../helloworld-ws-sdo-contribution/pom.xml | 4 +- .../binding-ws/holder-ws-service/pom.xml | 4 +- .../pom.xml | 4 +- .../dosgi-dynamic-calculator/pom.xml | 4 +- .../helloworld-bpel-contribution/pom.xml | 4 +- .../helloworld-bpel-webapp/pom.xml | 4 +- .../helloworld-recursive-ws/pom.xml | 4 +- .../helloworld-recursive/pom.xml | 4 +- .../calculator-contribution/pom.xml | 4 +- .../dosgi-calculator-operations/pom.xml | 4 +- .../dosgi-calculator/pom.xml | 4 +- .../calculator-contribution/pom.xml | 4 +- .../helloworld-spring-contribution/pom.xml | 4 +- .../helloworld-spring-webapp/pom.xml | 4 +- .../helloworld-jaxrs/pom.xml | 4 +- .../helloworld-js-client/pom.xml | 4 +- .../implementation-web/helloworld-jsf/pom.xml | 4 +- .../implementation-web/helloworld-jsp/pom.xml | 4 +- .../helloworld-servlet/pom.xml | 4 +- .../helloworld-stripes/pom.xml | 4 +- .../sca-client/calculator-scaclient/pom.xml | 4 +- .../sca-client/helloworld-scaclient/pom.xml | 4 +- 35 files changed, 119 insertions(+), 119 deletions(-) diff --git a/samples/getting-started/helloworld-contribution/pom.xml b/samples/getting-started/helloworld-contribution/pom.xml index cf9ca44ec8..d0f522d96b 100644 --- a/samples/getting-started/helloworld-contribution/pom.xml +++ b/samples/getting-started/helloworld-contribution/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-getting-started-contributions + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../pom.xml jar diff --git a/samples/getting-started/helloworld-webapp/pom.xml b/samples/getting-started/helloworld-webapp/pom.xml index f7c375a8c3..4a8c757ecf 100644 --- a/samples/getting-started/helloworld-webapp/pom.xml +++ b/samples/getting-started/helloworld-webapp/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-getting-started-contributions + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../pom.xml sample-helloworld-webapp diff --git a/samples/getting-started/sca-scopes/pom.xml b/samples/getting-started/sca-scopes/pom.xml index 404c8cc4ff..878da43573 100644 --- a/samples/getting-started/sca-scopes/pom.xml +++ b/samples/getting-started/sca-scopes/pom.xml @@ -1,51 +1,51 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-samples-getting-started-contributions - 2.0-SNAPSHOT - ../pom.xml - - Apache Tuscany SCA Sample SCA Scopes Contribution - sample-sca-scopes-contribution - - - - org.apache.tuscany.sca - tuscany-node-api - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-node-impl - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 2.0-SNAPSHOT - - - - + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-samples + 2.0-SNAPSHOT + ../../pom.xml + + Apache Tuscany SCA Sample SCA Scopes Contribution + sample-sca-scopes-contribution + + + + org.apache.tuscany.sca + tuscany-node-api + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-node-impl + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 2.0-SNAPSHOT + + + + diff --git a/samples/getting-started/scdl-include-contribution/pom.xml b/samples/getting-started/scdl-include-contribution/pom.xml index 9d61acbd45..7f30c84149 100644 --- a/samples/getting-started/scdl-include-contribution/pom.xml +++ b/samples/getting-started/scdl-include-contribution/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-getting-started-contributions + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../pom.xml zip diff --git a/samples/learning-more/async/calculator-contribution/pom.xml b/samples/learning-more/async/calculator-contribution/pom.xml index eca47cb8e8..20c04e9e70 100644 --- a/samples/learning-more/async/calculator-contribution/pom.xml +++ b/samples/learning-more/async/calculator-contribution/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - sample-tuscany-async + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-implementation-java-calculator-async-contribution Apache Tuscany SCA Sample implementation.java Calculator Async Contribution diff --git a/samples/learning-more/binding-comet/weather-webapp/pom.xml b/samples/learning-more/binding-comet/weather-webapp/pom.xml index 95c1ede7c2..cb538d02a0 100644 --- a/samples/learning-more/binding-comet/weather-webapp/pom.xml +++ b/samples/learning-more/binding-comet/weather-webapp/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-binding-comet + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml org.apache.tuscany.sca diff --git a/samples/learning-more/binding-jms/helloworld-webapp/pom.xml b/samples/learning-more/binding-jms/helloworld-webapp/pom.xml index e4e495d65a..751fffc4c9 100644 --- a/samples/learning-more/binding-jms/helloworld-webapp/pom.xml +++ b/samples/learning-more/binding-jms/helloworld-webapp/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-sample-binding-jms + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-binding-jms-helloworld-webapp diff --git a/samples/learning-more/binding-jsonrpc/calculator-contribution/pom.xml b/samples/learning-more/binding-jsonrpc/calculator-contribution/pom.xml index f611d71402..8f0a042f21 100644 --- a/samples/learning-more/binding-jsonrpc/calculator-contribution/pom.xml +++ b/samples/learning-more/binding-jsonrpc/calculator-contribution/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-binding-jsonrpc + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-binding-jsonrpc-calculator-contribution Apache Tuscany SCA Sample binding.jsonrpc Calculator Contribution diff --git a/samples/learning-more/binding-jsonrpc/calculator-webapp/pom.xml b/samples/learning-more/binding-jsonrpc/calculator-webapp/pom.xml index eb3eda368a..da55756087 100644 --- a/samples/learning-more/binding-jsonrpc/calculator-webapp/pom.xml +++ b/samples/learning-more/binding-jsonrpc/calculator-webapp/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-binding-jsonrpc + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-binding-jsonrpc-calculator-webapp Apache Tuscany SCA Sample binding.jsonrpc Calculator WebApp diff --git a/samples/learning-more/binding-rmi/calculator-reference-contribution/pom.xml b/samples/learning-more/binding-rmi/calculator-reference-contribution/pom.xml index d8257ed8ee..87ac79b0d0 100644 --- a/samples/learning-more/binding-rmi/calculator-reference-contribution/pom.xml +++ b/samples/learning-more/binding-rmi/calculator-reference-contribution/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-sample-binding-rmi + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-binding-rmi-calculator-reference-contribution Apache Tuscany SCA Sample binding.rmi Calculator Reference Contribution diff --git a/samples/learning-more/binding-rmi/calculator-service-contribution/pom.xml b/samples/learning-more/binding-rmi/calculator-service-contribution/pom.xml index 01807f6b87..cb92cfe8a1 100644 --- a/samples/learning-more/binding-rmi/calculator-service-contribution/pom.xml +++ b/samples/learning-more/binding-rmi/calculator-service-contribution/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-sample-binding-rmi + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-binding-rmi-calculator-service-contribution Apache Tuscany SCA Sample binding.rmi Calculator Service Contribution diff --git a/samples/learning-more/binding-sca/calculator-contribution/pom.xml b/samples/learning-more/binding-sca/calculator-contribution/pom.xml index fb102b7c32..134a9be456 100644 --- a/samples/learning-more/binding-sca/calculator-contribution/pom.xml +++ b/samples/learning-more/binding-sca/calculator-contribution/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-sample-binding-sca + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-binding-sca-calculator-contribution Apache Tuscany SCA Sample binding.sca Calculator Contribution diff --git a/samples/learning-more/binding-ws/calculator-contribution/pom.xml b/samples/learning-more/binding-ws/calculator-contribution/pom.xml index 33ab0cde19..4153f5f523 100644 --- a/samples/learning-more/binding-ws/calculator-contribution/pom.xml +++ b/samples/learning-more/binding-ws/calculator-contribution/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-sample-binding-ws + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-binding-ws-calculator-contribution Apache Tuscany SCA Sample binding.ws Calculator Contribution diff --git a/samples/learning-more/binding-ws/helloworld-ws-sdo-contribution/pom.xml b/samples/learning-more/binding-ws/helloworld-ws-sdo-contribution/pom.xml index 3f2f9e4177..f5c2839067 100644 --- a/samples/learning-more/binding-ws/helloworld-ws-sdo-contribution/pom.xml +++ b/samples/learning-more/binding-ws/helloworld-ws-sdo-contribution/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-sample-binding-ws + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-binding-ws-helloworld-ws-sdo-contribution Apache Tuscany SCA Sample binding.ws HelloWorld Web Service SDO Contribution diff --git a/samples/learning-more/binding-ws/holder-ws-service/pom.xml b/samples/learning-more/binding-ws/holder-ws-service/pom.xml index c1b66724e9..e910931a27 100644 --- a/samples/learning-more/binding-ws/holder-ws-service/pom.xml +++ b/samples/learning-more/binding-ws/holder-ws-service/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-sample-binding-ws + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml jar diff --git a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/pom.xml b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/pom.xml index e0b5d6962e..6f5918b8d1 100644 --- a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/pom.xml +++ b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator-operations/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-distributed-osgi + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-dosgi-dynamic-calculator-operations diff --git a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator/pom.xml b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator/pom.xml index 978ada93d0..9b79a97b07 100644 --- a/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator/pom.xml +++ b/samples/learning-more/distributed-osgi/dosgi-dynamic-calculator/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-distributed-osgi + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-dosgi-dynamic-calculator diff --git a/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/pom.xml b/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/pom.xml index 611b5a9366..59d74cb5ae 100644 --- a/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/pom.xml +++ b/samples/learning-more/implementation-bpel/helloworld-bpel-contribution/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-sample-implementation-bpel + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml zip diff --git a/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/pom.xml b/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/pom.xml index 0c7c4c230c..8417ee478f 100644 --- a/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/pom.xml +++ b/samples/learning-more/implementation-bpel/helloworld-bpel-webapp/pom.xml @@ -23,9 +23,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-sample-implementation-bpel + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-implementation-bpel-helloworld-webapp diff --git a/samples/learning-more/implementation-composite/helloworld-recursive-ws/pom.xml b/samples/learning-more/implementation-composite/helloworld-recursive-ws/pom.xml index a6c338475f..e6ec9557ac 100644 --- a/samples/learning-more/implementation-composite/helloworld-recursive-ws/pom.xml +++ b/samples/learning-more/implementation-composite/helloworld-recursive-ws/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-implementation-composite + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml zip diff --git a/samples/learning-more/implementation-composite/helloworld-recursive/pom.xml b/samples/learning-more/implementation-composite/helloworld-recursive/pom.xml index ef462dffba..d802f9a0e4 100644 --- a/samples/learning-more/implementation-composite/helloworld-recursive/pom.xml +++ b/samples/learning-more/implementation-composite/helloworld-recursive/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-implementation-composite + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml zip diff --git a/samples/learning-more/implementation-java/calculator-contribution/pom.xml b/samples/learning-more/implementation-java/calculator-contribution/pom.xml index e43f92a862..f10a4b486e 100644 --- a/samples/learning-more/implementation-java/calculator-contribution/pom.xml +++ b/samples/learning-more/implementation-java/calculator-contribution/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-sample-implementation-java + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-implementation-java-calculator-contribution Apache Tuscany SCA Sample implementation.java Calculator Contribution diff --git a/samples/learning-more/implementation-osgi/dosgi-calculator-operations/pom.xml b/samples/learning-more/implementation-osgi/dosgi-calculator-operations/pom.xml index f084b0ec3c..612bf0b634 100644 --- a/samples/learning-more/implementation-osgi/dosgi-calculator-operations/pom.xml +++ b/samples/learning-more/implementation-osgi/dosgi-calculator-operations/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-distributed-osgi-static + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-dosgi-calculator-operations diff --git a/samples/learning-more/implementation-osgi/dosgi-calculator/pom.xml b/samples/learning-more/implementation-osgi/dosgi-calculator/pom.xml index 0a436fc560..94a9d46db2 100644 --- a/samples/learning-more/implementation-osgi/dosgi-calculator/pom.xml +++ b/samples/learning-more/implementation-osgi/dosgi-calculator/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-distributed-osgi-static + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-dosgi-calculator diff --git a/samples/learning-more/implementation-script/calculator-contribution/pom.xml b/samples/learning-more/implementation-script/calculator-contribution/pom.xml index cd1be13214..2444855b17 100644 --- a/samples/learning-more/implementation-script/calculator-contribution/pom.xml +++ b/samples/learning-more/implementation-script/calculator-contribution/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-sample-implementation-script + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-implementation-script-calculator-contribution Apache Tuscany SCA Sample implementation.script Calculator Contribution diff --git a/samples/learning-more/implementation-spring/helloworld-spring-contribution/pom.xml b/samples/learning-more/implementation-spring/helloworld-spring-contribution/pom.xml index b4cb31e1ef..5b7b366056 100644 --- a/samples/learning-more/implementation-spring/helloworld-spring-contribution/pom.xml +++ b/samples/learning-more/implementation-spring/helloworld-spring-contribution/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-implementation-spring + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-implementation-spring-helloworld-contribution diff --git a/samples/learning-more/implementation-spring/helloworld-spring-webapp/pom.xml b/samples/learning-more/implementation-spring/helloworld-spring-webapp/pom.xml index 5b96d7d913..25a78c2a54 100644 --- a/samples/learning-more/implementation-spring/helloworld-spring-webapp/pom.xml +++ b/samples/learning-more/implementation-spring/helloworld-spring-webapp/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-implementation-spring + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-implementation-spring-helloworld-webapp diff --git a/samples/learning-more/implementation-web/helloworld-jaxrs/pom.xml b/samples/learning-more/implementation-web/helloworld-jaxrs/pom.xml index 43b0e64daa..9b874a5215 100644 --- a/samples/learning-more/implementation-web/helloworld-jaxrs/pom.xml +++ b/samples/learning-more/implementation-web/helloworld-jaxrs/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-implementation-webapp + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-implementation-web-helloworld-jaxrs-webapp diff --git a/samples/learning-more/implementation-web/helloworld-js-client/pom.xml b/samples/learning-more/implementation-web/helloworld-js-client/pom.xml index bbde1b0d65..bdd9c5085b 100644 --- a/samples/learning-more/implementation-web/helloworld-js-client/pom.xml +++ b/samples/learning-more/implementation-web/helloworld-js-client/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-implementation-webapp + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-implementation-web-helloworld-js-client-webapp diff --git a/samples/learning-more/implementation-web/helloworld-jsf/pom.xml b/samples/learning-more/implementation-web/helloworld-jsf/pom.xml index d93f1475ab..36fe0c93c8 100644 --- a/samples/learning-more/implementation-web/helloworld-jsf/pom.xml +++ b/samples/learning-more/implementation-web/helloworld-jsf/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-implementation-webapp + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-implementation-web-helloworld-jsf-webapp diff --git a/samples/learning-more/implementation-web/helloworld-jsp/pom.xml b/samples/learning-more/implementation-web/helloworld-jsp/pom.xml index 0aeed87589..fb1f93bcc1 100644 --- a/samples/learning-more/implementation-web/helloworld-jsp/pom.xml +++ b/samples/learning-more/implementation-web/helloworld-jsp/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-implementation-webapp + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-implementation-web-helloworld-jsp-webapp diff --git a/samples/learning-more/implementation-web/helloworld-servlet/pom.xml b/samples/learning-more/implementation-web/helloworld-servlet/pom.xml index 8892949405..5a07843e58 100644 --- a/samples/learning-more/implementation-web/helloworld-servlet/pom.xml +++ b/samples/learning-more/implementation-web/helloworld-servlet/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-implementation-webapp + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-implementation-web-helloworld-servlet-webapp diff --git a/samples/learning-more/implementation-web/helloworld-stripes/pom.xml b/samples/learning-more/implementation-web/helloworld-stripes/pom.xml index fd96fc3367..7e092f548b 100644 --- a/samples/learning-more/implementation-web/helloworld-stripes/pom.xml +++ b/samples/learning-more/implementation-web/helloworld-stripes/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-implementation-webapp + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-implementation-web-helloworld-stripes-webapp diff --git a/samples/learning-more/sca-client/calculator-scaclient/pom.xml b/samples/learning-more/sca-client/calculator-scaclient/pom.xml index a29fdc345d..d63a90c359 100644 --- a/samples/learning-more/sca-client/calculator-scaclient/pom.xml +++ b/samples/learning-more/sca-client/calculator-scaclient/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-sca-client + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-sca-client-calculator diff --git a/samples/learning-more/sca-client/helloworld-scaclient/pom.xml b/samples/learning-more/sca-client/helloworld-scaclient/pom.xml index a9c4ef0dc0..f891ee3e45 100644 --- a/samples/learning-more/sca-client/helloworld-scaclient/pom.xml +++ b/samples/learning-more/sca-client/helloworld-scaclient/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-samples-sca-client + tuscany-samples 2.0-SNAPSHOT - ../pom.xml + ../../../pom.xml sample-sca-client-helloworld From 15319b11eb4e61be59bcfb44efbe21afa923a921 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sun, 6 Feb 2011 09:07:24 +0000 Subject: [PATCH 129/157] Clean up contribution jar archetype and update to create a standalone project that doesn't use a tuscany parent pom git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067618 13f79535-47bb-0310-9956-ffa450edef68 --- maven/archetypes/contribution-jar/pom.xml | 54 +++++------ .../META-INF/maven/archetype-metadata.xml | 43 ++++++--- .../resources/META-INF/maven/archetype.xml | 10 +- .../resources/archetype-resources/pom.xml | 94 +++++++++---------- ...HelloworldService.java => Helloworld.java} | 2 +- .../src/main/java/HelloworldImpl.java | 2 +- .../resources/META-INF/sca-contribution.xml | 4 +- .../src/test/java/HelloworldTestCase.java | 48 ++++++++++ 8 files changed, 153 insertions(+), 104 deletions(-) rename maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/{HelloworldService.java => Helloworld.java} (96%) create mode 100644 maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/test/java/HelloworldTestCase.java diff --git a/maven/archetypes/contribution-jar/pom.xml b/maven/archetypes/contribution-jar/pom.xml index 9e9a4f9c75..d262f01b85 100644 --- a/maven/archetypes/contribution-jar/pom.xml +++ b/maven/archetypes/contribution-jar/pom.xml @@ -18,34 +18,34 @@ * under the License. --> - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 2.0-SNAPSHOT - ../../../pom.xml - + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-SNAPSHOT + ../../../pom.xml + - tuscany-contribution-jar - maven-archetype - Create an SCA JAR contribution project - Create an SCA JAR contribution project + tuscany-contribution-jar + maven-archetype + Create an SCA JAR contribution project + Create an SCA JAR contribution project - - - - org.apache.maven.archetype - archetype-packaging - 2.0-alpha-3 - - - - - maven-archetype-plugin - 2.0-alpha-3 - true - - - + + + + org.apache.maven.archetype + archetype-packaging + 2.0-alpha-3 + + + + + maven-archetype-plugin + 2.0-alpha-3 + true + + + diff --git a/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml index 46c5cd6dca..1e1c124869 100644 --- a/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -18,19 +18,32 @@ * under the License. --> - - - src/main/java - - **/*.java - - - - src/main/resources - - **/*.xml - **/*.composite - - - + + + src/main/java + + **/*.java + + + + src/test/java + + **/*.java + + + + src/main/resources + + **/*.xml + **/*.composite + + + + src/test/resources + + **/*.xml + **/*.composite + + + \ No newline at end of file diff --git a/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml b/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml index 69c3fb5ac9..6e0591fbfe 100644 --- a/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml +++ b/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml @@ -18,13 +18,5 @@ * under the License. --> - tuscany-contribution-jar - - src/main/java/HelloworldImpl.java - src/main/java/HelloworldService.java - - - src/main/hello.composite - src/main/webapp/META-INF/sca-contribution.xml - + tuscany-contribution-jar \ No newline at end of file diff --git a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml index 5a2755a325..28a846797c 100644 --- a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml +++ b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml @@ -18,64 +18,58 @@ * under the License. --> - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 - ${groupId} - ${project.artifactId} - ${project.version} - ${project.artifactId} + ${groupId} + ${artifactId} + ${version} + jar - + ${artifactId} - - org.oasis-open.sca.j - sca-caa-apis - 1.1-CD04 - provided - + + 2.0-SNAPSHOT + UTF-8 + - - junit - junit - 4.8.1 - test - + - + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + provided + - - install - ${project.artifactId} + + junit + junit + 4.8.1 + test + - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - true - true - - - - org.apache.tuscany.maven.plugins - maven-tuscany-plugin - - + + org.apache.tuscany.sca + tuscany-base-runtime + ${tuscany.version} + test + - + - - - - oasis.svn - http://tools.oasis-open.org/version-control/svn/sca-j/Release/ - - true - - - + + install + ${artifactId} + + + + org.apache.tuscany.maven.plugins + maven-tuscany-plugin + ${tuscany.version} + + + + diff --git a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldService.java b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/Helloworld.java similarity index 96% rename from maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldService.java rename to maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/Helloworld.java index d705564334..68f91f67cd 100644 --- a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldService.java +++ b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/Helloworld.java @@ -21,7 +21,7 @@ import org.oasisopen.sca.annotation.Remotable; @Remotable -public interface HelloworldService { +public interface Helloworld { String sayHello(String name); diff --git a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java index 26237c105c..f5af4c7366 100644 --- a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java +++ b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java @@ -23,7 +23,7 @@ import org.oasisopen.sca.annotation.EagerInit; @Scope("COMPOSITE") @EagerInit -public class HelloworldImpl implements HelloworldService { +public class HelloworldImpl implements Helloworld { public String sayHello(String name) { return "Hello " + name; diff --git a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml index 960d6a90ae..d2e633d3d8 100644 --- a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml +++ b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml @@ -19,5 +19,7 @@ --> - + + + diff --git a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/test/java/HelloworldTestCase.java b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/test/java/HelloworldTestCase.java new file mode 100644 index 0000000000..c98112cb93 --- /dev/null +++ b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/test/java/HelloworldTestCase.java @@ -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 ${package}; + +import org.junit.Assert; + +import org.apache.tuscany.sca.Node; +import org.apache.tuscany.sca.TuscanyRuntime; +import org.junit.Test; +import org.oasisopen.sca.NoSuchServiceException; + +public class HelloworldTestCase { + + @Test + public void testSayHello() throws NoSuchServiceException { + + // Run the SCA composite in a Tuscany runtime + Node node = TuscanyRuntime.runComposite("helloworld.composite", "target/classes"); + try { + + // Get the Helloworld service proxy + Helloworld helloworld = node.getService(Helloworld.class, "HelloworldComponent"); + + // test that it works as expected + Assert.assertEquals("Hello Amelia", helloworld.sayHello("Amelia")); + + } finally { + // Stop the Tuscany runtime Node + node.stop(); + } + } +} From e776b753a44381fca2f3ef550990bacca9d20f1f Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sun, 6 Feb 2011 09:19:10 +0000 Subject: [PATCH 130/157] Add compiler-plugin to contribution-jar archetype as its required when using older maven versions git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067620 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/resources/archetype-resources/pom.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml index 28a846797c..96b687fa79 100644 --- a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml +++ b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml @@ -68,6 +68,17 @@ maven-tuscany-plugin ${tuscany.version} + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.6 + 1.6 + true + true + + From f609c7e900f127f8ab76ab5cbd5a0898a5014829 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sun, 6 Feb 2011 10:01:25 +0000 Subject: [PATCH 131/157] Update the getting started contribution to ues the contribution cretaed from the Tuscany contribution-jar Maven archetype git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067625 13f79535-47bb-0310-9956-ffa450edef68 --- .../helloworld-contribution/README | 41 +++++- .../helloworld-contribution/pom.xml | 131 +++++++++++------- .../src/main/java/sample/HelloworldImpl.java | 1 - .../resources/META-INF/sca-contribution.xml | 5 +- .../src/main/resources/helloworld.composite | 2 +- .../src/main/resources/helloworldws.composite | 32 ----- .../test/java/sample/HelloworldTestCase.java | 40 +++--- 7 files changed, 138 insertions(+), 114 deletions(-) delete mode 100644 samples/getting-started/helloworld-contribution/src/main/resources/helloworldws.composite diff --git a/samples/getting-started/helloworld-contribution/README b/samples/getting-started/helloworld-contribution/README index ed0f1d0ce4..34c4b3a788 100644 --- a/samples/getting-started/helloworld-contribution/README +++ b/samples/getting-started/helloworld-contribution/README @@ -1,7 +1,36 @@ -The README in the /samples directory provides -general instructions about building and running samples. (where -distribution-unpack-dir is the directory in which you unpacked the tuscany -binary distribution archive). Take a look there first (noting at you read it that this sample -is not a new style sample). +Tuscany - Getting Started - Helloworld Sample +--------------------------------------------- + +This sample demonstrates a simple helloworld style SCA application and how to run that with Tuscany. + +See the README in the top-level samples folder for general information on the Tuscany samples. + +This project creates a jar format SCA contribution which has a deployable SCA composite. The composite +defines a single component named "HelloworldComponent" which implements a Helloworld service which +is implemented by a Java class. A JUnit testcase tests running the composite and invoking the service. + +You can use the contribution built in the Tuscany Shell - at the root of a Tuscany binary distribution +run the following command: + + bin\tuscany.bat samples\getting-started\helloworld-contribution + +You may then call the helloworld service with the shell command: + + invoke HelloworldComponent sayHello "your name" + + +--- + +This sample was created by the Tuscany contribution-jar Maven archetype. You can use that archetype to +create you own SCA contribution projects by running the following maven command: + + mvn archetype:generate -DarchetypeCatalog=http://tuscany.apache.org + +at the prompt select 1 to choose the contribution-jar archetype and then answer the questions. This project +used the following answers: + + Define value for property 'groupId': : org.apache.tuscany.sca.samples + Define value for property 'artifactId': : helloworld-contribution + Define value for property 'version': 1.0-SNAPSHOT: 2.0-SNAPSHOT + Define value for property 'package': org.apache.tuscany.sca.samples: sample -TODO - finish this \ No newline at end of file diff --git a/samples/getting-started/helloworld-contribution/pom.xml b/samples/getting-started/helloworld-contribution/pom.xml index d0f522d96b..5ecc7a8831 100644 --- a/samples/getting-started/helloworld-contribution/pom.xml +++ b/samples/getting-started/helloworld-contribution/pom.xml @@ -1,57 +1,86 @@ - - 4.0.0 - - org.apache.tuscany.sca - tuscany-samples - 2.0-SNAPSHOT - ../../pom.xml - - - jar - sample-helloworld-contribution - Apache Tuscany SCA Samples - Getting Started - helloworld-contribution - - - - org.apache.tuscany.sca - tuscany-base-runtime - 2.0-SNAPSHOT - - - junit - junit - 4.8.1 - test - - - - - ${project.artifactId} - + + 4.0.0 + + org.apache.tuscany.sca.samples + helloworld-contribution + 2.0-SNAPSHOT + jar + + helloworld-contribution + + + 2.0-SNAPSHOT + UTF-8 + + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + provided + + + + junit + junit + 4.8.1 + test + + + + org.apache.tuscany.sca + tuscany-base-runtime + ${tuscany.version} + test + + + + + + install + helloworld-contribution + + - org.apache.tuscany.maven.plugins - maven-tuscany-plugin - 2.0-SNAPSHOT + org.apache.tuscany.maven.plugins + maven-tuscany-plugin + ${tuscany.version} - - + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.6 + 1.6 + true + true + + + + + + diff --git a/samples/getting-started/helloworld-contribution/src/main/java/sample/HelloworldImpl.java b/samples/getting-started/helloworld-contribution/src/main/java/sample/HelloworldImpl.java index aa563cbdf3..3b86c10df0 100644 --- a/samples/getting-started/helloworld-contribution/src/main/java/sample/HelloworldImpl.java +++ b/samples/getting-started/helloworld-contribution/src/main/java/sample/HelloworldImpl.java @@ -26,7 +26,6 @@ public class HelloworldImpl implements Helloworld { public String sayHello(String name) { - System.out.println("HelloworldImpl.sayHello " + name); return "Hello " + name; } diff --git a/samples/getting-started/helloworld-contribution/src/main/resources/META-INF/sca-contribution.xml b/samples/getting-started/helloworld-contribution/src/main/resources/META-INF/sca-contribution.xml index 61053aa92e..95c32fb5bf 100644 --- a/samples/getting-started/helloworld-contribution/src/main/resources/META-INF/sca-contribution.xml +++ b/samples/getting-started/helloworld-contribution/src/main/resources/META-INF/sca-contribution.xml @@ -19,8 +19,7 @@ --> - - - + + diff --git a/samples/getting-started/helloworld-contribution/src/main/resources/helloworld.composite b/samples/getting-started/helloworld-contribution/src/main/resources/helloworld.composite index 324395c246..e0206cd6e8 100644 --- a/samples/getting-started/helloworld-contribution/src/main/resources/helloworld.composite +++ b/samples/getting-started/helloworld-contribution/src/main/resources/helloworld.composite @@ -20,7 +20,7 @@ + name="helloworld-contribution"> diff --git a/samples/getting-started/helloworld-contribution/src/main/resources/helloworldws.composite b/samples/getting-started/helloworld-contribution/src/main/resources/helloworldws.composite deleted file mode 100644 index abefee7360..0000000000 --- a/samples/getting-started/helloworld-contribution/src/main/resources/helloworldws.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/samples/getting-started/helloworld-contribution/src/test/java/sample/HelloworldTestCase.java b/samples/getting-started/helloworld-contribution/src/test/java/sample/HelloworldTestCase.java index ded7418469..be27aa68ef 100644 --- a/samples/getting-started/helloworld-contribution/src/test/java/sample/HelloworldTestCase.java +++ b/samples/getting-started/helloworld-contribution/src/test/java/sample/HelloworldTestCase.java @@ -18,31 +18,31 @@ */ package sample; -import static org.junit.Assert.assertEquals; +import org.junit.Assert; -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; +import org.apache.tuscany.sca.Node; +import org.apache.tuscany.sca.TuscanyRuntime; import org.junit.Test; +import org.oasisopen.sca.NoSuchServiceException; public class HelloworldTestCase { @Test - public void testSayHello() { - // Start up the Tuscany runtime with this modules as the contribution - Node node = NodeFactory.newInstance().createNode(new Contribution("c1", "target/classes")); - node.start(); - - // This contribution is configured to deploy the helloworld.composite file - // automatically. This defines the HelloworldComponent. Get a local proxy to it - // and call the sayHello service operation. - Helloworld helloworld = node.getService(Helloworld.class, "HelloworldComponent"); - String response = helloworld.sayHello("Petra"); - System.out.println("Response from helloworld.sayHello(\"Petra\") = " + response); - assertEquals("Hello Petra", response); - - // Stop the Tuscany runtime - node.stop(); - } + public void testSayHello() throws NoSuchServiceException { + // Run the SCA composite in a Tuscany runtime + Node node = TuscanyRuntime.runComposite("helloworld.composite", "target/classes"); + try { + + // Get the Helloworld service proxy + Helloworld helloworld = node.getService(Helloworld.class, "HelloworldComponent"); + + // test that it works as expected + Assert.assertEquals("Hello Amelia", helloworld.sayHello("Amelia")); + + } finally { + // Stop the Tuscany runtime Node + node.stop(); + } + } } From f6488b535d6b294c1f938ac1c06276bebbbca381 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sun, 6 Feb 2011 10:11:41 +0000 Subject: [PATCH 132/157] Add a composite using binding.ws that can be used with the helloworld contribution git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067627 13f79535-47bb-0310-9956-ffa450edef68 --- .../files/helloworldws.composite | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 samples/getting-started/files/helloworldws.composite diff --git a/samples/getting-started/files/helloworldws.composite b/samples/getting-started/files/helloworldws.composite new file mode 100644 index 0000000000..abefee7360 --- /dev/null +++ b/samples/getting-started/files/helloworldws.composite @@ -0,0 +1,32 @@ + + + + + + + + + + + + From 0ebad3e0cb98cf651a19f8d19da303b22ab81f63 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sun, 6 Feb 2011 11:17:28 +0000 Subject: [PATCH 133/157] Add explicit version to compiler plugin to avoid maven warning messages git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067640 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/resources/archetype-resources/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml index 96b687fa79..4a78d6d26b 100644 --- a/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml +++ b/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml @@ -72,6 +72,7 @@ org.apache.maven.plugins maven-compiler-plugin + 2.3.2 1.6 1.6 From 60f586c0c7d5cd4aab52d8d5477564830a09310d Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sun, 6 Feb 2011 12:23:40 +0000 Subject: [PATCH 134/157] Update the Tuscany maven plugin to run the Shell so that it supports all the interactive shell commands from mvn tuscany:run git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067646 13f79535-47bb-0310-9956-ffa450edef68 --- maven/maven-tuscany-plugin/pom.xml | 5 +++++ .../tuscany/maven/plugin/TuscanyRunMojo.java | 21 +++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/maven/maven-tuscany-plugin/pom.xml b/maven/maven-tuscany-plugin/pom.xml index 5a4d890a89..45d571d437 100644 --- a/maven/maven-tuscany-plugin/pom.xml +++ b/maven/maven-tuscany-plugin/pom.xml @@ -59,6 +59,11 @@ tuscany-domain-hazelcast 2.0-SNAPSHOT + + jline + jline + 0.9.94 + diff --git a/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java b/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java index edb7e0f0de..7e3938d544 100644 --- a/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java +++ b/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java @@ -30,10 +30,11 @@ import org.apache.maven.plugin.logging.Log; import org.apache.maven.project.MavenProject; import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; +import org.apache.tuscany.sca.shell.Shell; /** - * Maven Mojo to run the SCA contribution project in Tuscany. + * Maven Mojo to run the Tuscany Shell and install the project as an SCA contribution. + * * Invoked with "mvn tuscany:run" * * @goal run @@ -85,16 +86,17 @@ public class TuscanyRunMojo extends AbstractMojo { protected File finalName; /** - * @parameter expression="${config}" default-value="uri:default" + * @parameter expression="${config}" default-value="default" */ private String config; + /** * @parameter expression="${contributions}" */ private String[] contributions; public void execute() throws MojoExecutionException, MojoFailureException { - getLog().info("Starting Tuscany Runtime..."); + getLog().info("Starting Tuscany Shell..."); List contributionList = new ArrayList(); @@ -102,9 +104,16 @@ public void execute() throws MojoExecutionException, MojoFailureException { addAdditionalContributions(contributionList); - Node node = NodeFactory.newInstance(config).createNode((String)null, contributionList.toArray(new String[contributionList.size()])).start(); + contributionList.add(0, config); + + try { + Shell.main(contributionList.toArray(new String[contributionList.size()])); + } catch (Exception e) { + throw new MojoExecutionException("Exception in Shell", e); + } - waitForShutdown(node, getLog()); +// waitForShutdown(new Ob, getLog()); + getLog().info("Tuscany Shell stopped."); } private void addAdditionalContributions(List contributionList) throws MojoExecutionException { From a7beb22aabffb211dffcfe28f5404b93f62f4696 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sun, 6 Feb 2011 12:31:28 +0000 Subject: [PATCH 135/157] Update the plugins execute phase from package to test-compile so that you don't need to build the project each time to run it git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067648 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java b/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java index 7e3938d544..f9c697bc7c 100644 --- a/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java +++ b/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java @@ -39,7 +39,7 @@ * * @goal run * @requiresDependencyResolution runtime - * @execute phase="package" + * @execute phase="test-compile" * @description Runs Tuscany directly from a SCA conribution maven project */ public class TuscanyRunMojo extends AbstractMojo { From 635d8539f646b27b5698241114fcf34eddb26760 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sun, 6 Feb 2011 13:02:10 +0000 Subject: [PATCH 136/157] Rename the tuscany plugin 'launch' mojo to be named 'shell' and update it to run the tuscany shell. So now you can run the shell without needing to get any Tuscany distribution by using: mvn org.apache.tuscany.maven.plugins:maven-tuscany-plugin:2.0-SNAPSHOT:shell git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067654 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/plugin/TuscanyLaunchMojo.java | 108 ------------------ .../maven/plugin/TuscanyShellMojo.java | 79 +++++++++++++ 2 files changed, 79 insertions(+), 108 deletions(-) delete mode 100644 maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyLaunchMojo.java create mode 100644 maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java diff --git a/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyLaunchMojo.java b/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyLaunchMojo.java deleted file mode 100644 index 55b0a51b7f..0000000000 --- a/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyLaunchMojo.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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.maven.plugin; - -import java.util.ArrayList; -import java.util.List; -import java.util.StringTokenizer; - -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.plugin.logging.Log; -import org.apache.tuscany.sca.domain.node.DomainNode; - -/** - * Maven Mojo to launch a Tuscany runtime - * Invoked with mvn org.apache.tuscany.maven.plugin:maven-tuscany-plugin:launch [-Ddomain=tribes:myDomain] -Dcontributions=path\to\scacontribution - * - * @goal launch - * @requiresProject false - * @requiresDependencyResolution runtime - */ -public class TuscanyLaunchMojo extends AbstractMojo { - - /** - * @parameter expression="${domain}" default-value="vm:default" - */ - private String domain; - - /** - * @parameter expression="${contributions}" - */ - private String contributions; - - public void execute() throws MojoExecutionException, MojoFailureException { - - if (contributions == null) { - getLog().info("Missing contributions parameter"); - getLog().info(" use -Dcontributions="); - return; - } - - getLog().info("Launching Tuscany Runtime..."); - - List cs = new ArrayList(); - StringTokenizer st = new StringTokenizer(contributions, ","); - while (st.hasMoreTokens()) { - cs.add(st.nextToken()); - } - - DomainNode domainNode = new DomainNode(domain, cs.toArray(new String[cs.size()])); - - waitForShutdown(domainNode, getLog()); - - } - - protected void waitForShutdown(DomainNode domainNode, Log log) { - Runtime.getRuntime().addShutdownHook(new ShutdownThread(domainNode, log)); - synchronized (this) { - try { - log.info("Ctrl-C to end..."); - this.wait(); - } catch (InterruptedException e) { - log.error(e); - } - } - } - - protected static class ShutdownThread extends Thread { - - private DomainNode domainNode; - private Log log; - - public ShutdownThread(DomainNode domainNode, Log log) { - super(); - this.domainNode = domainNode; - this.log = log; - } - - @Override - public void run() { - try { - - log.info("Stopping Tuscany Runtime..."); - domainNode.stop(); - - } catch (Exception e) { - log.error(e); - } - } - } -} diff --git a/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java b/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java new file mode 100644 index 0000000000..1a9545e551 --- /dev/null +++ b/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java @@ -0,0 +1,79 @@ +/* + * 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.maven.plugin; + +import java.util.ArrayList; +import java.util.List; +import java.util.StringTokenizer; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.tuscany.sca.shell.Shell; + +/** + * Maven Mojo to run the Tuscany Shell + * + * Invoked with mvn org.apache.tuscany.maven.plugin:maven-tuscany-plugins:shell [-Ddomain=uri:myDomain] -Dcontributions=path\to\scacontribution,... + * + * @goal shell + * @requiresProject false + * @requiresDependencyResolution runtime + */ +public class TuscanyShellMojo extends AbstractMojo { + + /** + * @parameter expression="${domain}" default-value="default" + */ + private String domain; + + /** + * @parameter expression="${contributions}" + */ + private String contributions; + + public void execute() throws MojoExecutionException, MojoFailureException { + getLog().info("Starting Tuscany Shell..."); + + String[] args; + if (contributions != null) { + List cs = new ArrayList(); + StringTokenizer st = new StringTokenizer(contributions, ","); + while (st.hasMoreTokens()) { + cs.add(st.nextToken()); + } + cs.add(0, domain); + args = cs.toArray(new String[cs.size()]); + } else { + if ("default".equals(domain)) { + args = new String[]{}; + } else { + args = new String[]{domain}; + } + } + + try { + Shell.main(args); + } catch (Exception e) { + throw new MojoExecutionException("Exception in Shell", e); + } + + getLog().info("Tuscany Shell stopped."); + } +} From 03109d6e4b86417bc54065d70ef7bc243e1fc049 Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Sun, 6 Feb 2011 18:54:53 +0000 Subject: [PATCH 137/157] Moving to latest dojo release (1.5.0) git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067728 13f79535-47bb-0310-9956-ffa450edef68 --- modules/web-javascript-dojo/build-dojo.xml | 12 ++-- modules/web-javascript-dojo/pom.xml | 14 ++-- pom.xml | 15 ++++- samples/applications/store-webapp/pom.xml | 15 ++--- samples/applications/store/pom.xml | 18 ++---- .../calculator-webapp/build-dojo.xml | 64 ------------------- .../binding-jsonrpc/calculator-webapp/pom.xml | 55 +++------------- 7 files changed, 50 insertions(+), 143 deletions(-) delete mode 100644 samples/learning-more/binding-jsonrpc/calculator-webapp/build-dojo.xml diff --git a/modules/web-javascript-dojo/build-dojo.xml b/modules/web-javascript-dojo/build-dojo.xml index 3a0c0fd87f..85bdaa4c42 100644 --- a/modules/web-javascript-dojo/build-dojo.xml +++ b/modules/web-javascript-dojo/build-dojo.xml @@ -18,12 +18,14 @@ * under the License. --> - - + + + - + + @@ -40,7 +42,7 @@ - @@ -57,7 +59,7 @@ verbose="true"/> - + diff --git a/modules/web-javascript-dojo/pom.xml b/modules/web-javascript-dojo/pom.xml index 47ff6f5a9b..744c4f27dd 100644 --- a/modules/web-javascript-dojo/pom.xml +++ b/modules/web-javascript-dojo/pom.xml @@ -35,31 +35,31 @@ tuscany-core 2.0-SNAPSHOT - + org.apache.tuscany.sca tuscany-implementation-widget 2.0-SNAPSHOT - + org.apache.tuscany.sca tuscany-common-http 2.0-SNAPSHOT - + org.apache.tuscany.sca tuscany-host-http 2.0-SNAPSHOT - + org.dojotoolkit dojo - 1.3.0 + 1.5.0 zip - + javax.servlet @@ -94,6 +94,7 @@ + @@ -109,6 +110,7 @@ + diff --git a/pom.xml b/pom.xml index eb8bd06c49..5c25e0a63f 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.apache apache - 7 + 8 @@ -48,6 +48,7 @@ . ${java.home}/../lib/tools.jar + 1.5.0 UTF-8 UTF-8 @@ -73,7 +74,17 @@ false - + + maven.org + Maven.org + http://repo2.maven.org/maven2/ + + true + + + false + + diff --git a/samples/applications/store-webapp/pom.xml b/samples/applications/store-webapp/pom.xml index 190ed73d98..a5c999bafa 100644 --- a/samples/applications/store-webapp/pom.xml +++ b/samples/applications/store-webapp/pom.xml @@ -7,15 +7,15 @@ * 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. + * under the License. --> 4.0.0 @@ -82,8 +82,7 @@ org.apache.tuscany.sca tuscany-web-javascript-dojo 2.0-SNAPSHOT - - + junit @@ -93,7 +92,7 @@ - + ${project.artifactId} @@ -108,12 +107,12 @@ /${project.artifactId} - + org.mortbay.jetty maven-jetty-plugin 6.1.18 - + diff --git a/samples/applications/store/pom.xml b/samples/applications/store/pom.xml index c9c6c2a639..7917a84aeb 100644 --- a/samples/applications/store/pom.xml +++ b/samples/applications/store/pom.xml @@ -7,15 +7,15 @@ * 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. + * under the License. --> 4.0.0 @@ -33,15 +33,13 @@ org.apache.tuscany.sca tuscany-base-runtime-pom 2.0-SNAPSHOT - pom + pom - org.apache.tuscany.sca tuscany-data-api 2.0-SNAPSHOT - org.apache.tuscany.sca tuscany-binding-atom-runtime @@ -77,27 +75,23 @@ tuscany-implementation-widget-runtime-dojo 2.0-SNAPSHOT - org.apache.tuscany.sca tuscany-web-javascript-dojo 2.0-SNAPSHOT - - + org.mortbay.jetty jetty 6.1.19 test - net.sourceforge.htmlunit htmlunit 2.6 test - junit junit @@ -105,7 +99,7 @@ test - + ${project.artifactId} diff --git a/samples/learning-more/binding-jsonrpc/calculator-webapp/build-dojo.xml b/samples/learning-more/binding-jsonrpc/calculator-webapp/build-dojo.xml deleted file mode 100644 index 36714c67fc..0000000000 --- a/samples/learning-more/binding-jsonrpc/calculator-webapp/build-dojo.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/learning-more/binding-jsonrpc/calculator-webapp/pom.xml b/samples/learning-more/binding-jsonrpc/calculator-webapp/pom.xml index da55756087..92a4e61f63 100644 --- a/samples/learning-more/binding-jsonrpc/calculator-webapp/pom.xml +++ b/samples/learning-more/binding-jsonrpc/calculator-webapp/pom.xml @@ -7,15 +7,15 @@ * 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. + * under the License. --> 4.0.0 @@ -34,20 +34,19 @@ org.apache.tuscany.sca tuscany-base-runtime 2.0-SNAPSHOT - + org.apache.tuscany.sca tuscany-binding-jsonrpc-runtime 2.0-SNAPSHOT - + - org.dojotoolkit - dojo - 1.3.0 - zip - + org.apache.tuscany.sca + tuscany-web-javascript-dojo + 2.0-SNAPSHOT + junit @@ -66,42 +65,6 @@ maven-tuscany-plugin 2.0-SNAPSHOT - - org.apache.maven.plugins - maven-antrun-plugin - - - copy-dojo-files - generate-resources - - run - - - - - - - - - - - - clean-dojo-files - clean - - run - - - - - - - - - - - - org.mortbay.jetty maven-jetty-plugin From f050cbd44ce42a057df6bea7602db4c310c92ff2 Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Sun, 6 Feb 2011 18:55:25 +0000 Subject: [PATCH 138/157] Simplifying modules structure by merging *-js-dojo into the binding-runtime specific modules git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067729 13f79535-47bb-0310-9956-ffa450edef68 --- features/all/pom.xml | 10 - features/web20/pom.xml | 18 -- modules/binding-atom-js-dojo/LICENSE | 205 ------------------ .../binding-atom-js-dojo/META-INF/MANIFEST.MF | 24 -- modules/binding-atom-js-dojo/NOTICE | 6 - modules/binding-atom-js-dojo/pom.xml | 53 ----- .../binding-atom-runtime/META-INF/MANIFEST.MF | 7 +- modules/binding-atom-runtime/pom.xml | 60 ++--- .../AtomBindingJavascriptProxyFactory.java} | 2 +- ....sca.web.javascript.JavascriptProxyFactory | 8 +- modules/binding-jsonrpc-js-dojo/LICENSE | 205 ------------------ .../META-INF/MANIFEST.MF | 22 -- modules/binding-jsonrpc-js-dojo/NOTICE | 6 - modules/binding-jsonrpc-js-dojo/pom.xml | 52 ----- .../META-INF/MANIFEST.MF | 5 + modules/binding-jsonrpc-runtime/pom.xml | 6 + ...JSONRPCBindingJavascriptProxyFactory.java} | 2 +- ....sca.web.javascript.JavascriptProxyFactory | 8 +- modules/binding-rest-js-dojo/LICENSE | 205 ------------------ .../binding-rest-js-dojo/META-INF/MANIFEST.MF | 17 -- modules/binding-rest-js-dojo/NOTICE | 6 - modules/binding-rest-js-dojo/pom.xml | 53 ----- modules/binding-rest-runtime/pom.xml | 24 +- .../RESTBindingJavascriptProxyFactory.java | 77 +++++++ ....sca.web.javascript.JavascriptProxyFactory | 8 +- modules/pom.xml | 3 - samples/applications/store-webapp/pom.xml | 10 - samples/applications/store/pom.xml | 10 - 28 files changed, 156 insertions(+), 956 deletions(-) delete mode 100644 modules/binding-atom-js-dojo/LICENSE delete mode 100644 modules/binding-atom-js-dojo/META-INF/MANIFEST.MF delete mode 100644 modules/binding-atom-js-dojo/NOTICE delete mode 100644 modules/binding-atom-js-dojo/pom.xml rename modules/{binding-atom-js-dojo/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/AtomBindingJavascriptProxyFactoryImpl.java => binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/AtomBindingJavascriptProxyFactory.java} (96%) rename modules/{binding-atom-js-dojo => binding-atom-runtime}/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory (84%) delete mode 100644 modules/binding-jsonrpc-js-dojo/LICENSE delete mode 100644 modules/binding-jsonrpc-js-dojo/META-INF/MANIFEST.MF delete mode 100644 modules/binding-jsonrpc-js-dojo/NOTICE delete mode 100644 modules/binding-jsonrpc-js-dojo/pom.xml rename modules/{binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java => binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactory.java} (96%) rename modules/{binding-jsonrpc-js-dojo => binding-jsonrpc-runtime}/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory (83%) delete mode 100644 modules/binding-rest-js-dojo/LICENSE delete mode 100644 modules/binding-rest-js-dojo/META-INF/MANIFEST.MF delete mode 100644 modules/binding-rest-js-dojo/NOTICE delete mode 100644 modules/binding-rest-js-dojo/pom.xml create mode 100644 modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/js/dojo/RESTBindingJavascriptProxyFactory.java rename modules/{binding-rest-js-dojo => binding-rest-runtime}/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory (84%) diff --git a/features/all/pom.xml b/features/all/pom.xml index 9113d6af55..3fcaa46226 100644 --- a/features/all/pom.xml +++ b/features/all/pom.xml @@ -143,11 +143,6 @@ tuscany-binding-atom-runtime 2.0-SNAPSHOT - - org.apache.tuscany.sca - tuscany-binding-atom-js-dojo - 2.0-SNAPSHOT - org.apache.tuscany.sca @@ -196,11 +191,6 @@ tuscany-binding-jsonrpc-runtime 2.0-SNAPSHOT - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-js-dojo - 2.0-SNAPSHOT - org.apache.tuscany.sca diff --git a/features/web20/pom.xml b/features/web20/pom.xml index 84fc50352a..89f0f9679d 100644 --- a/features/web20/pom.xml +++ b/features/web20/pom.xml @@ -79,12 +79,6 @@ 2.0-SNAPSHOT - - org.apache.tuscany.sca - tuscany-binding-atom-js-dojo - 2.0-SNAPSHOT - - org.apache.tuscany.sca tuscany-binding-http-runtime @@ -97,24 +91,12 @@ 2.0-SNAPSHOT - - org.apache.tuscany.sca - tuscany-binding-rest-js-dojo - 2.0-SNAPSHOT - - org.apache.tuscany.sca tuscany-binding-jsonrpc-runtime 2.0-SNAPSHOT - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-js-dojo - 2.0-SNAPSHOT - - org.apache.tuscany.sca diff --git a/modules/binding-atom-js-dojo/LICENSE b/modules/binding-atom-js-dojo/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/modules/binding-atom-js-dojo/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed 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. - - - diff --git a/modules/binding-atom-js-dojo/META-INF/MANIFEST.MF b/modules/binding-atom-js-dojo/META-INF/MANIFEST.MF deleted file mode 100644 index ba2b954239..0000000000 --- a/modules/binding-atom-js-dojo/META-INF/MANIFEST.MF +++ /dev/null @@ -1,24 +0,0 @@ -Manifest-Version: 1.0 -Export-Package: org.apache.tuscany.sca.binding.atom.js.dojo;uses:="org - .apache.tuscany.sca.assembly,org.apache.tuscany.sca.web.javascript,or - g.apache.tuscany.sca.binding.atom,javax.xml.namespace";version="2.0.0" -SCA-Version: 1.1 -Bundle-Name: Apache Tuscany SCA Atom Feed Binding JavaScript using Doj - o -Bundle-Vendor: The Apache Software Foundation -Bundle-Version: 0 -Bundle-ManifestVersion: 2 -Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt -Bundle-Description: Apache Tuscany SCA Atom Feed Binding JavaScript us - ing Dojo -Import-Package: javax.xml.namespace, - org.apache.tuscany.sca.assembly;version="2.0.0", - org.apache.tuscany.sca.assembly.xml;version="2.0.0", - org.apache.tuscany.sca.binding.atom;version="2.0.0", - org.apache.tuscany.sca.binding.atom.js.dojo;version="2.0.0", - org.apache.tuscany.sca.web.javascript;version="2.0.0", - org.apache.tuscany.sca.core, - org.apache.tuscany.sca.monitor -Bundle-SymbolicName: org.apache.tuscany.sca.binding.atom-js-dojo -Bundle-DocURL: http://www.apache.org/ - diff --git a/modules/binding-atom-js-dojo/NOTICE b/modules/binding-atom-js-dojo/NOTICE deleted file mode 100644 index d69e595698..0000000000 --- a/modules/binding-atom-js-dojo/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2011 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/modules/binding-atom-js-dojo/pom.xml b/modules/binding-atom-js-dojo/pom.xml deleted file mode 100644 index 8c40ca4059..0000000000 --- a/modules/binding-atom-js-dojo/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-modules - 2.0-SNAPSHOT - ../pom.xml - - - tuscany-binding-atom-js-dojo - Apache Tuscany SCA Atom Feed Binding JavaScript using Dojo - - - - org.apache.tuscany.sca - tuscany-binding-atom - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-web-javascript - 2.0-SNAPSHOT - - - - junit - junit - 4.8.1 - test - - - - diff --git a/modules/binding-atom-runtime/META-INF/MANIFEST.MF b/modules/binding-atom-runtime/META-INF/MANIFEST.MF index b077100048..9fac335c77 100644 --- a/modules/binding-atom-runtime/META-INF/MANIFEST.MF +++ b/modules/binding-atom-runtime/META-INF/MANIFEST.MF @@ -1,6 +1,11 @@ Manifest-Version: 1.0 Export-Package: - org.apache.tuscany.sca.binding.atom.collection + org.apache.tuscany.sca.binding.atom.collection, + org.apache.tuscany.sca.binding.atom.js.dojo;version="2.0.0"; + uses:="org.apache.tuscany.sca.assembly, + org.apache.tuscany.sca.web.javascript, + org.apache.tuscany.sca.binding.atom, + javax.xml.namespace" SCA-Version: 1.1 Bundle-Name: Apache Tuscany SCA Abdera Atom Feed Binding Extension Bundle-Vendor: The Apache Software Foundation diff --git a/modules/binding-atom-runtime/pom.xml b/modules/binding-atom-runtime/pom.xml index f582807f7c..e11a3bdce2 100644 --- a/modules/binding-atom-runtime/pom.xml +++ b/modules/binding-atom-runtime/pom.xml @@ -7,15 +7,15 @@ * 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. + * under the License. --> 4.0.0 @@ -47,12 +47,12 @@ tuscany-interface-java 2.0-SNAPSHOT - + org.apache.tuscany.sca tuscany-interface-wsdl 2.0-SNAPSHOT - + org.apache.tuscany.sca @@ -77,32 +77,38 @@ tuscany-common-http 2.0-SNAPSHOT - + org.apache.tuscany.sca tuscany-host-http 2.0-SNAPSHOT + + org.apache.tuscany.sca + tuscany-web-javascript + 2.0-SNAPSHOT + + org.apache.httpcomponents httpclient 4.0.3 - - + + org.apache.httpcomponents httpcore 4.0.1 - + javax.servlet servlet-api - 2.5 + 2.5 provided - + org.apache.ws.commons.axiom axiom-impl @@ -127,7 +133,7 @@ org.apache.abdera abdera-core - 1.1.1 + 1.1.1 org.apache.geronimo.specs @@ -138,8 +144,8 @@ geronimo-stax-api_1.0_spec - - + + org.apache.abdera abdera-parser @@ -162,31 +168,31 @@ axiom-impl - - + + org.apache.abdera abdera-client - 1.1.1 - - + 1.1.1 + + org.apache.abdera abdera-extensions-main - 1.1.1 - - + 1.1.1 + + org.apache.abdera abdera-extensions-json - 1.1.1 + 1.1.1 javax.activation activation - + commons-codec @@ -209,15 +215,15 @@ avalon-framework - - + + org.apache.tuscany.sca tuscany-node-impl 2.0-SNAPSHOT test - + org.apache.tuscany.sca tuscany-host-jetty diff --git a/modules/binding-atom-js-dojo/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/AtomBindingJavascriptProxyFactoryImpl.java b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/AtomBindingJavascriptProxyFactory.java similarity index 96% rename from modules/binding-atom-js-dojo/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/AtomBindingJavascriptProxyFactoryImpl.java rename to modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/AtomBindingJavascriptProxyFactory.java index ca6cff252b..b420f1114d 100644 --- a/modules/binding-atom-js-dojo/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/AtomBindingJavascriptProxyFactoryImpl.java +++ b/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/AtomBindingJavascriptProxyFactory.java @@ -33,7 +33,7 @@ import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; import org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory; -public class AtomBindingJavascriptProxyFactoryImpl implements JavascriptProxyFactory { +public class AtomBindingJavascriptProxyFactory implements JavascriptProxyFactory { private static final QName NAME = AtomBinding.TYPE; public Class getModelType() { diff --git a/modules/binding-atom-js-dojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory b/modules/binding-atom-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory similarity index 84% rename from modules/binding-atom-js-dojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory rename to modules/binding-atom-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory index c9ff2ef9d2..caa42e9618 100644 --- a/modules/binding-atom-js-dojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory +++ b/modules/binding-atom-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory @@ -5,15 +5,15 @@ # 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. +# under the License. # Implementation class for the Javascript Proxy Factory -org.apache.tuscany.sca.binding.atom.js.dojo.AtomBindingJavascriptProxyFactoryImpl;qname=http://tuscany.apache.org/xmlns/sca/1.1#binding.atom,model=org.apache.tuscany.sca.binding.atom.AtomBinding \ No newline at end of file +org.apache.tuscany.sca.binding.atom.js.dojo.AtomBindingJavascriptProxyFactory;qname=http://tuscany.apache.org/xmlns/sca/1.1#binding.atom,model=org.apache.tuscany.sca.binding.atom.AtomBinding \ No newline at end of file diff --git a/modules/binding-jsonrpc-js-dojo/LICENSE b/modules/binding-jsonrpc-js-dojo/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/modules/binding-jsonrpc-js-dojo/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed 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. - - - diff --git a/modules/binding-jsonrpc-js-dojo/META-INF/MANIFEST.MF b/modules/binding-jsonrpc-js-dojo/META-INF/MANIFEST.MF deleted file mode 100644 index a8d4ba39b3..0000000000 --- a/modules/binding-jsonrpc-js-dojo/META-INF/MANIFEST.MF +++ /dev/null @@ -1,22 +0,0 @@ -Manifest-Version: 1.0 -Export-Package: org.apache.tuscany.sca.binding.jsonrpc.js.dojo;uses:=" - org.apache.tuscany.sca.binding.jsonrpc,org.apache.tuscany.sca.assembl - y,org.apache.tuscany.sca.web.javascript,javax.xml.namespace";version= - "2.0.0" -SCA-Version: 1.1 -Bundle-Name: Apache Tuscany SCA JSON-RPC Binding JavaScript using Dojo -Bundle-Vendor: The Apache Software Foundation -Bundle-Version: 2.0.0 -Bundle-ManifestVersion: 2 -Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt -Bundle-Description: Apache Tuscany SCA JSON-RPC Binding JavaScript usi - ng Dojo -Import-Package: javax.xml.namespace, - org.apache.tuscany.sca.assembly;version="2.0.0", - org.apache.tuscany.sca.assembly.xml;version="2.0.0", - org.apache.tuscany.sca.binding.jsonrpc;version="2.0.0", - org.apache.tuscany.sca.binding.jsonrpc.js.dojo;version="2.0.0", - org.apache.tuscany.sca.web.javascript;version="2.0.0" -Bundle-SymbolicName: org.apache.tuscany.sca.binding.jsonrpc-js.dojo -Bundle-DocURL: http://www.apache.org/ - diff --git a/modules/binding-jsonrpc-js-dojo/NOTICE b/modules/binding-jsonrpc-js-dojo/NOTICE deleted file mode 100644 index d69e595698..0000000000 --- a/modules/binding-jsonrpc-js-dojo/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2011 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/modules/binding-jsonrpc-js-dojo/pom.xml b/modules/binding-jsonrpc-js-dojo/pom.xml deleted file mode 100644 index 01a55bc902..0000000000 --- a/modules/binding-jsonrpc-js-dojo/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-modules - 2.0-SNAPSHOT - ../pom.xml - - - tuscany-binding-jsonrpc-js-dojo - Apache Tuscany SCA JSON-RPC Binding JavaScript using Dojo - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-web-javascript - 2.0-SNAPSHOT - - - - junit - junit - 4.8.1 - test - - - diff --git a/modules/binding-jsonrpc-runtime/META-INF/MANIFEST.MF b/modules/binding-jsonrpc-runtime/META-INF/MANIFEST.MF index 8f550a8fc6..16d6e1f322 100644 --- a/modules/binding-jsonrpc-runtime/META-INF/MANIFEST.MF +++ b/modules/binding-jsonrpc-runtime/META-INF/MANIFEST.MF @@ -36,4 +36,9 @@ Import-Package: javax.security.auth.login, org.oasisopen.sca.annotation;version="2.0.0" Bundle-SymbolicName: org.apache.tuscany.sca.binding.jsonrpc.runtime Bundle-DocURL: http://www.apache.org/ +Export-Package: org.apache.tuscany.sca.binding.jsonrpc.js.dojo;version="2.0.0"; + uses:="org.apache.tuscany.sca.binding.jsonrpc, + org.apache.tuscany.sca.assembly, + org.apache.tuscany.sca.web.javascript, + javax.xml.namespace" diff --git a/modules/binding-jsonrpc-runtime/pom.xml b/modules/binding-jsonrpc-runtime/pom.xml index ba7b49e7b7..579f7aa822 100644 --- a/modules/binding-jsonrpc-runtime/pom.xml +++ b/modules/binding-jsonrpc-runtime/pom.xml @@ -72,6 +72,12 @@ 2.0-SNAPSHOT + + org.apache.tuscany.sca + tuscany-web-javascript + 2.0-SNAPSHOT + + org.apache.httpcomponents httpclient diff --git a/modules/binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java b/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactory.java similarity index 96% rename from modules/binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java rename to modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactory.java index f4c32e84c0..59a804a561 100644 --- a/modules/binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java +++ b/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactory.java @@ -33,7 +33,7 @@ import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; import org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory; -public class JSONRPCBindingJavascriptProxyFactoryImpl implements JavascriptProxyFactory { +public class JSONRPCBindingJavascriptProxyFactory implements JavascriptProxyFactory { private static final QName NAME = JSONRPCBinding.TYPE; public Class getModelType() { diff --git a/modules/binding-jsonrpc-js-dojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory b/modules/binding-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory similarity index 83% rename from modules/binding-jsonrpc-js-dojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory rename to modules/binding-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory index 39af70d08f..231cd4085d 100644 --- a/modules/binding-jsonrpc-js-dojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory +++ b/modules/binding-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory @@ -5,15 +5,15 @@ # 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. +# under the License. # Implementation class for the Javascript Proxy Factory -org.apache.tuscany.sca.binding.jsonrpc.js.dojo.JSONRPCBindingJavascriptProxyFactoryImpl;qname=http://tuscany.apache.org/xmlns/sca/1.1#binding.jsonrpc,model=org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBinding \ No newline at end of file +org.apache.tuscany.sca.binding.jsonrpc.js.dojo.JSONRPCBindingJavascriptProxyFactory;qname=http://tuscany.apache.org/xmlns/sca/1.1#binding.jsonrpc,model=org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBinding \ No newline at end of file diff --git a/modules/binding-rest-js-dojo/LICENSE b/modules/binding-rest-js-dojo/LICENSE deleted file mode 100644 index 8aa906c321..0000000000 --- a/modules/binding-rest-js-dojo/LICENSE +++ /dev/null @@ -1,205 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed 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. - - - diff --git a/modules/binding-rest-js-dojo/META-INF/MANIFEST.MF b/modules/binding-rest-js-dojo/META-INF/MANIFEST.MF deleted file mode 100644 index d9fbf2b0a6..0000000000 --- a/modules/binding-rest-js-dojo/META-INF/MANIFEST.MF +++ /dev/null @@ -1,17 +0,0 @@ -Manifest-Version: 1.0 -SCA-Version: 1.1 -Bundle-Name: Apache Tuscany SCA REST Binding JavaScript using Dojo -Bundle-Vendor: The Apache Software Foundation -Bundle-Version: 2.0.0 -Bundle-ManifestVersion: 2 -Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt -Bundle-Description: Apache Tuscany SCA REST Binding JavaScript usi - ng Dojo -Import-Package: javax.xml.namespace, - org.apache.tuscany.sca.assembly;version="2.0.0", - org.apache.tuscany.sca.assembly.xml;version="2.0.0", - org.apache.tuscany.sca.binding.rest;version="2.0.0", - org.apache.tuscany.sca.web.javascript;version="2.0.0" -Bundle-SymbolicName: org.apache.tuscany.sca.binding.rest-js.dojo -Bundle-DocURL: http://www.apache.org/ - diff --git a/modules/binding-rest-js-dojo/NOTICE b/modules/binding-rest-js-dojo/NOTICE deleted file mode 100644 index d69e595698..0000000000 --- a/modules/binding-rest-js-dojo/NOTICE +++ /dev/null @@ -1,6 +0,0 @@ -${pom.name} -Copyright (c) 2005 - 2011 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - diff --git a/modules/binding-rest-js-dojo/pom.xml b/modules/binding-rest-js-dojo/pom.xml deleted file mode 100644 index e8dcac6dd9..0000000000 --- a/modules/binding-rest-js-dojo/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-modules - 2.0-SNAPSHOT - ../pom.xml - - - tuscany-binding-rest-js-dojo - Apache Tuscany SCA REST Feed Binding JavaScript using Dojo - - - - org.apache.tuscany.sca - tuscany-binding-rest - 2.0-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-web-javascript - 2.0-SNAPSHOT - - - - junit - junit - 4.8.1 - test - - - - diff --git a/modules/binding-rest-runtime/pom.xml b/modules/binding-rest-runtime/pom.xml index 9601c4ef05..fe30619242 100644 --- a/modules/binding-rest-runtime/pom.xml +++ b/modules/binding-rest-runtime/pom.xml @@ -97,6 +97,12 @@ 2.0-SNAPSHOT + + org.apache.tuscany.sca + tuscany-web-javascript + 2.0-SNAPSHOT + + javax.ws.rs jsr311-api @@ -115,15 +121,15 @@ com.sun.xml.bind jaxb-impl - + org.slf4j slf4j-api - + javax.activation activation - + @@ -139,18 +145,18 @@ com.sun.xml.bind jaxb-impl - + org.slf4j slf4j-api - + javax.activation activation - - + + - + org.slf4j slf4j-api @@ -164,7 +170,7 @@ 1.6.1 runtime - + javax.servlet servlet-api diff --git a/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/js/dojo/RESTBindingJavascriptProxyFactory.java b/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/js/dojo/RESTBindingJavascriptProxyFactory.java new file mode 100644 index 0000000000..68cd6fa0e3 --- /dev/null +++ b/modules/binding-rest-runtime/src/main/java/org/apache/tuscany/sca/binding/rest/js/dojo/RESTBindingJavascriptProxyFactory.java @@ -0,0 +1,77 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.binding.rest.js.dojo; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.assembly.Binding; +import org.apache.tuscany.sca.assembly.ComponentReference; +import org.apache.tuscany.sca.assembly.Endpoint; +import org.apache.tuscany.sca.assembly.EndpointReference; +import org.apache.tuscany.sca.binding.rest.RESTBinding; +import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; +import org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory; + +public class RESTBindingJavascriptProxyFactory implements JavascriptProxyFactory { + private static final QName NAME = RESTBinding.TYPE; + + public Class getModelType() { + return RESTBinding.class; + } + + public QName getQName() { + return NAME; + } + + public String getJavascriptProxyFile() { + return null; + } + + public InputStream getJavascriptProxyFileAsStream() throws IOException { + return null; + } + + public String createJavascriptHeader(ComponentReference componentReference) throws IOException { + return "dojo.require('tuscany.RestService');"; + } + + public String createJavascriptReference(ComponentReference componentReference) throws IOException { + EndpointReference epr = componentReference.getEndpointReferences().get(0); + Endpoint targetEndpoint = epr.getTargetEndpoint(); + if (targetEndpoint.isUnresolved()) { + //force resolution and targetEndpoint binding calculations + //by calling the getInvocationChain + ((RuntimeEndpointReference) epr).getInvocationChains(); + targetEndpoint = epr.getTargetEndpoint(); + } + + Binding binding = targetEndpoint.getBinding(); + + URI targetURI = URI.create(binding.getURI()); + String targetPath = targetURI.getPath(); + + return "tuscany.RestService(\"" + targetPath + "\")"; + } + +} diff --git a/modules/binding-rest-js-dojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory b/modules/binding-rest-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory similarity index 84% rename from modules/binding-rest-js-dojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory rename to modules/binding-rest-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory index 36093d7bfa..4d81632bda 100644 --- a/modules/binding-rest-js-dojo/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory +++ b/modules/binding-rest-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory @@ -5,15 +5,15 @@ # 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. +# under the License. # Implementation class for the Javascript Proxy Factory -org.apache.tuscany.sca.binding.rest.js.dojo.RESTBindingJavascriptProxyFactoryImpl;qname=http://tuscany.apache.org/xmlns/sca/1.1#binding.rest,model=org.apache.tuscany.sca.binding.rest.RESTBinding \ No newline at end of file +org.apache.tuscany.sca.binding.rest.js.dojo.RESTBindingJavascriptProxyFactory;qname=http://tuscany.apache.org/xmlns/sca/1.1#binding.rest,model=org.apache.tuscany.sca.binding.rest.RESTBinding \ No newline at end of file diff --git a/modules/pom.xml b/modules/pom.xml index a6a2c55d10..8fad9a1168 100644 --- a/modules/pom.xml +++ b/modules/pom.xml @@ -34,7 +34,6 @@ assembly-xml assembly-xsd binding-atom - binding-atom-js-dojo binding-atom-runtime binding-comet binding-comet-runtime @@ -47,10 +46,8 @@ binding-jsonp binding-jsonp-runtime binding-jsonrpc - binding-jsonrpc-js-dojo binding-jsonrpc-runtime binding-rest - binding-rest-js-dojo binding-rest-runtime binding-rmi binding-rmi-runtime diff --git a/samples/applications/store-webapp/pom.xml b/samples/applications/store-webapp/pom.xml index a5c999bafa..36c4bb06ea 100644 --- a/samples/applications/store-webapp/pom.xml +++ b/samples/applications/store-webapp/pom.xml @@ -47,11 +47,6 @@ tuscany-binding-atom-runtime 2.0-SNAPSHOT - - org.apache.tuscany.sca - tuscany-binding-atom-js-dojo - 2.0-SNAPSHOT - org.apache.tuscany.sca tuscany-binding-http-runtime @@ -62,11 +57,6 @@ tuscany-binding-jsonrpc-runtime 2.0-SNAPSHOT - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-js-dojo - 2.0-SNAPSHOT - org.apache.tuscany.sca tuscany-implementation-widget-runtime diff --git a/samples/applications/store/pom.xml b/samples/applications/store/pom.xml index 7917a84aeb..2cc9c7c5e6 100644 --- a/samples/applications/store/pom.xml +++ b/samples/applications/store/pom.xml @@ -45,11 +45,6 @@ tuscany-binding-atom-runtime 2.0-SNAPSHOT - - org.apache.tuscany.sca - tuscany-binding-atom-js-dojo - 2.0-SNAPSHOT - org.apache.tuscany.sca tuscany-binding-http-runtime @@ -60,11 +55,6 @@ tuscany-binding-jsonrpc-runtime 2.0-SNAPSHOT - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-js-dojo - 2.0-SNAPSHOT - org.apache.tuscany.sca tuscany-implementation-widget-runtime From 75214d9037ed79ffdcb1aa3b37fd050f407486c1 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sun, 6 Feb 2011 20:40:52 +0000 Subject: [PATCH 139/157] Udate jline version and javadoc correction git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067751 13f79535-47bb-0310-9956-ffa450edef68 --- maven/maven-tuscany-plugin/pom.xml | 2 +- .../java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/maven/maven-tuscany-plugin/pom.xml b/maven/maven-tuscany-plugin/pom.xml index 45d571d437..e83004ed0d 100644 --- a/maven/maven-tuscany-plugin/pom.xml +++ b/maven/maven-tuscany-plugin/pom.xml @@ -62,7 +62,7 @@ jline jline - 0.9.94 + 0.9.95-huynhjl diff --git a/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java b/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java index 1a9545e551..da1e715bec 100644 --- a/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java +++ b/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java @@ -30,7 +30,7 @@ /** * Maven Mojo to run the Tuscany Shell * - * Invoked with mvn org.apache.tuscany.maven.plugin:maven-tuscany-plugins:shell [-Ddomain=uri:myDomain] -Dcontributions=path\to\scacontribution,... + * Invoked with mvn org.apache.tuscany.maven.plugin:maven-tuscany-plugins:shell [-Ddomain=uri:myDomain] [-Dcontributions=path\to\scacontribution,...] * * @goal shell * @requiresProject false From d25875c6504a8aa41a6d50468174530c1c10eea3 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Sun, 6 Feb 2011 20:41:19 +0000 Subject: [PATCH 140/157] Udate jline version git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067753 13f79535-47bb-0310-9956-ffa450edef68 --- modules/shell/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/shell/pom.xml b/modules/shell/pom.xml index a72a7977ab..d2466e3475 100644 --- a/modules/shell/pom.xml +++ b/modules/shell/pom.xml @@ -47,7 +47,7 @@ jline jline - 0.9.94 + 0.9.95-huynhjl true From 5e5e849a3cebca11487a43080c1e910ab4c35527 Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Sun, 6 Feb 2011 20:48:53 +0000 Subject: [PATCH 141/157] Removing dojo specific repository, and relying on maven central git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067755 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pom.xml b/pom.xml index 5c25e0a63f..d02d89e9e3 100644 --- a/pom.xml +++ b/pom.xml @@ -74,17 +74,6 @@ false - - maven.org - Maven.org - http://repo2.maven.org/maven2/ - - true - - - false - - From 4fc993cba6744414b74f07efd59c5ecf46d7c2bc Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Mon, 7 Feb 2011 08:13:10 +0000 Subject: [PATCH 142/157] README edits git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067875 13f79535-47bb-0310-9956-ffa450edef68 --- .../helloworld-contribution/README | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/samples/getting-started/helloworld-contribution/README b/samples/getting-started/helloworld-contribution/README index 34c4b3a788..bab77d3885 100644 --- a/samples/getting-started/helloworld-contribution/README +++ b/samples/getting-started/helloworld-contribution/README @@ -5,32 +5,38 @@ This sample demonstrates a simple helloworld style SCA application and how to ru See the README in the top-level samples folder for general information on the Tuscany samples. -This project creates a jar format SCA contribution which has a deployable SCA composite. The composite -defines a single component named "HelloworldComponent" which implements a Helloworld service which -is implemented by a Java class. A JUnit testcase tests running the composite and invoking the service. +This project creates a jar format SCA contribution with a deployable composite, helloworld.comosite. +The composite defines an SCA component, HelloworldComponent, which provides a Helloworld service, +the component is implemented by a Java class. -You can use the contribution built in the Tuscany Shell - at the root of a Tuscany binary distribution -run the following command: +You can use the contribution by installing it and starting the composite in the Tuscany Shell. To do +that run the following command in the helloworld-contribution folder: - bin\tuscany.bat samples\getting-started\helloworld-contribution + mvn tuscany:run + +Alternatively, the Tuscany Shell can be started with the scripts in the Tuscany binary distribution +bin folder. To do that run the following command at the root of a Tuscany binary distribution: -You may then call the helloworld service with the shell command: + bin\tuscany.bat samples\getting-started\helloworld-contribution - invoke HelloworldComponent sayHello "your name" +Once the Shell has been started with one of those methods you can use Shell commands to explore +the SCA domain, for example, use the "installed" command to get the status of installed contributions, +"services" to see the available component services. You may test calling the helloworld service by +using the "invoke" command: + invoke HelloworldComponent sayHello yourName --- This sample was created by the Tuscany contribution-jar Maven archetype. You can use that archetype to -create you own SCA contribution projects by running the following maven command: +create your own SCA contribution projects by running the following Maven command: mvn archetype:generate -DarchetypeCatalog=http://tuscany.apache.org -at the prompt select 1 to choose the contribution-jar archetype and then answer the questions. This project -used the following answers: +then at the prompt select 1 to choose the contribution-jar archetype and then answer the questions. +This project used the following answers: Define value for property 'groupId': : org.apache.tuscany.sca.samples Define value for property 'artifactId': : helloworld-contribution Define value for property 'version': 1.0-SNAPSHOT: 2.0-SNAPSHOT Define value for property 'package': org.apache.tuscany.sca.samples: sample - From d90d9ba5806125cde06cacc042fea3f6a3d12d86 Mon Sep 17 00:00:00 2001 From: Florian Moga Date: Mon, 7 Feb 2011 11:30:54 +0000 Subject: [PATCH 143/157] Fixed paths for implementation-composite samples. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067920 13f79535-47bb-0310-9956-ffa450edef68 --- .../implementation-composite/helloworld-recursive-ws/pom.xml | 4 ++-- .../implementation-composite/helloworld-recursive/pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/learning-more/implementation-composite/helloworld-recursive-ws/pom.xml b/samples/learning-more/implementation-composite/helloworld-recursive-ws/pom.xml index e6ec9557ac..5b59323ee9 100644 --- a/samples/learning-more/implementation-composite/helloworld-recursive-ws/pom.xml +++ b/samples/learning-more/implementation-composite/helloworld-recursive-ws/pom.xml @@ -71,8 +71,8 @@ - ..\helloworld-recursive\target\sample-helloworld-recursive.jar - ..\..\..\getting-started\helloworld\target\helloworld-contribution.jar + ../helloworld-recursive/target/sample-implementation-composite-helloworld-contribution.zip + ../../../getting-started/helloworld-contribution/target/helloworld-contribution.jar diff --git a/samples/learning-more/implementation-composite/helloworld-recursive/pom.xml b/samples/learning-more/implementation-composite/helloworld-recursive/pom.xml index d802f9a0e4..164d31f300 100644 --- a/samples/learning-more/implementation-composite/helloworld-recursive/pom.xml +++ b/samples/learning-more/implementation-composite/helloworld-recursive/pom.xml @@ -66,7 +66,7 @@ - ..\helloworld\target\sample-helloworld.jar + ../../../getting-started/helloworld-contribution/target/helloworld-contribution.jar From 1bda5e04630cbdbdc49f8fcf1fe0295d64eac720 Mon Sep 17 00:00:00 2001 From: Florian Moga Date: Mon, 7 Feb 2011 11:51:00 +0000 Subject: [PATCH 144/157] Fixed path issue with scdl-include-contribution sample. git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1067923 13f79535-47bb-0310-9956-ffa450edef68 --- samples/getting-started/scdl-include-contribution/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/getting-started/scdl-include-contribution/pom.xml b/samples/getting-started/scdl-include-contribution/pom.xml index 7f30c84149..3dfd4da55d 100644 --- a/samples/getting-started/scdl-include-contribution/pom.xml +++ b/samples/getting-started/scdl-include-contribution/pom.xml @@ -66,7 +66,7 @@ - ..\helloworld-contribution\target\sample-helloworld-contribution.jar + ../helloworld-contribution/target/helloworld-contribution.jar From ad28d32391c269bd48331d258d38e7dcf89a7afc Mon Sep 17 00:00:00 2001 From: Zhaohui Feng Date: Mon, 7 Feb 2011 23:07:58 +0000 Subject: [PATCH 145/157] Enable the allowsPassByReference support git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1068209 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/assembly/Reference.java | 11 ++++++++++- .../sca/assembly/impl/ReferenceImpl.java | 9 +++++++++ .../RuntimeSCAReferenceBindingProvider.java | 6 ++++-- .../sca/builder/impl/ComponentBuilderImpl.java | 5 ++--- .../invocation/JavaImplementationInvoker.java | 10 ++++++++-- .../introspect/impl/ReferenceProcessor.java | 17 +++++++++++++---- .../interfaces/RemoteClientComponentImpl.java | 1 + .../itest/interfaces/InterfacesTestCase.java | 6 +++--- 8 files changed, 50 insertions(+), 15 deletions(-) diff --git a/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Reference.java b/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Reference.java index 2ee3e774e4..db677bdabb 100644 --- a/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Reference.java +++ b/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Reference.java @@ -67,5 +67,14 @@ public interface Reference extends AbstractReference, Contract { * @return the endpoint references implied by this reference */ List getEndpointReferences(); - + + /** + * Indicate if the reference allows pass by reference for remotable operations + */ + boolean isAllowsPassByReference(); + + /** + * @param allowsPassByReference the allowsPassByReference to set + */ + void setAllowsPassByReference(boolean allowsPassByReference); } diff --git a/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java b/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java index 69d76f238d..f0c884797c 100644 --- a/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java +++ b/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java @@ -41,6 +41,7 @@ public class ReferenceImpl extends AbstractReferenceImpl implements Reference, C private List targets = new ArrayList(); private Callback callback; private boolean overridingBindings; + private boolean allowsPassByReference; private List endpointReferences = new ArrayList(); /** @@ -132,4 +133,12 @@ public boolean isOverridingBindings() { public void setOverridingBindings(boolean overridingBindings) { this.overridingBindings = overridingBindings; } + + public boolean isAllowsPassByReference() { + return allowsPassByReference; + } + + public void setAllowsPassByReference(boolean allowsPassByReference) { + this.allowsPassByReference = allowsPassByReference; + } } diff --git a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java index 6bda9f0c2d..3d159fcae7 100644 --- a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java +++ b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java @@ -20,6 +20,7 @@ package org.apache.tuscany.sca.binding.sca.provider; import org.apache.tuscany.sca.assembly.Endpoint; +import org.apache.tuscany.sca.assembly.Reference; import org.apache.tuscany.sca.assembly.SCABinding; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.UtilityExtensionPoint; @@ -144,8 +145,9 @@ private Invoker getInvoker(RuntimeEndpointReference epr, Operation operation) { passByValue = false; } } else { -// boolean allowsPBR = chain.allowsPassByReference(); TODO: TUSCANY-3479 this breaks the conformance tests as it needs to consider _both_ ends - boolean allowsPBR = false; + Reference ref = epr.getReference().getReference(); + boolean allowsPBR = (ref != null && ref.isAllowsPassByReference()) || chain.allowsPassByReference(); + if (allowsPBR && interfaceContractMapper.isCompatibleByReference(operation, targetOp, Compatibility.SUBSET)) { diff --git a/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java b/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java index 1a5051dd95..c32968fd87 100644 --- a/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java +++ b/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentBuilderImpl.java @@ -18,7 +18,6 @@ */ package org.apache.tuscany.sca.builder.impl; -import java.io.IOException; import java.io.InputStream; import java.io.StringReader; import java.net.URI; @@ -77,11 +76,9 @@ import org.apache.tuscany.sca.interfacedef.Compatibility; import org.apache.tuscany.sca.interfacedef.DataType; import org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException; -import org.apache.tuscany.sca.interfacedef.Interface; import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl; -import org.apache.tuscany.sca.interfacedef.java.JavaInterface; import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract; import org.apache.tuscany.sca.interfacedef.util.XMLType; import org.apache.tuscany.sca.monitor.Monitor; @@ -1236,6 +1233,8 @@ private void createCallbackReference(Component component, ComponentService servi } catch (CloneNotSupportedException e) { // will not happen } + // FIXME: We need to set the allowsPassByReference flag based on the annotations on the implementation and callback + // implReference.setAllowsPassByReference(allowsPassByReference); callbackReference.setReference(implReference); } component.getReferences().add(callbackReference); diff --git a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java index 67bbe32c27..0b97192cc6 100644 --- a/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java +++ b/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java @@ -40,6 +40,7 @@ import org.apache.tuscany.sca.interfacedef.ParameterMode; import org.apache.tuscany.sca.interfacedef.java.JavaInterface; import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil; +import org.apache.tuscany.sca.invocation.DataExchangeSemantics; import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.runtime.RuntimeComponent; @@ -52,7 +53,7 @@ * * @version $Rev$ $Date$ */ -public class JavaImplementationInvoker implements Invoker { +public class JavaImplementationInvoker implements Invoker, DataExchangeSemantics { protected Operation operation; protected Method method; protected boolean allowsPBR; @@ -272,6 +273,11 @@ private void injectCallbacks(ReflectiveInstanceWrapper wrapper, } } - } + } + + @Override + public boolean allowsPassByReference() { + return allowsPBR; + } } diff --git a/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ReferenceProcessor.java b/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ReferenceProcessor.java index b5c3806166..225099758d 100644 --- a/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ReferenceProcessor.java +++ b/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ReferenceProcessor.java @@ -43,6 +43,7 @@ import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract; import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; import org.oasisopen.sca.ServiceReference; +import org.oasisopen.sca.annotation.AllowsPassByReference; import org.oasisopen.sca.annotation.Reference; /** @@ -88,7 +89,7 @@ public void visitMethod(Method method, JavaImplementation type) throws Introspec removeReference(ref, type); JavaElementImpl element = new JavaElementImpl(method, 0); - org.apache.tuscany.sca.assembly.Reference reference = createReference(element, name); + org.apache.tuscany.sca.assembly.Reference reference = createReference(type, element, name); type.getReferences().add(reference); type.getReferenceMembers().put(name, element); } @@ -128,7 +129,7 @@ public void visitField(Field field, JavaImplementation type) throws Introspectio // Setter method override field if (ref == null) { JavaElementImpl element = new JavaElementImpl(field); - org.apache.tuscany.sca.assembly.Reference reference = createReference(element, name); + org.apache.tuscany.sca.assembly.Reference reference = createReference(type, element, name); type.getReferences().add(reference); type.getReferenceMembers().put(name, element); } @@ -160,7 +161,7 @@ public void visitConstructorParameter(JavaParameterImpl parameter, JavaImplement } removeReference(ref, type); - org.apache.tuscany.sca.assembly.Reference reference = createReference(parameter, name); + org.apache.tuscany.sca.assembly.Reference reference = createReference(type, parameter, name); type.getReferences().add(reference); type.getReferenceMembers().put(name, parameter); parameter.setClassifer(Reference.class); @@ -169,16 +170,24 @@ public void visitConstructorParameter(JavaParameterImpl parameter, JavaImplement /** * Create a SCA reference for a java Element + * @param implementation TODO * @param element * @param name * @return * @throws IntrospectionException */ - private org.apache.tuscany.sca.assembly.Reference createReference(JavaElementImpl element, String name) + private org.apache.tuscany.sca.assembly.Reference createReference(JavaImplementation implementation, JavaElementImpl element, String name) throws IntrospectionException { org.apache.tuscany.sca.assembly.Reference reference = assemblyFactory.createReference(); JavaInterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract(); reference.setInterfaceContract(interfaceContract); + + AllowsPassByReference pbr = element.getAnnotation(AllowsPassByReference.class); + if (pbr != null) { + reference.setAllowsPassByReference(true); + } else { + reference.setAllowsPassByReference(implementation.isAllowsPassByReference()); + } // reference.setMember((Member)element.getAnchor()); boolean required = true; diff --git a/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java b/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java index 541b1f1508..efeb6f91fe 100644 --- a/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java +++ b/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java @@ -27,6 +27,7 @@ public class RemoteClientComponentImpl implements RemoteClientComponent, RemoteCallbackInterface { @Reference + @AllowsPassByReference protected RemoteServiceComponent aCallBackService; private static String callbackValue; private static String onewayValue; diff --git a/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java b/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java index d04351f51e..3936600cb7 100644 --- a/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java +++ b/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java @@ -105,9 +105,9 @@ public void testRemoteClient() { assertEquals("BBComponent1", remote.foo2(1, "B")); // TODO: TUSCANY-3479, investigate Node/SCAClient pass by reference -// // Test allowsPassByReference -// assertEquals("BComponent", remote.foo3(po)); -// assertEquals("BComponent", po.field1); + // Test allowsPassByReference + assertEquals("BComponent", remote.foo3(po)); + assertEquals("BComponent", po.field1); } catch (Exception e) { e.printStackTrace(); fail(); From 612b443e60a6820ad2ab2be6f6751cb91e1d3a67 Mon Sep 17 00:00:00 2001 From: Zhaohui Feng Date: Mon, 7 Feb 2011 23:08:54 +0000 Subject: [PATCH 146/157] Upgrade to jackson 1.7.1 release git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1068210 13f79535-47bb-0310-9956-ffa450edef68 --- distribution/all/src/main/release/bin/LICENSE | 6 +++--- .../sca/binding/jsonrpc/provider/JSONRPCBindingInvoker.java | 4 ++-- modules/databinding-json/pom.xml | 6 +++--- .../tuscany/sca/databinding/json/jackson/JacksonHelper.java | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/distribution/all/src/main/release/bin/LICENSE b/distribution/all/src/main/release/bin/LICENSE index e934b46560..b1c8b31b54 100644 --- a/distribution/all/src/main/release/bin/LICENSE +++ b/distribution/all/src/main/release/bin/LICENSE @@ -267,9 +267,9 @@ The following components come under Apache Software License 2.0 httpclient-4.0.3.jar httpcore-4.0.1.jar jabsorb-1.3.1.jar - jackson-core-asl-1.6.3.jar - jackson-mapper-asl-1.6.3.jar - jackson-xc-1.6.3.jar + jackson-core-asl-1.7.1.jar + jackson-mapper-asl-1.7.1.jar + jackson-xc-1.7.1.jar jettison-1.2.jar jetty-6.1.19.jar jetty-util-6.1.19.jar diff --git a/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCBindingInvoker.java b/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCBindingInvoker.java index b58fbb9f53..526283c8fa 100644 --- a/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCBindingInvoker.java +++ b/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCBindingInvoker.java @@ -210,8 +210,8 @@ public static ObjectMapper createObjectMapper(Class cls) { // Ignore } if (xmlAdapter != null) { - XmlAdapterJsonDeserializer deserializer = new XmlAdapterJsonDeserializer(xmlAdapter); - XmlAdapterJsonSerializer serializer = new XmlAdapterJsonSerializer(xmlAdapter); + XmlAdapterJsonDeserializer deserializer = new XmlAdapterJsonDeserializer(xmlAdapter, null); + XmlAdapterJsonSerializer serializer = new XmlAdapterJsonSerializer(xmlAdapter, null); deserializerFactory.addSpecificMapping(a.type(), deserializer); serializerFactory.addGenericMapping(a.type(), serializer); StdDeserializerProvider deserializerProvider = diff --git a/modules/databinding-json/pom.xml b/modules/databinding-json/pom.xml index 793307bff3..1dc52e661d 100644 --- a/modules/databinding-json/pom.xml +++ b/modules/databinding-json/pom.xml @@ -40,17 +40,17 @@ org.codehaus.jackson jackson-core-asl - 1.6.3 + 1.7.1 org.codehaus.jackson jackson-mapper-asl - 1.6.3 + 1.7.1 org.codehaus.jackson jackson-xc - 1.6.3 + 1.7.1 diff --git a/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java b/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java index 459462fa97..e684378c6e 100644 --- a/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java +++ b/modules/databinding-json/src/main/java/org/apache/tuscany/sca/databinding/json/jackson/JacksonHelper.java @@ -77,8 +77,8 @@ public static ObjectMapper createObjectMapper(Class cls) { // Ignore } if (xmlAdapter != null) { - XmlAdapterJsonDeserializer deserializer = new XmlAdapterJsonDeserializer(xmlAdapter); - XmlAdapterJsonSerializer serializer = new XmlAdapterJsonSerializer(xmlAdapter); + XmlAdapterJsonDeserializer deserializer = new XmlAdapterJsonDeserializer(xmlAdapter, null); + XmlAdapterJsonSerializer serializer = new XmlAdapterJsonSerializer(xmlAdapter, null); deserializerFactory.addSpecificMapping(a.type(), deserializer); serializerFactory.addGenericMapping(a.type(), serializer); StdDeserializerProvider deserializerProvider = From abc3ef214c702df5d6fd586992c09765cefe3690 Mon Sep 17 00:00:00 2001 From: Zhaohui Feng Date: Mon, 7 Feb 2011 23:09:03 +0000 Subject: [PATCH 147/157] Finalize the AllowsPassByReference support and add test cases git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1068211 13f79535-47bb-0310-9956-ffa450edef68 --- .../RuntimeSCAReferenceBindingProvider.java | 3 +- .../itest/interfaces/InterfacesTestCase.java | 5 +- .../itest/allowspassbyreference/AService.java | 56 ++++++++++++ .../allowspassbyreference/AServiceClient.java | 55 ++++++++++++ .../allowspassbyreference/ClientImplA.java | 87 ++++++++++++++++++ .../allowspassbyreference/ClientImplB.java | 90 +++++++++++++++++++ .../allowspassbyreference/MutableObject.java | 77 ++++++++++++++++ .../allowspassbyreference/ServiceImplA.java | 61 +++++++++++++ .../allowspassbyreference/ServiceImplB.java | 70 +++++++++++++++ .../main/resources/AllowsPBRTest.composite | 50 +++++++++++ .../itest/references/AllowsPBRTestCase.java | 77 ++++++++++++++++ 11 files changed, 627 insertions(+), 4 deletions(-) create mode 100644 testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AService.java create mode 100644 testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AServiceClient.java create mode 100644 testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplA.java create mode 100644 testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplB.java create mode 100644 testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/MutableObject.java create mode 100644 testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplA.java create mode 100644 testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplB.java create mode 100644 testing/itest/references/src/main/resources/AllowsPBRTest.composite create mode 100644 testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AllowsPBRTestCase.java diff --git a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java index 3d159fcae7..36ae886b46 100644 --- a/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java +++ b/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java @@ -146,7 +146,8 @@ private Invoker getInvoker(RuntimeEndpointReference epr, Operation operation) { } } else { Reference ref = epr.getReference().getReference(); - boolean allowsPBR = (ref != null && ref.isAllowsPassByReference()) || chain.allowsPassByReference(); + // The spec says both ref and service needs to allowsPassByReference + boolean allowsPBR = (ref != null && ref.isAllowsPassByReference()) && chain.allowsPassByReference(); if (allowsPBR && interfaceContractMapper.isCompatibleByReference(operation, targetOp, diff --git a/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java b/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java index 3936600cb7..1bc047092a 100644 --- a/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java +++ b/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java @@ -31,7 +31,6 @@ import org.junit.BeforeClass; import org.junit.Test; -// @Ignore("TUSCANY-3138") public class InterfacesTestCase { private static final String PKG = "org/apache/tuscany/sca/itest/interfaces/valid"; private static String ROOT = new File("target/classes/" + PKG).toURI().toString(); @@ -106,8 +105,8 @@ public void testRemoteClient() { // TODO: TUSCANY-3479, investigate Node/SCAClient pass by reference // Test allowsPassByReference - assertEquals("BComponent", remote.foo3(po)); - assertEquals("BComponent", po.field1); +// assertEquals("BComponent", remote.foo3(po)); +// assertEquals("BComponent", po.field1); } catch (Exception e) { e.printStackTrace(); fail(); diff --git a/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AService.java b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AService.java new file mode 100644 index 0000000000..cecb2d83dd --- /dev/null +++ b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AService.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.allowspassbyreference; + +import org.oasisopen.sca.annotation.Remotable; + +/** + * The service interface + */ +@Remotable +public interface AService { + /** + * Create a new object + * @param req + * @return + */ + MutableObject create(MutableObject req); + + /** + * + * @param req + * @return + */ + MutableObject read(MutableObject req); + + /** + * + * @param req + * @return + */ + MutableObject update(MutableObject req); + + /** + * + * @param req + * @return + */ + MutableObject delete(MutableObject req); +} diff --git a/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AServiceClient.java b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AServiceClient.java new file mode 100644 index 0000000000..2c746fcbb2 --- /dev/null +++ b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AServiceClient.java @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.allowspassbyreference; + + +/** + * The client interface + */ +public interface AServiceClient { + /** + * Create a new object with the given state + * @param state + * @return the id + */ + int create(String state); + + /** + * Read the object state by id + * @param id + * @return + */ + String read(int id); + + /** + * Update the state + * @param id + * @param newState + * @return + */ + String update(int id, String newState); + + /** + * Delete the object by id + * @param id + * @return + */ + boolean delete(int id); +} diff --git a/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplA.java b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplA.java new file mode 100644 index 0000000000..59c3768964 --- /dev/null +++ b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplA.java @@ -0,0 +1,87 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.allowspassbyreference; + +import junit.framework.Assert; + +import org.oasisopen.sca.annotation.ComponentName; +import org.oasisopen.sca.annotation.Reference; +import org.oasisopen.sca.annotation.Scope; +import org.oasisopen.sca.annotation.Service; + +/** + * + */ +@Service(AServiceClient.class) +@Scope("COMPOSITE") +public class ClientImplA implements AServiceClient { + @ComponentName + private String componentName; + + @Reference + private AService service; + + @Override + public int create(String state) { + MutableObject req = new MutableObject(state); + MutableObject res = service.create(req); + if ("ClientA1Component".equals(componentName)) { + Assert.assertTrue(req.getId() == -1); + Assert.assertNotSame(req, res); + } else if ("ClientA2Component".equals(componentName)) { + Assert.assertTrue(req.getId() == -1); + Assert.assertNotSame(req, res); + } + return res.getId(); + } + + @Override + public String read(int id) { + MutableObject req = new MutableObject(id); + MutableObject res = service.read(req); + if ("ClientA1Component".equals(componentName)) { + Assert.assertTrue(req.getState() == null); + Assert.assertNotSame(req, res); + } else if ("ClientA2Component".equals(componentName)) { + Assert.assertTrue(req.getState() == null); + } + return res.getState(); + } + + @Override + public String update(int id, String newState) { + MutableObject req = new MutableObject(id, newState); + MutableObject res = service.update(req); + if ("ClientA1Component".equals(componentName)) { + Assert.assertTrue(req.getState() == newState); + } else if ("ClientA2Component".equals(componentName)) { + Assert.assertTrue(req.getState() == newState); + } + return res.getState(); + } + + @Override + public boolean delete(int id) { + MutableObject req = new MutableObject(id); + MutableObject res = service.delete(req); + return res != null; + } + +} diff --git a/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplB.java b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplB.java new file mode 100644 index 0000000000..01b2c5d946 --- /dev/null +++ b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplB.java @@ -0,0 +1,90 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.allowspassbyreference; + +import junit.framework.Assert; + +import org.oasisopen.sca.annotation.AllowsPassByReference; +import org.oasisopen.sca.annotation.ComponentName; +import org.oasisopen.sca.annotation.Reference; +import org.oasisopen.sca.annotation.Scope; +import org.oasisopen.sca.annotation.Service; + +/** + * + */ +@Service(AServiceClient.class) +@Scope("COMPOSITE") +public class ClientImplB implements AServiceClient { + @ComponentName + private String componentName; + + @Reference + @AllowsPassByReference + private AService service; + + @Override + public int create(String state) { + MutableObject req = new MutableObject(state); + MutableObject res = service.create(req); + if ("ClientB1Component".equals(componentName)) { + Assert.assertTrue(req.getId() == -1); + Assert.assertNotSame(req, res); + } else if ("ClientB2Component".equals(componentName)) { + // Both sides allow PBR, so the id is changed (for the purpose of checking if PBR is used) + Assert.assertTrue(req.getId() != -1); + } + return res.getId(); + } + + @Override + public String read(int id) { + MutableObject req = new MutableObject(id); + MutableObject res = service.read(req); + if ("ClientB1Component".equals(componentName)) { + Assert.assertTrue("READ".equals(req.getState())); + Assert.assertNotSame(req, res); + } else if ("ClientB2Component".equals(componentName)) { + Assert.assertTrue("READ".equals(req.getState())); + } + return res.getState(); + } + + @Override + public String update(int id, String newState) { + MutableObject req = new MutableObject(id, newState); + MutableObject res = service.update(req); + if ("ClientB1Component".equals(componentName)) { + Assert.assertTrue(req.getState() == newState); + Assert.assertNotSame(req, res); + } else if ("ClientB2Component".equals(componentName)) { + Assert.assertTrue(req.getState() == newState); + } + return res.getState(); + } + + @Override + public boolean delete(int id) { + MutableObject req = new MutableObject(id); + MutableObject res = service.delete(req); + return res != null; + } + +} diff --git a/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/MutableObject.java b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/MutableObject.java new file mode 100644 index 0000000000..6fc28e36b2 --- /dev/null +++ b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/MutableObject.java @@ -0,0 +1,77 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.allowspassbyreference; + +/** + * A mutable object + */ +public class MutableObject implements Cloneable { + private int id = -1; + private String state; + + public MutableObject() { + } + + public MutableObject(int id, String state) { + super(); + this.id = id; + this.state = state; + } + + public MutableObject(String state) { + super(); + this.state = state; + } + + public MutableObject(int id) { + super(); + this.id = id; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public MutableObject clone() { + MutableObject copy = new MutableObject(); + copy.id = id; + copy.state = state; + return copy; + } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("MutableObject [id=").append(id).append(", state=").append(state).append("]"); + return builder.toString(); + } +} diff --git a/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplA.java b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplA.java new file mode 100644 index 0000000000..43a9e71f44 --- /dev/null +++ b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplA.java @@ -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 org.apache.tuscany.sca.itest.allowspassbyreference; + +import java.util.HashMap; +import java.util.Map; + +import org.oasisopen.sca.annotation.AllowsPassByReference; +import org.oasisopen.sca.annotation.Scope; + +/** + * + */ +@Scope("COMPOSITE") +public class ServiceImplA implements AService { + private volatile int count = 0; + private Map objects = new HashMap(); + + @Override + public MutableObject create(MutableObject req) { + req.setId(count++); + objects.put(req.getId(), req); + return req; + } + + @AllowsPassByReference + public MutableObject read(MutableObject req) { + // Change the state of the request so that the client side can verify if PBR is used + req.setState("READ"); + return objects.get(req.getId()); + } + + @Override + public MutableObject update(MutableObject req) { + objects.put(req.getId(), req); + return req; + } + + @Override + public MutableObject delete(MutableObject req) { + return objects.remove(req.getId()); + } + +} diff --git a/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplB.java b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplB.java new file mode 100644 index 0000000000..a0ad7746d7 --- /dev/null +++ b/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplB.java @@ -0,0 +1,70 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.allowspassbyreference; + +import java.util.HashMap; +import java.util.Map; + +import org.oasisopen.sca.annotation.AllowsPassByReference; +import org.oasisopen.sca.annotation.Scope; + +/** + * + */ +@AllowsPassByReference +@Scope("COMPOSITE") +public class ServiceImplB implements AService { + + private volatile int count = 0; + private Map objects = new HashMap(); + + @Override + public MutableObject create(MutableObject req) { + // Change the id of the request so that the client side can verify if PBR is used + req.setId(count++); + req = req.clone(); + objects.put(req.getId(), req); + return req; + } + + @Override + public MutableObject read(MutableObject req) { + // Change the state of the request so that the client side can verify if PBR is used + req.setState("READ"); + return objects.get(req.getId()).clone(); + } + + @Override + public MutableObject update(MutableObject req) { + req = req.clone(); + objects.put(req.getId(), req); + return req; + } + + @Override + public MutableObject delete(MutableObject req) { + MutableObject obj = objects.remove(req.getId()); + if (obj != null) { + return obj.clone(); + } + return obj; + } + +} diff --git a/testing/itest/references/src/main/resources/AllowsPBRTest.composite b/testing/itest/references/src/main/resources/AllowsPBRTest.composite new file mode 100644 index 0000000000..98ebddafc0 --- /dev/null +++ b/testing/itest/references/src/main/resources/AllowsPBRTest.composite @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AllowsPBRTestCase.java b/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AllowsPBRTestCase.java new file mode 100644 index 0000000000..adabc65a25 --- /dev/null +++ b/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AllowsPBRTestCase.java @@ -0,0 +1,77 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.references; + +import junit.framework.Assert; + +import org.apache.tuscany.sca.itest.allowspassbyreference.AServiceClient; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.ContributionLocationHelper; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +public class AllowsPBRTestCase { + private static Node node; + + @BeforeClass + public static void init() throws Exception { + String location = ContributionLocationHelper.getContributionLocation("AllowsPBRTest.composite"); + node = NodeFactory.newInstance().createNode("AllowsPBRTest.composite", new Contribution("c1", location)); + node.start(); + } + + @AfterClass + public static void destroy() throws Exception { + node.stop(); + } + + @Test + public void testClientA1() { + test("ClientA1Component"); + } + + @Test + public void testClientA2() { + test("ClientA2Component"); + } + + @Test + public void testClientB1() { + test("ClientB1Component"); + } + + @Test + public void testClientB2() { + test("ClientB2Component"); + } + + private void test(String serviceName) { + AServiceClient client = node.getService(AServiceClient.class, serviceName); + int id = client.create("A"); + String state = client.read(id); + Assert.assertEquals("A", state); + state = client.update(id, "B"); + Assert.assertEquals("B", state); + client.delete(id); + } + +} From a5c5993a319c700a506ca453f39e5ffa754950ff Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Tue, 8 Feb 2011 11:34:37 +0000 Subject: [PATCH 148/157] More quiet logging updates git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1068340 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java | 5 ++++- .../main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java b/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java index 4b8c071855..3f66f85283 100644 --- a/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java +++ b/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java @@ -100,6 +100,8 @@ public class NodeFactoryImpl extends NodeFactory { */ protected boolean autoDestroy = true; + protected boolean quietLogging; + @Override public Node createNode(NodeConfiguration configuration) { if (configuration.getURI() == null) { @@ -243,6 +245,7 @@ public synchronized void init() { monitorFactory = utilities.getUtility(MonitorFactory.class); utilities.getUtility(RuntimeProperties.class).setProperties(properties); + quietLogging = Boolean.parseBoolean(properties.getProperty(RuntimeProperties.QUIET_LOGGING)); // Use the runtime-enabled assembly factory FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); @@ -339,7 +342,7 @@ protected List loadContributions(NodeConfiguration configuration, URL contributionURL = uri.toURL(); // Load the contribution - logger.log(Level.INFO, "Loading contribution: " + contributionURL); + logger.log(quietLogging? Level.FINE : Level.INFO, "Loading contribution: " + contributionURL); Contribution contribution = deployer.loadContribution(contributionURI, contributionURL, context.getMonitor()); contributions.add(contribution); diff --git a/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java index 3abecec043..8197c1b9b4 100644 --- a/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java +++ b/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java @@ -98,7 +98,7 @@ public String getURI() { } public Node start() { - logger.log(Level.INFO, "Starting node: " + configuration.getURI() + " domain: " + configuration.getDomainURI()); + logger.log(nodeFactory.quietLogging? Level.FINE : Level.INFO, "Starting node: " + configuration.getURI() + " domain: " + configuration.getDomainURI()); nodeFactory.init(); nodeFactory.addNode(configuration, this); @@ -172,7 +172,7 @@ public Node start() { } public void stop() { - logger.log(Level.INFO, "Stopping node: " + configuration.getURI()); + logger.log(nodeFactory.quietLogging? Level.FINE : Level.INFO, "Stopping node: " + configuration.getURI()); try { if (compositeActivator == null) { From 76d0c86e99b54ce89b9c344effa142cf8b4832cf Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Tue, 8 Feb 2011 20:03:59 +0000 Subject: [PATCH 149/157] More quiet logging changes, update use of properties to not interfere with registry config git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1068545 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java | 2 +- .../sca/binding/hazelcast/HazelcastBindingTestCase.java | 2 ++ .../src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java | 2 -- .../src/main/java/org/apache/tuscany/sca/node/NodeFactory.java | 2 -- .../org/apache/tuscany/sca/node/impl/NodeImplTestCase.java | 3 +-- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java index d1d0fb2b29..43ee78b985 100644 --- a/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java +++ b/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java @@ -37,7 +37,7 @@ public class ExtensibleDomainRegistryFactory implements DomainRegistryFactory { private final DomainRegistryFactoryExtensionPoint factories; private String[] allSchemes; - private String defaultScheme = "tuscany"; + private String defaultScheme = "vm"; public ExtensibleDomainRegistryFactory(ExtensionPointRegistry registry) { this.factories = registry.getExtensionPoint(DomainRegistryFactoryExtensionPoint.class); diff --git a/modules/domain-hazelcast/src/test/java/org/apache/tuscany/sca/binding/hazelcast/HazelcastBindingTestCase.java b/modules/domain-hazelcast/src/test/java/org/apache/tuscany/sca/binding/hazelcast/HazelcastBindingTestCase.java index 18831eafac..1cc857e7a4 100644 --- a/modules/domain-hazelcast/src/test/java/org/apache/tuscany/sca/binding/hazelcast/HazelcastBindingTestCase.java +++ b/modules/domain-hazelcast/src/test/java/org/apache/tuscany/sca/binding/hazelcast/HazelcastBindingTestCase.java @@ -27,9 +27,11 @@ import org.apache.tuscany.sca.node.NodeFactory; import org.junit.AfterClass; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; import org.oasisopen.sca.ServiceRuntimeException; +@Ignore public class HazelcastBindingTestCase { private static Node serviceNode; diff --git a/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java b/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java index 97e82809f5..cb26509b44 100644 --- a/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java +++ b/modules/domain-node/src/main/java/org/apache/tuscany/sca/TuscanyRuntime.java @@ -145,8 +145,6 @@ public void stop() { protected void init(Properties config) { if (config == null) { config = new Properties(); - config.setProperty("defaultScheme", "vm"); - config.setProperty("defaultDomainName", "default"); } this.extensionPointRegistry = new DefaultExtensionPointRegistry(); extensionPointRegistry.start(); diff --git a/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java b/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java index 86045b014e..10b49bae4a 100644 --- a/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java +++ b/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java @@ -203,8 +203,6 @@ public static NodeFactory newInstance(Map> attribute protected NodeFactory() { this.properties = new Properties(); - properties.setProperty("defaultScheme", "vm"); - properties.setProperty("defaultDomainName", "default"); } public static NodeFactory newInstance(Properties configProperties) { diff --git a/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java b/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java index 644b0e662b..af7b18207c 100644 --- a/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java +++ b/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java @@ -154,8 +154,7 @@ public void testNodeFactoryProperties() throws Exception { factory.init(); UtilityExtensionPoint utilities = factory.getExtensionPointRegistry().getExtensionPoint(UtilityExtensionPoint.class); Properties ps = utilities.getUtility(RuntimeProperties.class).getProperties(); - Assert.assertEquals(2, ps.size()); - Assert.assertEquals("vm", ps.getProperty("defaultScheme")); + Assert.assertEquals(0, ps.size()); Properties properties = new Properties(); properties.setProperty("defaultScheme", "vm"); From ea0f65ec58f365d45f351bdb2cedb2d5986b8612 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 9 Feb 2011 07:48:45 +0000 Subject: [PATCH 150/157] Add exclude for some surefire artifacts which seem to turn up on Hudson git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1068774 13f79535-47bb-0310-9956-ffa450edef68 --- distribution/all/src/main/components/bin-samples.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/distribution/all/src/main/components/bin-samples.xml b/distribution/all/src/main/components/bin-samples.xml index 0fc5ad36a8..c665417ab5 100644 --- a/distribution/all/src/main/components/bin-samples.xml +++ b/distribution/all/src/main/components/bin-samples.xml @@ -50,6 +50,8 @@ **/target/test-classes/**/* **/target/sdo-source **/target/sdo-source/**/* + **/target/surefire + **/target/surefire/**/* **/target/surefire-reports **/target/surefire-reports/**/* **/target/surefire-osgi-reports From cce645788a9af45730e302e3f0f1453e312d7505 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 9 Feb 2011 09:51:17 +0000 Subject: [PATCH 151/157] Add a -help arg so the help can be shown at startup git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1068815 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/tuscany/sca/shell/Shell.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java index 8353c9eb84..29d30f2acf 100644 --- a/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java +++ b/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java @@ -74,10 +74,13 @@ public static void main(final String[] args) throws Exception { boolean useJline = true; String domainURI = "default"; + boolean showHelp = false; String contribution = null; for (String s : args) { if ("-nojline".equals(s)) { useJline = false; + } else if ("-help".equals(s)) { + showHelp = true; } else { if (s.startsWith("uri:") || s.startsWith("properties:")) { domainURI = s; @@ -90,7 +93,9 @@ public static void main(final String[] args) throws Exception { if (contribution != null) { shell.install(Arrays.asList(new String[]{"install", contribution, "-start"})); } - shell.run(contribution==null); + + + shell.run(showHelp || contribution==null); } public Shell(String domainURI, boolean useJLine) { From 6bab5ca4f3bb43e687274c248f4f20727bd79cff Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 9 Feb 2011 09:51:54 +0000 Subject: [PATCH 152/157] Update to show command help at startup git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1068816 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java | 1 + .../java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java | 1 + 2 files changed, 2 insertions(+) diff --git a/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java b/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java index f9c697bc7c..ab2eefdf26 100644 --- a/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java +++ b/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java @@ -104,6 +104,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { addAdditionalContributions(contributionList); + contributionList.add(0, "-help"); contributionList.add(0, config); try { diff --git a/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java b/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java index da1e715bec..5002da79b3 100644 --- a/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java +++ b/maven/maven-tuscany-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java @@ -58,6 +58,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { while (st.hasMoreTokens()) { cs.add(st.nextToken()); } + cs.add(0, "-help"); cs.add(0, domain); args = cs.toArray(new String[cs.size()]); } else { From 16e452bb9b90fd59eed821e3e63a4888916f82a8 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 9 Feb 2011 10:15:35 +0000 Subject: [PATCH 153/157] Fix another quiet logging bug and add the start of a test git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1068829 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/node/impl/NodeFactoryImpl.java | 3 ++- .../tuscany/sca/node/impl/NodeImplTestCase.java | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java b/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java index 3f66f85283..0ff1a87fe9 100644 --- a/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java +++ b/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java @@ -100,7 +100,7 @@ public class NodeFactoryImpl extends NodeFactory { */ protected boolean autoDestroy = true; - protected boolean quietLogging; + boolean quietLogging; @Override public Node createNode(NodeConfiguration configuration) { @@ -460,6 +460,7 @@ public void configure(Map> attributes) { discovery.setAttribute(serviceType, attribute, properties.getProperty(p)); } } + quietLogging = Boolean.parseBoolean(properties.getProperty(RuntimeProperties.QUIET_LOGGING)); super.configure(attributes); } diff --git a/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java b/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java index af7b18207c..2bcab39d68 100644 --- a/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java +++ b/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java @@ -233,4 +233,17 @@ public void testAutoDestroy() throws Exception { Assert.assertTrue(((NodeFactoryImpl)nf).inited); } + + @Test + public void testQuietLogging() throws Exception { + Properties props = new Properties(); + props.setProperty(RuntimeProperties.QUIET_LOGGING, "true"); + NodeFactory nf = NodeFactory.newInstance(props); + Node node = nf.createNode(); + node.start(); + node.stop(); + // This doesn't actually check the logging yet, need to figure out a + // way to get the log output so for now has to be run manually + } + } From a17b18b094b8c5f3f0ea2189e0bd81b7c3491214 Mon Sep 17 00:00:00 2001 From: Anthony Elder Date: Wed, 9 Feb 2011 11:00:46 +0000 Subject: [PATCH 154/157] MOve the quiet logging test out to a separate test so it doesn't interfere with other test logging and update the test so that it actually verifies nothing is logged git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1068841 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/node/impl/NodeImplTestCase.java | 13 ---- .../sca/node/impl/QuietLoggingTestCase.java | 74 +++++++++++++++++++ 2 files changed, 74 insertions(+), 13 deletions(-) create mode 100644 modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/QuietLoggingTestCase.java diff --git a/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java b/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java index 2bcab39d68..af7b18207c 100644 --- a/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java +++ b/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java @@ -233,17 +233,4 @@ public void testAutoDestroy() throws Exception { Assert.assertTrue(((NodeFactoryImpl)nf).inited); } - - @Test - public void testQuietLogging() throws Exception { - Properties props = new Properties(); - props.setProperty(RuntimeProperties.QUIET_LOGGING, "true"); - NodeFactory nf = NodeFactory.newInstance(props); - Node node = nf.createNode(); - node.start(); - node.stop(); - // This doesn't actually check the logging yet, need to figure out a - // way to get the log output so for now has to be run manually - } - } diff --git a/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/QuietLoggingTestCase.java b/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/QuietLoggingTestCase.java new file mode 100644 index 0000000000..c18500886f --- /dev/null +++ b/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/QuietLoggingTestCase.java @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * \"License\"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.node.impl; + +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; +import java.util.logging.Handler; +import java.util.logging.LogManager; +import java.util.logging.LogRecord; +import java.util.logging.Logger; + +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.apache.tuscany.sca.runtime.RuntimeProperties; +import org.junit.Assert; +import org.junit.Test; + +/** + * Test case for NodeImpl + */ +public class QuietLoggingTestCase { + + @Test + public void testQuietLogging() throws Exception { + + final List logRecords = new ArrayList(); + LogManager logManager = LogManager.getLogManager(); + logManager.reset(); + Handler handler = new Handler() { + @Override + public void publish(LogRecord record) { + logRecords.add(record); + } + @Override + public void flush() { + } + @Override + public void close() throws SecurityException { + } + }; + Logger.getLogger("").addHandler(handler); + + Properties props = new Properties(); + props.setProperty(RuntimeProperties.QUIET_LOGGING, "true"); + NodeFactory nf = NodeFactory.newInstance(props); + Node node = nf.createNode(); + node.start(); + node.stop(); + + + // This doesn't actually check the logging yet, need to figure out a + // way to get the log output so for now has to be run manually + Assert.assertEquals(0 , logRecords.size()); + } + +} From 2fde2ae3c717b58ade4004cca821a026d1f96179 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Wed, 9 Feb 2011 18:20:24 +0000 Subject: [PATCH 155/157] Add ignores git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1069013 13f79535-47bb-0310-9956-ffa450edef68 From b48aacd463a73c673329fbdf8d3990e898adb016 Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Wed, 9 Feb 2011 18:25:21 +0000 Subject: [PATCH 156/157] TUSCANY-3834 - ensure that exceptions in @Destroy operations are handled and allow the top process to continue for other components git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1069015 13f79535-47bb-0310-9956-ffa450edef68 --- .../assembly/impl/CompositeActivatorImpl.java | 66 ++++--- .../scope/impl/CompositeScopeContainer.java | 2 + .../itest/java-lifecycle-exceptions/pom.xml | 48 ++++++ .../main/java/itest/ConstructorException.java | 49 ++++++ .../itest/DestroyCompositeScopeException.java | 58 +++++++ .../itest/InitCompositeScopeException.java | 57 +++++++ .../itest/InitStatelessScopeException.java | 57 +++++++ .../src/main/java/itest/OkImpl.java | 52 ++++++ .../src/main/java/itest/Service.java | 26 +++ .../src/main/resources/test.composite | 49 ++++++ .../src/test/java/itest/InitTestCase.java | 161 ++++++++++++++++++ testing/itest/pom.xml | 7 +- 12 files changed, 609 insertions(+), 23 deletions(-) create mode 100644 testing/itest/java-lifecycle-exceptions/pom.xml create mode 100644 testing/itest/java-lifecycle-exceptions/src/main/java/itest/ConstructorException.java create mode 100644 testing/itest/java-lifecycle-exceptions/src/main/java/itest/DestroyCompositeScopeException.java create mode 100644 testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitCompositeScopeException.java create mode 100644 testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitStatelessScopeException.java create mode 100644 testing/itest/java-lifecycle-exceptions/src/main/java/itest/OkImpl.java create mode 100644 testing/itest/java-lifecycle-exceptions/src/main/java/itest/Service.java create mode 100644 testing/itest/java-lifecycle-exceptions/src/main/resources/test.composite create mode 100644 testing/itest/java-lifecycle-exceptions/src/test/java/itest/InitTestCase.java diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java index 6ec740ae20..3604f81ec4 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java @@ -479,16 +479,24 @@ public void stop(CompositeContext compositeContext, Component component) { } else { final ImplementationProvider implementationProvider = ((RuntimeComponent)component).getImplementationProvider(); if (implementationProvider != null) { - // Allow bindings to read properties. Requires PropertyPermission read in security policy. - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - implementationProvider.stop(); - return null; - } - }); + try { + // Allow bindings to read properties. Requires PropertyPermission read in security policy. + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + implementationProvider.stop(); + return null; + } + }); + } catch (Throwable ex){ + logger.log(Level.SEVERE, ex.getMessage(), ex); + } } for (PolicyProvider policyProvider : ((RuntimeComponent)component).getPolicyProviders()) { - policyProvider.stop(); + try { + policyProvider.stop(); + } catch (Throwable ex){ + logger.log(Level.SEVERE, ex.getMessage(), ex); + } } } @@ -496,7 +504,11 @@ public Object run() { ScopedRuntimeComponent runtimeComponent = (ScopedRuntimeComponent)component; if (runtimeComponent.getScopeContainer() != null && runtimeComponent.getScopeContainer().getLifecycleState() != ScopeContainer.STOPPED) { - runtimeComponent.getScopeContainer().stop(); + try { + runtimeComponent.getScopeContainer().stop(); + } catch (Throwable ex){ + logger.log(Level.SEVERE, ex.getMessage(), ex); + } } } @@ -549,16 +561,24 @@ public void stop(RuntimeEndpoint ep) { ep.getCompositeContext().getEndpointRegistry().removeEndpoint(ep); final ServiceBindingProvider bindingProvider = ep.getBindingProvider(); if (bindingProvider != null) { - // Allow bindings to read properties. Requires PropertyPermission read in security policy. - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - bindingProvider.stop(); - return null; - } - }); + try { + // Allow bindings to read properties. Requires PropertyPermission read in security policy. + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + bindingProvider.stop(); + return null; + } + }); + } catch (Throwable ex){ + logger.log(Level.SEVERE, ex.getMessage(), ex); + } } for (PolicyProvider policyProvider : ep.getPolicyProviders()) { - policyProvider.stop(); + try { + policyProvider.stop(); + } catch (Throwable ex){ + logger.log(Level.SEVERE, ex.getMessage(), ex); + } } } @@ -622,10 +642,18 @@ public void stop(RuntimeEndpointReference epr) { compositeContext.getEndpointRegistry().removeEndpointReference(epr); ReferenceBindingProvider bindingProvider = epr.getBindingProvider(); if (bindingProvider != null) { - bindingProvider.stop(); + try { + bindingProvider.stop(); + } catch (Throwable ex){ + logger.log(Level.SEVERE, ex.getMessage(), ex); + } } for (PolicyProvider policyProvider : epr.getPolicyProviders()) { - policyProvider.stop(); + try { + policyProvider.stop(); + } catch (Throwable ex){ + logger.log(Level.SEVERE, ex.getMessage(), ex); + } } } } diff --git a/modules/core/src/main/java/org/apache/tuscany/sca/core/scope/impl/CompositeScopeContainer.java b/modules/core/src/main/java/org/apache/tuscany/sca/core/scope/impl/CompositeScopeContainer.java index 730f92e0f9..efe7c94b54 100644 --- a/modules/core/src/main/java/org/apache/tuscany/sca/core/scope/impl/CompositeScopeContainer.java +++ b/modules/core/src/main/java/org/apache/tuscany/sca/core/scope/impl/CompositeScopeContainer.java @@ -46,6 +46,7 @@ public synchronized void stop() { try { wrapper.stop(); } catch (TargetDestructionException e) { + wrapper = null; throw new IllegalStateException(e); } } @@ -59,6 +60,7 @@ public synchronized InstanceWrapper getWrapper(KEY contextId) throws TargetResol wrapper = createInstanceWrapper(); wrapper.start(); } catch (Exception e) { + wrapper = null; throw new ServiceUnavailableException(e); } } diff --git a/testing/itest/java-lifecycle-exceptions/pom.xml b/testing/itest/java-lifecycle-exceptions/pom.xml new file mode 100644 index 0000000000..dc159db56e --- /dev/null +++ b/testing/itest/java-lifecycle-exceptions/pom.xml @@ -0,0 +1,48 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 2.0-SNAPSHOT + ../pom.xml + + itest-java-lifecycle-exceptions + Apache Tuscany SCA iTest Java Lifecycle Exceptions + + + + + org.apache.tuscany.sca + tuscany-base-runtime-pom + pom + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 2.0-SNAPSHOT + + + + + diff --git a/testing/itest/java-lifecycle-exceptions/src/main/java/itest/ConstructorException.java b/testing/itest/java-lifecycle-exceptions/src/main/java/itest/ConstructorException.java new file mode 100644 index 0000000000..bae0bdcd0f --- /dev/null +++ b/testing/itest/java-lifecycle-exceptions/src/main/java/itest/ConstructorException.java @@ -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. + */ + +package itest; + +import org.oasisopen.sca.annotation.Destroy; +import org.oasisopen.sca.annotation.Init; + +public class ConstructorException implements Service { + + public static boolean initRun; + public static boolean destroyRun; + public static boolean doitRun; + + public ConstructorException() { + throw new RuntimeException(); + } + + public void doit() { + doitRun = true; + } + + @Init + public void init() { + initRun = true; + } + + @Destroy + public void destroy() { + destroyRun = true; + } + +} diff --git a/testing/itest/java-lifecycle-exceptions/src/main/java/itest/DestroyCompositeScopeException.java b/testing/itest/java-lifecycle-exceptions/src/main/java/itest/DestroyCompositeScopeException.java new file mode 100644 index 0000000000..b5d463a1aa --- /dev/null +++ b/testing/itest/java-lifecycle-exceptions/src/main/java/itest/DestroyCompositeScopeException.java @@ -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 itest; + +import org.oasisopen.sca.annotation.Destroy; +import org.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.Scope; + +@Scope("COMPOSITE") +public class DestroyCompositeScopeException implements Service { + + public static boolean initRun; + public static boolean destroyRun; + public static boolean doitRun; + public static int count = 0; + + public void doit() { + doitRun = true; + if (!initRun) { + throw new RuntimeException("initRun false"); + } + if (destroyRun) { + throw new RuntimeException("destroyRun true"); + } + } + + @Init + public void init() { + initRun = true; + } + + @Destroy + public void destroy() { + destroyRun = true; + if (count++ < 1) { + throw new NullPointerException(); + // throw new RuntimeException("bang"); + } + } + +} diff --git a/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitCompositeScopeException.java b/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitCompositeScopeException.java new file mode 100644 index 0000000000..58aeb96c3c --- /dev/null +++ b/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitCompositeScopeException.java @@ -0,0 +1,57 @@ +/* + * 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 itest; + +import org.oasisopen.sca.annotation.Destroy; +import org.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.Scope; + +@Scope("COMPOSITE") +public class InitCompositeScopeException implements Service { + + public static boolean initRun; + public static boolean destroyRun; + public static boolean doitRun; + public static int count = 0; + + public void doit() { + doitRun = true; + if (!initRun) { + throw new RuntimeException("initRun false"); + } + if (destroyRun) { + throw new RuntimeException("destroyRun true"); + } + } + + @Init + public void init() { + initRun = true; + if (count++ < 1) { + throw new RuntimeException("bang"); + } + } + + @Destroy + public void destroy() { + destroyRun = true; + } + +} diff --git a/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitStatelessScopeException.java b/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitStatelessScopeException.java new file mode 100644 index 0000000000..a976f805a0 --- /dev/null +++ b/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitStatelessScopeException.java @@ -0,0 +1,57 @@ +/* + * 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 itest; + +import org.oasisopen.sca.annotation.Destroy; +import org.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.Scope; + +@Scope("STATELESS") +public class InitStatelessScopeException implements Service { + + public static boolean initRun; + public static boolean destroyRun; + public static boolean doitRun; + public static int count = 0; + + public void doit() { + doitRun = true; + if (!initRun) { + throw new RuntimeException("initRun false"); + } + if (destroyRun) { + throw new RuntimeException("destroyRun true"); + } + } + + @Init + public void init() { + initRun = true; + if (count++ < 1) { + throw new RuntimeException("bang"); + } + } + + @Destroy + public void destroy() { + destroyRun = true; + } + +} diff --git a/testing/itest/java-lifecycle-exceptions/src/main/java/itest/OkImpl.java b/testing/itest/java-lifecycle-exceptions/src/main/java/itest/OkImpl.java new file mode 100644 index 0000000000..823b771923 --- /dev/null +++ b/testing/itest/java-lifecycle-exceptions/src/main/java/itest/OkImpl.java @@ -0,0 +1,52 @@ +/* + * 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 itest; + +import org.oasisopen.sca.annotation.Destroy; +import org.oasisopen.sca.annotation.Init; + +public class OkImpl implements Service { + + public static boolean initRun; + public static boolean destroyRun; + + public OkImpl() { + } + + public void doit() { + if (!initRun) { + throw new RuntimeException("initRun false"); + } + if (destroyRun) { + throw new RuntimeException("destroyRun true"); + } + } + + @Init + public void init() { + initRun = true; + } + + @Destroy + public void destroy() { + destroyRun = true; + } + +} diff --git a/testing/itest/java-lifecycle-exceptions/src/main/java/itest/Service.java b/testing/itest/java-lifecycle-exceptions/src/main/java/itest/Service.java new file mode 100644 index 0000000000..f6f292c4c8 --- /dev/null +++ b/testing/itest/java-lifecycle-exceptions/src/main/java/itest/Service.java @@ -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 itest; + +public interface Service { + + void doit(); + +} diff --git a/testing/itest/java-lifecycle-exceptions/src/main/resources/test.composite b/testing/itest/java-lifecycle-exceptions/src/main/resources/test.composite new file mode 100644 index 0000000000..fa93989fa0 --- /dev/null +++ b/testing/itest/java-lifecycle-exceptions/src/main/resources/test.composite @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testing/itest/java-lifecycle-exceptions/src/test/java/itest/InitTestCase.java b/testing/itest/java-lifecycle-exceptions/src/test/java/itest/InitTestCase.java new file mode 100644 index 0000000000..afb6b5fad8 --- /dev/null +++ b/testing/itest/java-lifecycle-exceptions/src/test/java/itest/InitTestCase.java @@ -0,0 +1,161 @@ +/* + * 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 itest; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import junit.framework.Assert; + +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** + */ +public class InitTestCase { + + private Node node; + + @Before + public void init() { + node = NodeFactory.newInstance().createNode("test.composite", new Contribution("test", "target/classes")); + node.start(); + } + + @Test + public void testOk() throws Exception { + Service client1 = node.getService(Service.class, "OkService"); + client1.doit(); + assertTrue(OkImpl.initRun); + assertTrue(OkImpl.destroyRun); // its stateless so destory is called after every service invocations + } + + @Test + public void testConstructorException() throws Exception { + Service client1 = node.getService(Service.class, "ConstructorException"); + try { + client1.doit(); + fail(); + } catch (RuntimeException e) { + // expected + } + assertFalse(ConstructorException.initRun); + assertFalse(ConstructorException.doitRun); + assertFalse(ConstructorException.destroyRun); + } + + @Test + public void testInitCompositeScopeException() throws Exception { + Service client1 = node.getService(Service.class, "InitCompositeScopeException"); + try { + client1.doit(); + fail(); + } catch (RuntimeException e) { + // expected + } + assertTrue(InitCompositeScopeException.initRun); + assertFalse(InitCompositeScopeException.doitRun); + assertTrue(InitCompositeScopeException.destroyRun); + + // reset and try again to verify init init still gets run again + InitCompositeScopeException.initRun = false; + InitCompositeScopeException.doitRun = false; + InitCompositeScopeException.destroyRun = false; + + client1.doit(); + + assertTrue(InitCompositeScopeException.initRun); + assertTrue(InitCompositeScopeException.doitRun); + node.stop(); + node = null; + assertTrue(InitCompositeScopeException.destroyRun); + } + + @Test + public void testInitStatelessScopeException() throws Exception { + Service client1 = node.getService(Service.class, "InitStatelessScopeException"); + try { + client1.doit(); + fail(); + } catch (RuntimeException e) { + // expected + } + assertTrue(InitStatelessScopeException.initRun); + assertFalse(InitStatelessScopeException.doitRun); + assertTrue(InitStatelessScopeException.destroyRun); + + // reset and try again to verify init init still gets run again + InitStatelessScopeException.initRun = false; + InitStatelessScopeException.doitRun = false; + InitStatelessScopeException.destroyRun = false; + + client1.doit(); + + assertTrue(InitStatelessScopeException.initRun); + assertTrue(InitStatelessScopeException.doitRun); + node.stop(); + node = null; + assertTrue(InitStatelessScopeException.destroyRun); + } + + @Test + public void testDestroyCompositeScopeException() throws Exception { + Service client1 = node.getService(Service.class, "DestroyCompositeScopeException"); + try { + client1.doit(); + } catch (RuntimeException e) { + fail(); + } + assertTrue(DestroyCompositeScopeException.initRun); + assertTrue(DestroyCompositeScopeException.doitRun); + assertFalse(DestroyCompositeScopeException.destroyRun); + + Service client2 = node.getService(Service.class, "DestroyCompositeScopeException2"); + try { + client2.doit(); + } catch (RuntimeException e) { + fail(); + } + + // close the domain to case @Destroy to run + try { + node.stop(); + } catch (RuntimeException e) { + e.printStackTrace(); + fail(); + } + node = null; + + // check that it has run twice + // The first run having caused an exception + assertTrue(DestroyCompositeScopeException.destroyRun); + Assert.assertEquals(2, DestroyCompositeScopeException.count); + } + + @After + public void end() { + if (node != null) { + node.stop(); + } + } +} diff --git a/testing/itest/pom.xml b/testing/itest/pom.xml index 537b53e389..8f09a010db 100644 --- a/testing/itest/pom.xml +++ b/testing/itest/pom.xml @@ -46,21 +46,19 @@ callback-basic callback-complex-type callback-multiple-wires - callback-separatethread + callback-separatethread callback-two-composites callback-two-nodes component-type contribution-folder contribution-zip - databindings distribution exceptions implementation-spring import-export interfaces + java-lifecycle-exceptions jms nodes node-launcher-equinox @@ -86,6 +84,7 @@ scdl services service-reference + spi wires ws ws-jaxws From 38b341d78501a541533800ab8095df58914264da Mon Sep 17 00:00:00 2001 From: Simon Laws Date: Wed, 9 Feb 2011 18:27:29 +0000 Subject: [PATCH 157/157] Didn't mean to enable the spi test in the previous check in. Also update the safe spi file to include Raymond's APBR changes git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1069018 13f79535-47bb-0310-9956-ffa450edef68 --- testing/itest/pom.xml | 2 ++ testing/itest/spi/spi-safe.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/testing/itest/pom.xml b/testing/itest/pom.xml index 8f09a010db..7d163678fa 100644 --- a/testing/itest/pom.xml +++ b/testing/itest/pom.xml @@ -84,7 +84,9 @@ scdl services service-reference + wires ws ws-jaxws diff --git a/testing/itest/spi/spi-safe.txt b/testing/itest/spi/spi-safe.txt index 64798e33ac..219627cc82 100644 --- a/testing/itest/spi/spi-safe.txt +++ b/testing/itest/spi/spi-safe.txt @@ -312,6 +312,8 @@ public interface org.apache.tuscany.sca.assembly.Reference extends org.apache.tu public abstract void setWiredByImpl(boolean); public abstract java.util.List getTargets(); public abstract java.util.List getEndpointReferences(); + public abstract boolean isAllowsPassByReference(); + public abstract void setAllowsPassByReference(boolean); } Compiled from "SCABinding.java"