You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by is...@apache.org on 2007/02/16 22:57:09 UTC
svn commit: r508606 - in
/incubator/tuscany/sandbox/isilval/notification/local: ./
src/main/java/org/apache/tuscany/notification/local/ src/main/resources/
src/main/resources/META-INF/ src/main/resources/META-INF/sca/
src/test/java/org/apache/tuscany/n...
Author: isilval
Date: Fri Feb 16 13:57:08 2007
New Revision: 508606
URL: http://svn.apache.org/viewvc?view=rev&rev=508606
Log:
Add initial builder, update local notification component and start adding
integration test
Added:
incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/LocalNotificationComponentBuilder.java
incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/
incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/META-INF/
incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/META-INF/sca/
incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/META-INF/sca/notification.system.scdl
incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/LocalNotificationITestCase.java
incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisory.java
incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisoryConsumer.java
incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisoryProducer.java
incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/META-INF/
incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/META-INF/sca/
incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/META-INF/sca/TrafficAdvisoryNotificationLocal.scdl
incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/itest.scdl
Modified:
incubator/tuscany/sandbox/isilval/notification/local/pom.xml
incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/LocalNotificationComponent.java
incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/LocalNotificationComponentTestCase.java
incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/TrafficAdvisoryNotification.componentType
Modified: incubator/tuscany/sandbox/isilval/notification/local/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/pom.xml?view=diff&rev=508606&r1=508605&r2=508606
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/pom.xml (original)
+++ incubator/tuscany/sandbox/isilval/notification/local/pom.xml Fri Feb 16 13:57:08 2007
@@ -74,4 +74,20 @@
<scope>test</scope>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
Modified: incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/LocalNotificationComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/LocalNotificationComponent.java?view=diff&rev=508606&r1=508605&r2=508606
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/LocalNotificationComponent.java (original)
+++ incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/LocalNotificationComponent.java Fri Feb 16 13:57:08 2007
@@ -25,8 +25,6 @@
import java.util.Map;
import org.apache.tuscany.spi.ObjectCreationException;
-import org.apache.tuscany.spi.component.CompositeComponent;
-import org.apache.tuscany.spi.component.PrepareException;
import org.apache.tuscany.spi.component.TargetInvokerCreationException;
import org.apache.tuscany.spi.component.TargetResolutionException;
import org.apache.tuscany.spi.component.WorkContext;
@@ -65,12 +63,12 @@
public Object createInstance() throws ObjectCreationException {
- return null;
+ return this;
}
public Object getTargetInstance() throws TargetResolutionException {
- return null;
+ return this;
}
public TargetInvoker createTargetInvoker(String targetName, Operation operation, InboundWire callbackWire)
@@ -85,14 +83,23 @@
}
// Assuming there is only one service wire
notificationInterceptor = new LocalNotificationInterceptor();
- InboundInvocationChain serviceChain = serviceWire.getInvocationChains().values().iterator().next();
+ InboundInvocationChain serviceChain = serviceWire.getInboundInvocationChains().values().iterator().next();
serviceChain.addInterceptor(0, notificationInterceptor);
}
- public void prepare() throws PrepareException {
+ protected void onReferenceWires(List<OutboundWire> wires) {
+ for (OutboundWire referenceWire : wires) {
+ Map<?,OutboundInvocationChain> referenceChains = referenceWire.getOutboundInvocationChains();
+ OutboundInvocationChain referenceChain = referenceChains.values().iterator().next();
+ notificationInterceptor.addSubscriberInterceptor(referenceChain.getTailInterceptor().getNext());
+ System.out.println("*** added sub interceptor");
+ }
+ }
+
+ public void prepare() /* throws PrepareException */ {
for (List<OutboundWire> list : referenceWires.values()) {
OutboundWire referenceWire = list.get(0);
- Map<?,OutboundInvocationChain> referenceChains = referenceWire.getInvocationChains();
+ Map<?,OutboundInvocationChain> referenceChains = referenceWire.getOutboundInvocationChains();
OutboundInvocationChain referenceChain = referenceChains.values().iterator().next();
notificationInterceptor.addSubscriberInterceptor(referenceChain.getTailInterceptor().getNext());
}
Added: incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/LocalNotificationComponentBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/LocalNotificationComponentBuilder.java?view=auto&rev=508606
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/LocalNotificationComponentBuilder.java (added)
+++ incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/LocalNotificationComponentBuilder.java Fri Feb 16 13:57:08 2007
@@ -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.notification.local;
+
+import org.apache.tuscany.spi.builder.BuilderConfigException;
+import org.apache.tuscany.spi.component.Component;
+import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.deployer.DeploymentContext;
+import org.apache.tuscany.spi.extension.ComponentBuilderExtension;
+import org.apache.tuscany.spi.model.ComponentDefinition;
+
+/**
+ * Builds a Local Notification Component from a component definition
+ *
+ * @version $Rev$ $Date$
+ */
+public class LocalNotificationComponentBuilder extends ComponentBuilderExtension<NotificationImplementation> {
+
+ protected Class<NotificationImplementation> getImplementationType() {
+ return NotificationImplementation.class;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Component build(CompositeComponent parent,
+ ComponentDefinition<NotificationImplementation> componentDefinition,
+ DeploymentContext deploymentContext) throws BuilderConfigException {
+ return new LocalNotificationComponent(componentDefinition.getUri(),
+ wireService,
+ workContext,
+ workScheduler,
+ monitor,
+ 0);
+ }
+}
Added: incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/META-INF/sca/notification.system.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/META-INF/sca/notification.system.scdl?view=auto&rev=508606
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/META-INF/sca/notification.system.scdl (added)
+++ incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/META-INF/sca/notification.system.scdl Fri Feb 16 13:57:08 2007
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<!--
+ Notification configuration for the launcher environment.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
+
+ name="org.apache.tuscany.launcher.NotificationImplementation">
+
+ <dependency xmlns="http://tuscany.apache.org/xmlns/1.0-SNAPSHOT">
+ <group>org.apache.tuscany.sca.extensions.notification</group>
+ <name>tuscany-notification</name>
+ <version>1.0-incubator-SNAPSHOT</version>
+ </dependency>
+
+ <component name="notification.implementationLoader">
+ <system:implementation.system class="org.apache.tuscany.notification.local.NotificationImplementationLoader"/>
+ </component>
+
+ <component name="notification.componentTypeLoader">
+ <system:implementation.system class="org.apache.tuscany.notification.local.NotificationComponentTypeLoader"/>
+ </component>
+
+ <component name="notification.componentBuilder">
+ <system:implementation.system class="org.apache.tuscany.notification.local.LocalNotificationComponentBuilder"/>
+ </component>
+
+</composite>
Modified: incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/LocalNotificationComponentTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/LocalNotificationComponentTestCase.java?view=diff&rev=508606&r1=508605&r2=508606
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/LocalNotificationComponentTestCase.java (original)
+++ incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/LocalNotificationComponentTestCase.java Fri Feb 16 13:57:08 2007
@@ -20,6 +20,7 @@
import java.lang.reflect.Type;
import java.net.URI;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
@@ -44,7 +45,6 @@
public class LocalNotificationComponentTestCase extends TestCase {
public void testLocalNotificationComponent() throws Exception {
-
URI name = URI.create("LocalNotificationComponentTest");
LocalNotificationComponent nc = new LocalNotificationComponent(name, null, null, null, null, 0);
@@ -54,8 +54,8 @@
Map<Operation<?>, InboundInvocationChain> pubChains = new HashMap<Operation<?>, InboundInvocationChain>();
pubChains.put(operation, pubChain);
InboundWire pubWire = EasyMock.createNiceMock(InboundWire.class);
- EasyMock.expect(pubWire.getUri()).andReturn(URI.create("pubWire"));
- EasyMock.expect(pubWire.getInvocationChains()).andReturn(pubChains);
+ EasyMock.expect(pubWire.getSourceUri()).andReturn(URI.create("pubWire"));
+ EasyMock.expect(pubWire.getInboundInvocationChains()).andReturn(pubChains);
EasyMock.replay(pubWire);
Interceptor sub1TailInterceptor = EasyMock.createNiceMock(Interceptor.class);
@@ -68,8 +68,8 @@
sub1Chains.put(operation, sub1Chain);
OutboundWire sub1Wire = EasyMock.createNiceMock(OutboundWire.class);
URI sub1Name = URI.create("sub1Wire#sub1fragment");
- EasyMock.expect(sub1Wire.getUri()).andReturn(sub1Name);
- EasyMock.expect(sub1Wire.getInvocationChains()).andReturn(sub1Chains);
+ EasyMock.expect(sub1Wire.getSourceUri()).andReturn(sub1Name);
+ EasyMock.expect(sub1Wire.getOutboundInvocationChains()).andReturn(sub1Chains);
EasyMock.replay(sub1Wire);
Interceptor sub2TailInterceptor = EasyMock.createNiceMock(Interceptor.class);
@@ -82,18 +82,18 @@
sub2Chains.put(operation, sub2Chain);
OutboundWire sub2Wire = EasyMock.createNiceMock(OutboundWire.class);
URI sub2Name = URI.create("sub2Wire#sub2fragment");
- EasyMock.expect(sub2Wire.getUri()).andReturn(sub2Name);
- EasyMock.expect(sub2Wire.getInvocationChains()).andReturn(sub2Chains);
+ EasyMock.expect(sub2Wire.getSourceUri()).andReturn(sub2Name);
+ EasyMock.expect(sub2Wire.getOutboundInvocationChains()).andReturn(sub2Chains);
EasyMock.replay(sub2Wire);
nc.addInboundWire(pubWire);
- nc.addOutboundWire(sub1Wire);
- nc.addOutboundWire(sub2Wire);
+ ArrayList<OutboundWire> outboundWires = new ArrayList<OutboundWire>();
+ outboundWires.add(sub1Wire);
+ outboundWires.add(sub2Wire);
+ nc.addOutboundWires(outboundWires);
MockInterceptor pubInterceptor = new MockInterceptor("Pub");
pubInterceptor.setNext(pubChain.getHeadInterceptor());
-
- nc.prepare();
Message msg = EasyMock.createNiceMock(Message.class);
EasyMock.expect(msg.getBody()).andReturn("msg").times(2);
Added: incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/LocalNotificationITestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/LocalNotificationITestCase.java?view=auto&rev=508606
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/LocalNotificationITestCase.java (added)
+++ incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/LocalNotificationITestCase.java Fri Feb 16 13:57:08 2007
@@ -0,0 +1,37 @@
+/*
+ * 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.notification.local;
+
+import org.osoa.sca.annotations.Reference;
+
+import junit.framework.TestCase;
+
+public class LocalNotificationITestCase extends TestCase {
+
+ @Reference
+ TrafficAdvisoryProducer producer;
+
+ public void testTrafficNotification() throws Exception {
+ try {
+ producer.produceTrafficNotification("nothing to report");
+ } catch(Throwable e) {
+ e.printStackTrace();
+ }
+ }
+}
Added: incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisory.java?view=auto&rev=508606
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisory.java (added)
+++ incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisory.java Fri Feb 16 13:57:08 2007
@@ -0,0 +1,6 @@
+package org.apache.tuscany.notification.local;
+
+public interface TrafficAdvisory {
+
+ void trafficNotification(String report);
+}
Added: incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisoryConsumer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisoryConsumer.java?view=auto&rev=508606
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisoryConsumer.java (added)
+++ incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisoryConsumer.java Fri Feb 16 13:57:08 2007
@@ -0,0 +1,36 @@
+/*
+ * 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.notification.local;
+
+import org.osoa.sca.annotations.Property;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+@Service(TrafficAdvisory.class)
+@Scope("STATELESS")
+public class TrafficAdvisoryConsumer implements TrafficAdvisory {
+
+ @Property
+ protected String name;
+
+ public void trafficNotification(String report) {
+
+ System.out.println("Consumer [" + name + "] received report: " + report);
+ }
+}
Added: incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisoryProducer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisoryProducer.java?view=auto&rev=508606
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisoryProducer.java (added)
+++ incubator/tuscany/sandbox/isilval/notification/local/src/test/java/org/apache/tuscany/notification/local/TrafficAdvisoryProducer.java Fri Feb 16 13:57:08 2007
@@ -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.notification.local;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+@Service(TrafficAdvisoryProducer.class)
+public class TrafficAdvisoryProducer {
+
+ @Reference
+ TrafficAdvisory destination;
+
+ public void produceTrafficNotification(String report) {
+
+ destination.trafficNotification(report);
+ }
+}
Added: incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/META-INF/sca/TrafficAdvisoryNotificationLocal.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/META-INF/sca/TrafficAdvisoryNotificationLocal.scdl?view=auto&rev=508606
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/META-INF/sca/TrafficAdvisoryNotificationLocal.scdl (added)
+++ incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/META-INF/sca/TrafficAdvisoryNotificationLocal.scdl Fri Feb 16 13:57:08 2007
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<composite xmlns:nt="http://tuscany.apache.org/xmlns/notification/1.0"
+ name="TrafficAdvisoryNotificationLocalComposite">
+
+ <component name="TrafficAdvisoryProducer">
+ <implementation.java class="org.apache.tuscany.notification.local.TrafficAdvisoryProducer"/>
+ <reference name="destination">TrafficAdvisoryNotificationComponent</reference>
+ </component>
+
+ <component name="TrafficAdvisoryNotificationComponent">
+ <nt:implementation.notification name="TrafficAdvisoryNotification"/>
+ <reference name="TrafficAdvisoryNotificationReference">
+ TrafficAdvisoryConsumer1
+ </reference>
+ <reference name="TrafficAdvisoryNotificationReference">
+ TrafficAdvisoryConsumer2
+ </reference>
+ </component>
+
+ <component name="TrafficAdvisoryConsumer1">
+ <implementation.java class="org.apache.tuscany.notification.local.TrafficAdvisoryConsumer"/>
+ <property name="name">Consumer1</property>
+ </component>
+
+ <component name="TrafficAdvisoryConsumer2">
+ <implementation.java class="org.apache.tuscany.notification.local.TrafficAdvisoryConsumer"/>
+ <property name="name">Consumer2</property>
+ </component>
+
+</composite>
Modified: incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/TrafficAdvisoryNotification.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/TrafficAdvisoryNotification.componentType?view=diff&rev=508606&r1=508605&r2=508606
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/TrafficAdvisoryNotification.componentType (original)
+++ incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/TrafficAdvisoryNotification.componentType Fri Feb 16 13:57:08 2007
@@ -23,7 +23,8 @@
<interface.java interface="org.apache.tuscany.notification.local.TrafficAdvisory"/>
</service>
- <reference name="TrafficAdvisoryNotificationReference">
+ <reference name="TrafficAdvisoryNotificationReference"
+ multiplicity="0..n">
<interface.java interface="org.apache.tuscany.notification.local.TrafficAdvisory"/>
</reference>
</componentType>
Added: incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/itest.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/itest.scdl?view=auto&rev=508606
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/itest.scdl (added)
+++ incubator/tuscany/sandbox/isilval/notification/local/src/test/resources/itest.scdl Fri Feb 16 13:57:08 2007
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ name="LocalNotificationTestHarnessComposite">
+
+ <include name="TrafficAdvisoryNotificationLocalComposite"
+ scdlResource="META-INF/sca/TrafficAdvisoryNotificationLocal.scdl"/>
+
+ <component name="testMyService">
+ <tuscany:junit class="LocalNotificationITestCase"/>
+ <reference name="producer">TrafficAdvisoryProducer</reference>
+ </component>
+
+</composite>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org