You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <de...@tuscany.apache.org> on 2010/02/23 16:27:28 UTC

[jira] Resolved: (TUSCANY-3473) Local invocation using hazelcast registry fails (requires interfaces to be remote)

     [ https://issues.apache.org/jira/browse/TUSCANY-3473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws resolved TUSCANY-3473.
---------------------------------

       Resolution: Fixed
    Fix Version/s: Java-SCA-2.0

The problem is caused because the Hazelcast registry implementation always produced a serialized version of an endpoint regardless of whether it's local or remote. To fix this I added a cache of local endpoints and retrieved the endpoint from there in the local case. This ensures an endpoint where the remote flag = true, where xml = null (so that any future resolve operations don't turn the remote flag back on) and where the interface contract model is populated. 

Test and fix checked in at r915372 and r915379

> Local invocation using hazelcast registry fails (requires interfaces to be remote)
> ----------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3473
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3473
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>         Environment: All
>            Reporter: Hasan Muhammad
>            Assignee: Simon Laws
>             Fix For: Java-SCA-2.0
>
>
> When the interfaces are local, the service invocation fails when invoked from the SCAClientFactory while using Hazelcast registry. It assumes that the interfaces should be remotable and throws up an exception stating that the 
> Caused by: java.lang.IllegalStateException: Reference interface not remotable for component: CalculatorServiceComponent and reference: addService
> 	at org.apache.tuscany.sca.binding.sca.provider.RuntimeSCAReferenceBindingProvider.getDistributedProvider(RuntimeSCAReferenceBindingProvider.java:126)
> 	at org.apache.tuscany.sca.binding.sca.provider.RuntimeSCAReferenceBindingProvider.start(RuntimeSCAReferenceBindingProvider.java:220)
> 	at org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl$1.run(RuntimeEndpointReferenceImpl.java:325)
> 	at java.security.AccessController.doPrivileged(AccessController.java:202)
> 	at org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl.resolveEndpointReference(RuntimeEndpointReferenceImpl.java:323)
> 	at org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl.initInvocationChains(RuntimeEndpointReferenceImpl.java:265)
> 	at org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl.getInvocationChains(RuntimeEndpointReferenceImpl.java:186)
> 	at org.apache.tuscany.sca.core.invocation.impl.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:195)
> 	at org.apache.tuscany.sca.core.invocation.impl.JDKInvocationHandler.invoke(JDKInvocationHandler.java:99)
> 	at $Proxy37.add(Unknown Source)
> 	at test.sca.calculator.CalculatorServiceImpl.add(Unknown Source)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> 	at java.lang.reflect.Method.invoke(Method.java:600)
> 	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:115)
> 	at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:61)
> 	at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:91)
> This can be easily reproduced by having the calc sample invoked via the SCAClientFactory using HazelCast registry

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.