You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2007/02/20 14:15:01 UTC
svn commit: r509547 - in
/incubator/tuscany/branches/sca-java-integration/sca/kernel:
core/src/main/java/org/apache/tuscany/core/databinding/impl/
spi/src/main/java/org/apache/tuscany/spi/extension/
Author: antelder
Date: Tue Feb 20 05:15:00 2007
New Revision: 509547
URL: http://svn.apache.org/viewvc?view=rev&rev=509547
Log:
Fix pass by value interceptor to not copy args from a ws service
Modified:
incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/PassByValueWirePostProcessor.java
incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/ServiceBindingExtension.java
Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/PassByValueWirePostProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/PassByValueWirePostProcessor.java?view=diff&rev=509547&r1=509546&r2=509547
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/PassByValueWirePostProcessor.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/PassByValueWirePostProcessor.java Tue Feb 20 05:15:00 2007
@@ -27,6 +27,7 @@
import org.apache.tuscany.spi.databinding.DataBinding;
import org.apache.tuscany.spi.databinding.DataBindingRegistry;
import org.apache.tuscany.spi.extension.AtomicComponentExtension;
+import org.apache.tuscany.spi.extension.ServiceBindingExtension;
import org.apache.tuscany.spi.model.DataType;
import org.apache.tuscany.spi.model.Operation;
import org.apache.tuscany.spi.model.ServiceContract;
@@ -75,6 +76,12 @@
((AtomicComponentExtension) target.getContainer()).isAllowsPassByReference();
}
+ boolean srcAllowsPassByReference = false;
+ if (source.getContainer() instanceof ServiceBindingExtension) {
+ srcAllowsPassByReference =
+ ((ServiceBindingExtension) source.getContainer()).allowsPassByReference();
+ }
+
Map<Operation<?>, InboundInvocationChain> chains = target.getInvocationChains();
for (Map.Entry<Operation<?>, InboundInvocationChain> entry : chains.entrySet()) {
targetOperation = entry.getKey();
@@ -87,7 +94,7 @@
}
if (target.getServiceContract().isRemotable()
- && (!implAllowsPassByReference && !methodAllowsPassByReference)) {
+ && (!srcAllowsPassByReference && !implAllowsPassByReference && !methodAllowsPassByReference)) {
sourceOperation =
getSourceOperation(source.getInvocationChains().keySet(), targetOperation.getName());
Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/ServiceBindingExtension.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/ServiceBindingExtension.java?view=diff&rev=509547&r1=509546&r2=509547
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/ServiceBindingExtension.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/extension/ServiceBindingExtension.java Tue Feb 20 05:15:00 2007
@@ -84,4 +84,7 @@
return service != null && service.isSystem();
}
+ public boolean allowsPassByReference() {
+ return false;
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org