Return-Path: Delivered-To: apmail-ws-tuscany-commits-archive@locus.apache.org Received: (qmail 50143 invoked from network); 23 Feb 2007 13:14:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Feb 2007 13:14:39 -0000 Received: (qmail 42203 invoked by uid 500); 23 Feb 2007 13:14:47 -0000 Delivered-To: apmail-ws-tuscany-commits-archive@ws.apache.org Received: (qmail 42124 invoked by uid 500); 23 Feb 2007 13:14:47 -0000 Mailing-List: contact tuscany-commits-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: tuscany-dev@ws.apache.org Delivered-To: mailing list tuscany-commits@ws.apache.org Received: (qmail 42115 invoked by uid 99); 23 Feb 2007 13:14:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2007 05:14:47 -0800 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2007 05:14:38 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 1BC3F1A981A; Fri, 23 Feb 2007 05:14:18 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r510935 - in /incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src: main/java/org/apache/tuscany/core/databinding/impl/ test/java/org/apache/tuscany/core/databinding/impl/ Date: Fri, 23 Feb 2007 13:14:17 -0000 To: tuscany-commits@ws.apache.org From: antelder@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070223131418.1BC3F1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: antelder Date: Fri Feb 23 05:14:17 2007 New Revision: 510935 URL: http://svn.apache.org/viewvc?view=rev&rev=510935 Log: Have PassByValue interceptor take account of the allowsPassByReference annotation 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/core/src/test/java/org/apache/tuscany/core/databinding/impl/PassByValueWirePostProcessorTestCase.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=510935&r1=510934&r2=510935 ============================================================================== --- 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 Fri Feb 23 05:14:17 2007 @@ -36,6 +36,7 @@ import org.apache.tuscany.spi.wire.Interceptor; import org.apache.tuscany.spi.wire.OutboundWire; import org.apache.tuscany.spi.wire.WirePostProcessorExtension; +import org.osoa.sca.annotations.Remotable; /** * This processor is responsible for enforcing the pass-by-value semantics required of Remotable interfaces. This is @@ -71,7 +72,11 @@ boolean implAllowsPassByReference = false; boolean methodAllowsPassByReference = false; - if (target.getContainer() instanceof AtomicComponentExtension) { + if (target.getServiceContract().getInterfaceClass() != null) { + Class ic = target.getServiceContract().getInterfaceClass(); + implAllowsPassByReference = ic.getAnnotation(Remotable.class) != null; + } + if (!implAllowsPassByReference && target.getContainer() instanceof AtomicComponentExtension) { implAllowsPassByReference = ((AtomicComponentExtension) target.getContainer()).isAllowsPassByReference(); } Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/PassByValueWirePostProcessorTestCase.java URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/PassByValueWirePostProcessorTestCase.java?view=diff&rev=510935&r1=510934&r2=510935 ============================================================================== --- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/PassByValueWirePostProcessorTestCase.java (original) +++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/PassByValueWirePostProcessorTestCase.java Fri Feb 23 05:14:17 2007 @@ -88,6 +88,7 @@ OutboundInvocationChainImpl outChain = new OutboundInvocationChainImpl(operation1); outChainsMap.put(operation1, outChain); + expect(inboundWire.getServiceContract()).andReturn(serviceContract); expect(inboundWire.getContainer()).andReturn(componentExtn).anyTimes(); expect(outboundWire.getContainer()).andReturn(componentExtn).anyTimes(); expect(inboundWire.getServiceContract()).andReturn(serviceContract); @@ -135,6 +136,7 @@ OutboundInvocationChainImpl outChain = new OutboundInvocationChainImpl(operation1); outChainsMap.put(operation1, outChain); + expect(inboundWire.getServiceContract()).andReturn(serviceContract); expect(inboundWire.getContainer()).andReturn(componentExtn).anyTimes(); expect(outboundWire.getContainer()).andReturn(componentExtn).anyTimes(); expect(inboundWire.getServiceContract()).andReturn(serviceContract); @@ -181,6 +183,7 @@ OutboundInvocationChainImpl outChain = new OutboundInvocationChainImpl(operation1); outChainsMap.put(operation1, outChain); + expect(inboundWire.getServiceContract()).andReturn(serviceContract); expect(inboundWire.getContainer()).andReturn(componentExtn).anyTimes(); expect(outboundWire.getContainer()).andReturn(componentExtn).anyTimes(); expect(inboundWire.getServiceContract()).andReturn(serviceContract); --------------------------------------------------------------------- To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org For additional commands, e-mail: tuscany-commits-help@ws.apache.org