tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r572846 - in /incubator/tuscany/java/sca/modules: assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ core/src/main/java/org/apache/tuscany/sca/core/assembly/ core/src/main/java/org/apache/tuscany/sca/core/invocation/
Date Wed, 05 Sep 2007 00:29:49 GMT
Author: rfeng
Date: Tue Sep  4 17:29:48 2007
New Revision: 572846

URL: http://svn.apache.org/viewvc?rev=572846&view=rev
Log:
Some minor cleanups

Modified:
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BindingUtil.java
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BindingUtil.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BindingUtil.java?rev=572846&r1=572845&r2=572846&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BindingUtil.java
(original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BindingUtil.java
Tue Sep  4 17:29:48 2007
@@ -70,6 +70,10 @@
                         } catch (Exception e) {
                             // warning("The binding doesn't support clone: " + binding.getClass().getSimpleName(),
binding);
                         }
+                    } else {
+                        if (binding.getURI() == null) {
+                            binding.setURI(serviceBinding.getURI());
+                        }
                     }
                     matched.add(cloned);
                     break;

Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java?rev=572846&r1=572845&r2=572846&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java
Tue Sep  4 17:29:48 2007
@@ -44,6 +44,7 @@
 import org.apache.tuscany.sca.runtime.RuntimeWire;
 import org.apache.tuscany.sca.runtime.RuntimeWireProcessor;
 import org.apache.tuscany.sca.work.WorkScheduler;
+import org.osoa.sca.ServiceRuntimeException;
 
 /**
  * @version $Rev$ $Date$
@@ -117,6 +118,13 @@
             Binding refBinding = wireSource.getBinding();
             for (Operation operation : sourceContract.getInterface().getOperations()) {
                 Operation targetOperation = interfaceContractMapper.map(targetContract.getInterface(),
operation);
+                if (targetOperation == null) {
+                    throw new ServiceRuntimeException("No matching operation for " + operation.getName()
+                        + " is found in reference "
+                        + wireSource.getComponent().getURI()
+                        + "#"
+                        + reference.getName());
+                }
                 InvocationChain chain = new InvocationChainImpl(operation, targetOperation);
                 if (operation.isNonBlocking()) {
                     addNonBlockingInterceptor(reference, refBinding, chain);
@@ -130,6 +138,13 @@
             RuntimeComponent serviceComponent = wireTarget.getComponent();
             for (Operation operation : sourceContract.getInterface().getOperations()) {
                 Operation targetOperation = interfaceContractMapper.map(targetContract.getInterface(),
operation);
+                if (targetOperation == null) {
+                    throw new ServiceRuntimeException("No matching operation for " + operation.getName()
+                        + " is found in service "
+                        + serviceComponent.getURI()
+                        + "#"
+                        + service.getName());
+                }
                 InvocationChain chain = new InvocationChainImpl(operation, targetOperation);
                 addImplementationInterceptor(serviceComponent, service, chain, targetOperation);
                 chains.add(chain);
@@ -178,10 +193,7 @@
                 }
             }
         } catch (RuntimeException e) {
-            // TODO: [rfeng] Ignore the self reference if a runtime exception happens
-            if (!reference.getName().startsWith("$self$.")) {
-                throw e;
-            }
+            throw e;
         }
     }
 

Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java?rev=572846&r1=572845&r2=572846&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java
(original)
+++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java
Tue Sep  4 17:29:48 2007
@@ -34,8 +34,6 @@
 import org.apache.tuscany.sca.core.scope.Scope;
 import org.apache.tuscany.sca.core.scope.ScopeContainer;
 import org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent;
-import org.apache.tuscany.sca.core.scope.TargetDestructionException;
-import org.apache.tuscany.sca.core.scope.TargetInitializationException;
 import org.apache.tuscany.sca.interfacedef.ConversationSequence;
 import org.apache.tuscany.sca.interfacedef.DataType;
 import org.apache.tuscany.sca.interfacedef.Interface;
@@ -180,7 +178,6 @@
                 found = chain;
                 break;
             } else if (match(operation, method)) {
-                chains.put(method, chain);
                 found = chain;
                 break;
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message