diff options
Diffstat (limited to '')
9 files changed, 54 insertions, 29 deletions
diff --git a/branches/sca-java-1.x/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties b/branches/sca-java-1.x/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties index f0d5b0a201..6fd524716c 100644 --- a/branches/sca-java-1.x/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties +++ b/branches/sca-java-1.x/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties @@ -25,7 +25,6 @@ UnexpectedImplementationElement = Unexpected <implementation> element found. It PolicyImplValidationException = PolicyValidation exception when processing implementation of component {0} due to {1}. PolicyServiceValidationException = PolicyValidation exceptions when processing service/reference {0} in {1}. Error is {2} ContributionReadException = ContributionReadException occured due to : {0} -ContributionResolveException = ContributionResolveException occured due to : {0} ContributionWriteException = ContributionWriteException occured due to : {0} XMLStreamException = XMLStreamException occured due to : {0} HttpServerError = HTTP Server Error : {0} diff --git a/branches/sca-java-1.x/modules/assembly-xsd/src/main/resources/sca-implementation-jee.xsd b/branches/sca-java-1.x/modules/assembly-xsd/src/main/resources/sca-implementation-jee.xsd index 83e6bb75bf..a5a6220d83 100644 --- a/branches/sca-java-1.x/modules/assembly-xsd/src/main/resources/sca-implementation-jee.xsd +++ b/branches/sca-java-1.x/modules/assembly-xsd/src/main/resources/sca-implementation-jee.xsd @@ -1,23 +1,23 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!-- (c) Copyright SCA Collaboration 2006 -->
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
- elementFormDefault="qualified">
-
- <include schemaLocation="sca-core.xsd"/>
-
- <element name="implementation.jee" type="sca:JEEImplementation" substitutionGroup="sca:implementation" />
- <complexType name="JEEImplementation">
- <complexContent>
- <extension base="sca:Implementation">
- <sequence>
- <any namespace="##other" processContents="lax" minOccurs="0"
- maxOccurs="unbounded" />
- </sequence>
- <attribute name="archive" type="string" use="required" />
- <anyAttribute namespace="##any" processContents="lax" />
- </extension>
- </complexContent>
- </complexType>
+<?xml version="1.0" encoding="UTF-8"?> +<!-- (c) Copyright SCA Collaboration 2006 --> +<schema xmlns="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://www.osoa.org/xmlns/sca/1.0" + xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" + elementFormDefault="qualified"> + + <include schemaLocation="sca-core.xsd"/> + + <element name="implementation.jee" type="sca:JEEImplementation" substitutionGroup="sca:implementation" /> + <complexType name="JEEImplementation"> + <complexContent> + <extension base="sca:Implementation"> + <sequence> + <any namespace="##other" processContents="lax" minOccurs="0" + maxOccurs="unbounded" /> + </sequence> + <attribute name="archive" type="string" use="required" /> + <anyAttribute namespace="##any" processContents="lax" /> + </extension> + </complexContent> + </complexType> </schema>
\ No newline at end of file diff --git a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ConfiguredOperation.java b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ConfiguredOperation.java index 1cf94ff527..70e873ecf0 100644 --- a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ConfiguredOperation.java +++ b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ConfiguredOperation.java @@ -62,7 +62,6 @@ public interface ConfiguredOperation extends Base, Cloneable, PolicySetAttachPoi * @param contractName the name of the contract to which this operation belongs
*/
void setContractName(String contractName);
-
/**
* Sets a list of policy sets.
diff --git a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java index 1158356012..5e984c3126 100644 --- a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java +++ b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java @@ -792,6 +792,19 @@ public abstract class BaseConfigurationBuilderImpl { * @param service */ private ComponentReference createCallbackReference(Component component, ComponentService service) { + return createCallbackReference(component, service, assemblyFactory); + } + + /** + * Create a callback reference for a component service + * + * @param component + * @param service + * @param assemblyFactory + */ + protected static ComponentReference createCallbackReference(Component component, + ComponentService service, + AssemblyFactory assemblyFactory) { ComponentReference componentReference = assemblyFactory.createComponentReference(); componentReference.setIsCallback(true); componentReference.setName(service.getName()); diff --git a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java index d73286f7ab..ce3f817acf 100644 --- a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java +++ b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java @@ -21,6 +21,7 @@ package org.apache.tuscany.sca.assembly.builder.impl; 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.CompositeService; @@ -83,6 +84,11 @@ public class ComponentServicePromotionBuilderImpl implements CompositeBuilder { newComponentService.setCallback(assemblyFactory.createCallback()); newComponentService.getCallback().getBindings() .addAll(componentService.getCallback().getBindings()); + ComponentReference callbackReference = + BaseConfigurationBuilderImpl.createCallbackReference(promotedComponent, newComponentService, + assemblyFactory); + callbackReference.getBindings().addAll(componentService.getCallback().getBindings()); + newComponentService.setCallbackReference(callbackReference); } // Change the composite service to now promote the diff --git a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java index ea0e88ac24..38cbaf7744 100644 --- a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java +++ b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java @@ -21,6 +21,7 @@ package org.apache.tuscany.sca.assembly.builder.impl; 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.CompositeService; @@ -64,6 +65,11 @@ public class CompositeServicePromotionBuilderImpl implements CompositeBuilder { newComponentService.setCallback(assemblyFactory.createCallback()); newComponentService.getCallback().getBindings() .addAll(compositeService.getCallback().getBindings()); + ComponentReference callbackReference = + BaseConfigurationBuilderImpl.createCallbackReference(promotedComponent, newComponentService, + assemblyFactory); + callbackReference.getBindings().addAll(compositeService.getCallback().getBindings()); + newComponentService.setCallbackReference(callbackReference); } // Change the composite service to now promote the newly diff --git a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PolicyConfigurationUtil.java b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PolicyConfigurationUtil.java index 5f4f42bb15..9adfaa2c56 100644 --- a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PolicyConfigurationUtil.java +++ b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/PolicyConfigurationUtil.java @@ -574,14 +574,15 @@ abstract class PolicyConfigurationUtil { // Create a new target configured operation and copy everything from the source
// except the intents and policy sets (which must be computed below).
try {
- targetConfOp = (ConfiguredOperation)sourceConfOp.clone();
+ targetConfOp = (ConfiguredOperation) sourceConfOp.clone();
targetConfOp.setRequiredIntents(new ArrayList<Intent>());
targetConfOp.setPolicySets(new ArrayList<PolicySet>());
} catch (CloneNotSupportedException e) {
// will not happen
- }
+ }
}
+
List<Intent> prunedIntents =
computeInheritableIntents(attachPoint.getType(), sourceConfOp.getRequiredIntents());
PolicyComputationUtils.addInheritedIntents(prunedIntents, targetConfOp.getRequiredIntents());
diff --git a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConfiguredOperationImpl.java b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConfiguredOperationImpl.java index 6d8f986051..ca88e39750 100644 --- a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConfiguredOperationImpl.java +++ b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConfiguredOperationImpl.java @@ -88,7 +88,8 @@ public class ConfiguredOperationImpl extends BaseImpl implements ConfiguredOpera public List<PolicySet> getApplicablePolicySets() {
return applicablePolicySets;
}
-
+
+ @Override
public Object clone() throws CloneNotSupportedException {
// Note this is a shallow copy.
return super.clone();
diff --git a/branches/sca-java-1.x/modules/assembly/src/main/resources/assembly-validation-messages.properties b/branches/sca-java-1.x/modules/assembly/src/main/resources/assembly-validation-messages.properties index 6aeda18aab..e827f7e78a 100644 --- a/branches/sca-java-1.x/modules/assembly/src/main/resources/assembly-validation-messages.properties +++ b/branches/sca-java-1.x/modules/assembly/src/main/resources/assembly-validation-messages.properties @@ -55,8 +55,8 @@ WireSourceNotFound = Wire source not found : {0} WireIncompatibleInterface = Incompatible interfaces on wire source and target : source = {0} target = {1} ComponentIncompatibleInterface = Incompatible interfaces on component reference and target : reference = {0} target = {1} TooManyReferenceTargets = Too many targets on reference: {0} -ReferenceInterfaceNotSubSet = Interface of composite reference {0} must be compatible with the interface declared by promoted component reference. -ServiceInterfaceNotSubSet = Interface of composite service {0} must be subset of the interface declared by promoted component service. +ReferenceInterfaceNotSubSet = Interface of composite reference must be compatible with the interface declared by promoted component reference {0} +ServiceInterfaceNotSubSet = Interface of composite service must be a subset of the interface declared by promoted component service {0} NoComponentReferenceTarget = No target services found for the component reference to be autowired: {0} NoTypeForComponentProperty = No type specified on component property: Component = {0} Property = {1} URLSyntaxException = URLSyntaxException when creating binding URI at component = {0} service = {1} binding = {2}
\ No newline at end of file |