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/23 22:11:39 UTC
svn commit: r511103 - in
/incubator/tuscany/sandbox/isilval/notification/local/src/main:
java/org/apache/tuscany/notification/local/ resources/
resources/META-INF/sca/
Author: isilval
Date: Fri Feb 23 13:11:38 2007
New Revision: 511103
URL: http://svn.apache.org/viewvc?view=rev&rev=511103
Log:
bug fixes
Added:
incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/TrafficAdvisoryNotification.componentType
Modified:
incubator/tuscany/sandbox/isilval/notification/local/src/main/java/org/apache/tuscany/notification/local/LocalNotificationComponent.java
incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/META-INF/sca/notification.system.scdl
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=511103&r1=511102&r2=511103
==============================================================================
--- 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 23 13:11:38 2007
@@ -102,29 +102,30 @@
class LocalNotificationTargetInvoker extends TargetInvokerExtension {
- private List<Interceptor> subscriberInterceptors;
+ private List<InvocationChain> subscriberInvocationChains;
private Operation operation;
public LocalNotificationTargetInvoker(Operation operation, WorkContext wc, ExecutionMonitor mon) {
super(wc, mon);
- this.subscriberInterceptors = null;
+ this.subscriberInvocationChains = null;
this.operation = operation;
}
public Message invoke(Message msg) throws InvocationRuntimeException {
- if (subscriberInterceptors == null) {
- subscriberInterceptors = new ArrayList<Interceptor>();
+ if (subscriberInvocationChains == null) {
+ subscriberInvocationChains = new ArrayList<InvocationChain>();
for (Wire wire : wires) {
- InvocationChain chain = wire.getInvocationChains().get(operation);
- subscriberInterceptors.add(chain.getHeadInterceptor());
+ subscriberInvocationChains.add(wire.getInvocationChains().get(operation));
}
}
// REVIEW Should this be done in separate thread(s)?
// REVIEW Should separate copies of message be used?
- for (Interceptor subscriberInterceptor : subscriberInterceptors) {
- subscriberInterceptor.invoke(msg);
- System.out.println("*** invoke msg [" + msg + "], subscriberInterceptor [" + subscriberInterceptor + "]");
+ Object msgBody = msg.getBody();
+ for (InvocationChain subscriberInvocationChain : subscriberInvocationChains) {
+ msg.setTargetInvoker(subscriberInvocationChain.getTargetInvoker());
+ subscriberInvocationChain.getHeadInterceptor().invoke(msg);
+ msg.setBody(msgBody);
}
return RESPONSE;
Modified: 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=diff&rev=511103&r1=511102&r2=511103
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/META-INF/sca/notification.system.scdl (original)
+++ incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/META-INF/sca/notification.system.scdl Fri Feb 23 13:11:38 2007
@@ -30,6 +30,10 @@
<version>1.0-alpha-incubating-SNAPSHOT</version>
</dependency>
-->
+
+ <include name="org.apache.tuscany.sca.plugins.itest.EmbeddedMaven"
+ scdlResource="META-INF/tuscany/embeddedMaven.scdl"/>
+
<component name="notification.implementationLoader">
<system:implementation.system class="org.apache.tuscany.notification.local.NotificationImplementationLoader"/>
</component>
Added: incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/TrafficAdvisoryNotification.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/TrafficAdvisoryNotification.componentType?view=auto&rev=511103
==============================================================================
--- incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/TrafficAdvisoryNotification.componentType (added)
+++ incubator/tuscany/sandbox/isilval/notification/local/src/main/resources/TrafficAdvisoryNotification.componentType Fri Feb 23 13:11:38 2007
@@ -0,0 +1,30 @@
+<?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.
+-->
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <service name="TrafficAdvisoryNotificationService">
+ <interface.java interface="org.apache.tuscany.notification.local.TrafficAdvisory"/>
+ </service>
+
+ <reference name="TrafficAdvisoryNotificationReference"
+ multiplicity="0..n">
+ <interface.java interface="org.apache.tuscany.notification.local.TrafficAdvisory"/>
+ </reference>
+</componentType>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org