summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java15
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java47
-rw-r--r--sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Constants.java3
-rw-r--r--sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java11
-rw-r--r--sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java13
-rw-r--r--sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/BaseStAXArtifactProcessor.java39
-rw-r--r--sca-java-2.x/trunk/modules/implementation-osgi/src/test/java/org/apache/tuscany/sca/implementation/osgi/xml/OSGiReadImplTestCase.java34
-rw-r--r--sca-java-2.x/trunk/modules/implementation-osgi/src/test/resources/OSGI-INF/sca/bundle.componentType31
-rw-r--r--sca-java-2.x/trunk/modules/node-impl-osgi/src/test/resources/calculator/dosgi/bundle.componentType31
-rw-r--r--sca-java-2.x/trunk/modules/node-impl-osgi/src/test/resources/calculator/dosgi/operations/bundle.componentType25
-rw-r--r--sca-java-2.x/trunk/samples/dosgi-calculator-operations/OSGI-INF/sca/bundle.componentType25
-rw-r--r--sca-java-2.x/trunk/samples/dosgi-calculator/OSGI-INF/sca/bundle.componentType30
12 files changed, 209 insertions, 95 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java
index a878054d99..b402b6e3a3 100644
--- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java
+++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java
@@ -38,6 +38,8 @@ import static org.apache.tuscany.sca.assembly.xml.Constants.REFERENCE_QNAME;
import static org.apache.tuscany.sca.assembly.xml.Constants.SERVICE;
import static org.apache.tuscany.sca.assembly.xml.Constants.SERVICE_QNAME;
import static org.apache.tuscany.sca.assembly.xml.Constants.TYPE;
+import static org.apache.tuscany.sca.assembly.xml.Constants.EXTENSION;
+import static org.apache.tuscany.sca.assembly.xml.Constants.EXTENSION_QNAME;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
@@ -166,7 +168,12 @@ public class ComponentTypeProcessor extends BaseAssemblyProcessor implements StA
} else {
policyProcessor.readPolicies(contract, operation, reader);
}
+ } else if(EXTENSION_QNAME.equals(name)) {
+ // Handle <extension>
+ //ignore element as this is a wrapper for extensibility
+ break;
} else {
+
// Read an extension element
Object extension = extensionProcessor.read(reader, context);
@@ -267,9 +274,7 @@ public class ComponentTypeProcessor extends BaseAssemblyProcessor implements StA
writeEnd(writer);
}
- for (Object extension: service.getExtensions()) {
- extensionProcessor.write(extension, writer, context);
- }
+ this.writeExtendedElements(writer, service, extensionProcessor, context);
writeEnd(writer);
}
@@ -304,9 +309,7 @@ public class ComponentTypeProcessor extends BaseAssemblyProcessor implements StA
writeEnd(writer);
}
- for (Object extension: reference.getExtensions()) {
- extensionProcessor.write(extension, writer, context);
- }
+ this.writeExtendedElements(writer, reference, extensionProcessor, context);
writeEnd(writer);
}
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
index 68791e2caa..885fde0612 100644
--- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
+++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
@@ -59,6 +59,8 @@ import static org.apache.tuscany.sca.assembly.xml.Constants.URI;
import static org.apache.tuscany.sca.assembly.xml.Constants.WIRE;
import static org.apache.tuscany.sca.assembly.xml.Constants.WIRED_BY_IMPL;
import static org.apache.tuscany.sca.assembly.xml.Constants.WIRE_QNAME;
+import static org.apache.tuscany.sca.assembly.xml.Constants.EXTENSION;
+import static org.apache.tuscany.sca.assembly.xml.Constants.EXTENSION_QNAME;
import java.util.ArrayList;
import java.util.List;
@@ -217,8 +219,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
componentService.setName(getString(reader, NAME));
//handle extension attributes
- this
- .readExtendedAttributes(reader, name, componentService, extensionAttributeProcessor, context);
+ this.readExtendedAttributes(reader, name, componentService, extensionAttributeProcessor, context);
component.getServices().add(componentService);
policyProcessor.readPolicies(contract, reader);
@@ -254,8 +255,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
}
//handle extension attributes
- this
- .readExtendedAttributes(reader, name, compositeService, extensionAttributeProcessor, context);
+ this.readExtendedAttributes(reader, name, compositeService, extensionAttributeProcessor, context);
composite.getServices().add(compositeService);
policyProcessor.readPolicies(contract, reader);
@@ -499,7 +499,10 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
callback.getPolicySets().add(policySet);
}
}
-
+ } else if(EXTENSION_QNAME.equals(name)) {
+ // Handle <extension>
+ //ignore element as this is a wrapper for extensibility
+ break;
} else {
// Read an extension element
@@ -697,17 +700,13 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
}
// Write extensions
- for (Object extension : callback.getExtensions()) {
- extensionProcessor.write(extension, writer, context);
- }
+ this.writeExtendedElements(writer, service, extensionProcessor, context);
writeEnd(writer);
}
// Write extensions
- for (Object extension : service.getExtensions()) {
- extensionProcessor.write(extension, writer, context);
- }
+ this.writeExtendedElements(writer, service, extensionProcessor, context);
writeEnd(writer);
}
@@ -770,18 +769,14 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
}
// Write extensions
- for (Object extension : callback.getExtensions()) {
- extensionProcessor.write(extension, writer, context);
- }
+ this.writeExtendedElements(writer, callback, extensionProcessor, context);
writeEnd(writer);
}
// Write extensions
- for (Object extension : service.getExtensions()) {
- extensionProcessor.write(extension, writer, context);
- }
-
+ this.writeExtendedElements(writer, service, extensionProcessor, context);
+
writeEnd(writer);
}
@@ -821,17 +816,13 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
}
// Write extensions
- for (Object extensions : callback.getExtensions()) {
- extensionProcessor.write(extensions, writer, context);
- }
+ this.writeExtendedElements(writer, callback, extensionProcessor, context);
writeEnd(writer);
}
// Write extensions
- for (Object extensions : reference.getExtensions()) {
- extensionProcessor.write(extensions, writer, context);
- }
+ this.writeExtendedElements(writer, reference, extensionProcessor, context);
writeEnd(writer);
}
@@ -909,17 +900,13 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
}
// Write extensions
- for (Object extension : callback.getExtensions()) {
- extensionProcessor.write(extension, writer, context);
- }
+ this.writeExtendedElements(writer, callback, extensionProcessor, context);
writeEnd(writer);
}
// Write extensions
- for (Object extension : reference.getExtensions()) {
- extensionProcessor.write(extension, writer, context);
- }
+ this.writeExtendedElements(writer, reference, extensionProcessor, context);
writeEnd(writer);
}
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Constants.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Constants.java
index bc9a7a4d26..48cfbbb381 100644
--- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Constants.java
+++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/Constants.java
@@ -69,6 +69,9 @@ public interface Constants {
String BINDING_SCA = "binding.sca";
QName BINDING_SCA_QNAME = new QName(Constants.SCA11_NS, BINDING_SCA);
+ String EXTENSION = "extensions";
+ QName EXTENSION_QNAME = new QName(Constants.SCA11_NS, EXTENSION);
+
String NAME = "name";
String VALUE = "value";
QName VALUE_QNAME = new QName(SCA11_NS, VALUE);
diff --git a/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java b/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java
index b6731f735b..0d410fb377 100644
--- a/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java
+++ b/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java
@@ -115,7 +115,11 @@ public class NamespaceExportProcessor extends BaseStAXArtifactProcessor implemen
}
readExtendedAttributes(reader, namespaceExport, attributeProcessor, extensionFactory, context);
} else {
- readExtendedElement(reader, namespaceExport, extensionProcessor, context);
+ //read extended elements
+ Object ext = extensionProcessor.read(reader, context);
+ if (namespaceExport != null) {
+ namespaceExport.getExtensions().add(ext);
+ }
}
break;
@@ -151,7 +155,10 @@ public class NamespaceExportProcessor extends BaseStAXArtifactProcessor implemen
writeExtendedAttributes(writer, namespaceExport, attributeProcessor, context);
- writeExtendedElements(writer, namespaceExport, extensionProcessor, context);
+ // handle extended elements
+ for (Object ext : namespaceExport.getExtensions()) {
+ extensionProcessor.write(ext, writer, context);
+ }
writer.writeEndElement();
}
diff --git a/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java b/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java
index f9ba0c40fd..17b0dc3953 100644
--- a/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java
+++ b/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java
@@ -122,7 +122,11 @@ public class NamespaceImportProcessor extends BaseStAXArtifactProcessor implemen
}
readExtendedAttributes(reader, namespaceImport, attributeProcessor, extensionFactory, context);
} else {
- readExtendedElement(reader, namespaceImport, extensionProcessor, context);
+ // handle extended elements
+ Object ext = extensionProcessor.read(reader, context);
+ if (namespaceImport != null) {
+ namespaceImport.getExtensions().add(ext);
+ }
}
break;
case XMLStreamConstants.END_ELEMENT:
@@ -159,7 +163,12 @@ public class NamespaceImportProcessor extends BaseStAXArtifactProcessor implemen
}
writeExtendedAttributes(writer, namespaceImport, attributeProcessor, context);
- writeExtendedElements(writer, namespaceImport, extensionProcessor, context);
+
+ //handle extended elements
+ for (Object ext : namespaceImport.getExtensions()) {
+ extensionProcessor.write(ext, writer, context);
+ }
+
writer.writeEndElement();
}
diff --git a/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/BaseStAXArtifactProcessor.java b/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/BaseStAXArtifactProcessor.java
index 7056823ec8..40a558b80b 100644
--- a/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/BaseStAXArtifactProcessor.java
+++ b/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/BaseStAXArtifactProcessor.java
@@ -22,6 +22,8 @@ package org.apache.tuscany.sca.contribution.processor;
import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+
+import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -43,6 +45,9 @@ import org.apache.tuscany.sca.common.xml.stax.StAXHelper;
* @version $Rev$ $Date$
*/
public abstract class BaseStAXArtifactProcessor {
+ private static String SCA11_NS = "http://docs.oasis-open.org/ns/opencsa/sca/200912";
+ private static String SCA11_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.1";
+
/**
* The StAXHelper without states
*/
@@ -319,6 +324,7 @@ public abstract class BaseStAXArtifactProcessor {
Extensible extensibleElement,
StAXAttributeProcessor extensionAttributeProcessor, ProcessorContext context)
throws ContributionWriteException, XMLStreamException {
+
for (Extension extension : extensibleElement.getAttributeExtensions()) {
if (extension.isAttribute()) {
extensionAttributeProcessor.write(extension, writer, context);
@@ -328,8 +334,9 @@ public abstract class BaseStAXArtifactProcessor {
protected void readExtendedElement(XMLStreamReader reader,
Extensible extensible,
- StAXArtifactProcessor extensionProcessor, ProcessorContext context) throws ContributionReadException,
- XMLStreamException {
+ StAXArtifactProcessor extensionProcessor, ProcessorContext context)
+ throws ContributionReadException, XMLStreamException {
+
Object ext = extensionProcessor.read(reader, context);
if (extensible != null) {
extensible.getExtensions().add(ext);
@@ -338,11 +345,33 @@ public abstract class BaseStAXArtifactProcessor {
protected void writeExtendedElements(XMLStreamWriter writer,
Extensible extensible,
- StAXArtifactProcessor extensionProcessor, ProcessorContext context) throws ContributionWriteException,
- XMLStreamException {
+ StAXArtifactProcessor extensionProcessor, ProcessorContext context)
+ throws ContributionWriteException, XMLStreamException {
+
+ List <Object> otherExtensions = new ArrayList<Object>();
+
+ // write all generic extensions as elements
+ // to produce semanticaly equal xml output
for (Object ext : extensible.getExtensions()) {
- extensionProcessor.write(ext, writer, context);
+ if (ext instanceof Extension) {
+ extensionProcessor.write(ext, writer, context);
+ } else {
+ otherExtensions.add(ext);
+ }
}
+
+ //wrap xml extensibility into a extension wrapper element
+ if(otherExtensions.size() > 0) {
+
+ writeStart(writer, SCA11_NS, "extensions");
+
+ for (Object extension : otherExtensions) {
+ extensionProcessor.write(extension, writer, context);
+ }
+
+ writeEnd(writer);
+ }
+
}
/**
diff --git a/sca-java-2.x/trunk/modules/implementation-osgi/src/test/java/org/apache/tuscany/sca/implementation/osgi/xml/OSGiReadImplTestCase.java b/sca-java-2.x/trunk/modules/implementation-osgi/src/test/java/org/apache/tuscany/sca/implementation/osgi/xml/OSGiReadImplTestCase.java
index 6b59b498fc..614f243eb3 100644
--- a/sca-java-2.x/trunk/modules/implementation-osgi/src/test/java/org/apache/tuscany/sca/implementation/osgi/xml/OSGiReadImplTestCase.java
+++ b/sca-java-2.x/trunk/modules/implementation-osgi/src/test/java/org/apache/tuscany/sca/implementation/osgi/xml/OSGiReadImplTestCase.java
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertTrue;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
+import java.io.StringReader;
import java.io.StringWriter;
import javax.xml.stream.XMLInputFactory;
@@ -34,6 +35,7 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.ComponentType;
import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.ContributionMetadata;
import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.ProcessorContext;
@@ -45,6 +47,7 @@ import org.apache.tuscany.sca.implementation.osgi.OSGiImplementation;
import org.apache.tuscany.sca.implementation.osgi.OSGiProperty;
import org.junit.Assert;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -77,9 +80,35 @@ public class OSGiReadImplTestCase {
XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
Composite composite = (Composite)staxProcessor.read(reader, context);
assertNotNull(composite);
+ reader.close();
}
@Test
+ public void testReadWriteComponentType() throws Exception {
+ InputStream is = getClass().getClassLoader().getResourceAsStream("OSGI-INF/sca/bundle.componentType");
+ XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
+ ComponentType componentType = (ComponentType)staxProcessor.read(reader, context);
+ assertNotNull(componentType);
+
+ assertEquals(2, componentType.getServices().get(0).getExtensions().size());
+
+ //write composite back
+ StringWriter stringWriter = new StringWriter();
+ XMLStreamWriter writer = outputFactory.createXMLStreamWriter(stringWriter);
+ staxProcessor.write(componentType, writer, context);
+ stringWriter.close();
+
+ //read from the output from write
+ reader = inputFactory.createXMLStreamReader(new StringReader(stringWriter.toString()));
+ componentType = (ComponentType)staxProcessor.read(reader, context);
+ assertNotNull(componentType);
+
+ assertEquals(2, componentType.getServices().get(0).getExtensions().size());
+
+ reader.close();
+ }
+
+ @Test
public void testReadAndResolveComposite() throws Exception {
InputStream is = getClass().getClassLoader().getResourceAsStream("osgitest.composite");
XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
@@ -109,6 +138,8 @@ public class OSGiReadImplTestCase {
resolver.addModel(componentType, context);
staxProcessor.resolve(composite, resolver, context);
+
+ reader.close();
}
@Test
@@ -133,7 +164,10 @@ public class OSGiReadImplTestCase {
XMLStreamWriter writer = outputFactory.createXMLStreamWriter(sw);
staxProcessor.write(osgiImpl, writer, context);
writer.flush();
+ writer.close();
Assert.assertTrue(sw.toString().contains("bundleSymbolicName=\"osgi.test\" bundleVersion=\"1.0.0\""));
+
+ reader.close();
}
}
diff --git a/sca-java-2.x/trunk/modules/implementation-osgi/src/test/resources/OSGI-INF/sca/bundle.componentType b/sca-java-2.x/trunk/modules/implementation-osgi/src/test/resources/OSGI-INF/sca/bundle.componentType
index d58fb634aa..401809c197 100644
--- a/sca-java-2.x/trunk/modules/implementation-osgi/src/test/resources/OSGI-INF/sca/bundle.componentType
+++ b/sca-java-2.x/trunk/modules/implementation-osgi/src/test/resources/OSGI-INF/sca/bundle.componentType
@@ -25,30 +25,39 @@
<!-- The interface will be mapped into the OSGi service class -->
<interface.java interface="calculator.dosgi.CalculatorService"/>
<!-- The list of OSGi properties -->
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</service>
<!-- The reference elment defines an SCA proxy to a remote OSGi service -->
<reference name="addService">
<interface.java interface="calculator.dosgi.operations.AddService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</reference>
<reference name="subtractService">
<interface.java interface="calculator.dosgi.operations.SubtractService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</reference>
<reference name="multiplyService">
<interface.java interface="calculator.dosgi.operations.MultiplyService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</reference>
<reference name="divideService">
<interface.java interface="calculator.dosgi.operations.DivideService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</reference>
-
</componentType>
diff --git a/sca-java-2.x/trunk/modules/node-impl-osgi/src/test/resources/calculator/dosgi/bundle.componentType b/sca-java-2.x/trunk/modules/node-impl-osgi/src/test/resources/calculator/dosgi/bundle.componentType
index d58fb634aa..401809c197 100644
--- a/sca-java-2.x/trunk/modules/node-impl-osgi/src/test/resources/calculator/dosgi/bundle.componentType
+++ b/sca-java-2.x/trunk/modules/node-impl-osgi/src/test/resources/calculator/dosgi/bundle.componentType
@@ -25,30 +25,39 @@
<!-- The interface will be mapped into the OSGi service class -->
<interface.java interface="calculator.dosgi.CalculatorService"/>
<!-- The list of OSGi properties -->
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</service>
<!-- The reference elment defines an SCA proxy to a remote OSGi service -->
<reference name="addService">
<interface.java interface="calculator.dosgi.operations.AddService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</reference>
<reference name="subtractService">
<interface.java interface="calculator.dosgi.operations.SubtractService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</reference>
<reference name="multiplyService">
<interface.java interface="calculator.dosgi.operations.MultiplyService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</reference>
<reference name="divideService">
<interface.java interface="calculator.dosgi.operations.DivideService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</reference>
-
</componentType>
diff --git a/sca-java-2.x/trunk/modules/node-impl-osgi/src/test/resources/calculator/dosgi/operations/bundle.componentType b/sca-java-2.x/trunk/modules/node-impl-osgi/src/test/resources/calculator/dosgi/operations/bundle.componentType
index 2d2933f85b..fced5b7840 100644
--- a/sca-java-2.x/trunk/modules/node-impl-osgi/src/test/resources/calculator/dosgi/operations/bundle.componentType
+++ b/sca-java-2.x/trunk/modules/node-impl-osgi/src/test/resources/calculator/dosgi/operations/bundle.componentType
@@ -25,23 +25,30 @@
<!-- The service elment defines an SCA proxy to a remote OSGi service -->
<service name="AddService">
<interface.java interface="calculator.dosgi.operations.AddService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</service>
<service name="SubtractService">
<interface.java interface="calculator.dosgi.operations.SubtractService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</service>
<service name="MultiplyService">
<interface.java interface="calculator.dosgi.operations.MultiplyService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</service>
<service name="DivideService">
<interface.java interface="calculator.dosgi.operations.DivideService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</service>
-
</componentType>
diff --git a/sca-java-2.x/trunk/samples/dosgi-calculator-operations/OSGI-INF/sca/bundle.componentType b/sca-java-2.x/trunk/samples/dosgi-calculator-operations/OSGI-INF/sca/bundle.componentType
index 2d2933f85b..fced5b7840 100644
--- a/sca-java-2.x/trunk/samples/dosgi-calculator-operations/OSGI-INF/sca/bundle.componentType
+++ b/sca-java-2.x/trunk/samples/dosgi-calculator-operations/OSGI-INF/sca/bundle.componentType
@@ -25,23 +25,30 @@
<!-- The service elment defines an SCA proxy to a remote OSGi service -->
<service name="AddService">
<interface.java interface="calculator.dosgi.operations.AddService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</service>
<service name="SubtractService">
<interface.java interface="calculator.dosgi.operations.SubtractService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</service>
<service name="MultiplyService">
<interface.java interface="calculator.dosgi.operations.MultiplyService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</service>
<service name="DivideService">
<interface.java interface="calculator.dosgi.operations.DivideService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</service>
-
</componentType>
diff --git a/sca-java-2.x/trunk/samples/dosgi-calculator/OSGI-INF/sca/bundle.componentType b/sca-java-2.x/trunk/samples/dosgi-calculator/OSGI-INF/sca/bundle.componentType
index 543075ceb9..1dff21ab6b 100644
--- a/sca-java-2.x/trunk/samples/dosgi-calculator/OSGI-INF/sca/bundle.componentType
+++ b/sca-java-2.x/trunk/samples/dosgi-calculator/OSGI-INF/sca/bundle.componentType
@@ -25,30 +25,40 @@
<!-- The interface will be mapped into the OSGi service class -->
<interface.java interface="calculator.dosgi.CalculatorService"/>
<!-- The list of OSGi properties -->
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</service>
<!-- The reference elment defines an SCA proxy to a remote OSGi service -->
<reference name="addService">
<interface.java interface="calculator.dosgi.operations.AddService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</reference>
<reference name="subtractService">
<interface.java interface="calculator.dosgi.operations.SubtractService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</reference>
<reference name="multiplyService">
<interface.java interface="calculator.dosgi.operations.MultiplyService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</reference>
<reference name="divideService">
<interface.java interface="calculator.dosgi.operations.DivideService"/>
- <t:osgi.property name="prop1">1</t:osgi.property>
- <t:osgi.property name="prop2">ABC</t:osgi.property>
+ <extensions>
+ <t:osgi.property name="prop1">1</t:osgi.property>
+ <t:osgi.property name="prop2">ABC</t:osgi.property>
+ </extensions>
</reference>
</componentType>