Hi,

I'm very surprised (after spending hours of debugging) to find out that a "big" 
feature is disabled to allow some tests to pass :-(. I would rather that we 
"ignore" the failing test cases with JIRA tickets so that we won't forget to 
fix it. 

Anyway, I'm adding code to bring up the allowsPassByReference support back:

1) Add a flag to Reference to indicate if the reference supports 
"allowsPassByReference". This is introduced by the SCA Java spec.
2) In the ReferenceProcessor to set the flag based on the 
@AllowsPassByReference annotations at the implementation class or 
method/field/constructor with @Reference.
3) Re-enable the JavaImplementation to honor the allowsPassByReference for 
implementation class/methods. (We could consider to promote this flag to 
service/operation level).
4) Re-enable the check for the SCA binding to use the reference/service 
allowsPassByReference flag to decide if we can optimize the remotable 
operations by allowing pass-by-reference.

By the way, where can I find the compliance tests for [JCA20009] and [JCA20010]?

Thanks,
Raymond
________________________________________________________________ 
Raymond Feng
rf...@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com
________________________________________________________________

On Feb 1, 2011, at 2:43 PM, Luciano Resende wrote:

> On Mon, Mar 1, 2010 at 2:54 PM,  <antel...@apache.org> wrote:
>> Author: antelder
>> Date: Mon Mar  1 22:54:24 2010
>> New Revision: 917777
>> 
>> URL: http://svn.apache.org/viewvc?rev=917777&view=rev
>> Log:
>> Fix to ensure pass-by-value is used if only one end is using 
>> allowsPassByReference
>> 
>> Modified:
>>    
>> tuscany/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java
>> 
>> Modified: 
>> tuscany/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java
>> URL: 
>> http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java?rev=917777&r1=917776&r2=917777&view=diff
>> ==============================================================================
>> --- 
>> tuscany/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java
>>  (original)
>> +++ 
>> tuscany/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java
>>  Mon Mar  1 22:54:24 2010
>> @@ -208,7 +208,8 @@
>>                        passByValue = false;
>>                     }
>>                 } else {
>> -                    boolean allowsPBR = chain.allowsPassByReference();
>> +//                    boolean allowsPBR = chain.allowsPassByReference(); 
>> TODO: TUSCANY-3479 this breaks the conformance tests as it needs to consider 
>> _both_ ends
>> +                    boolean allowsPBR = false;
>>                     if (allowsPBR && 
>> interfaceContractMapper.isCompatibleByReference(operation, targetOp, 
>> Compatibility.SUBSET)) {
>>                         passByValue = false;
>>                     } else if 
>> (interfaceContractMapper.isCompatibleByValue(operation, targetOp, 
>> Compatibility.SUBSET)) {
>> 
>> 
>> 
> 
> 
> This always assume PBV, which will cause extra and unnecessary
> transformation and degrade performance. Instead of hacking the core
> runtime, we should really look into the root cause of the issue and
> fix it. I'd rather really disable the conformance test.
> 
> -- 
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/

Reply via email to