You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Kevin Williams (JIRA)" <tu...@ws.apache.org> on 2008/05/10 22:15:56 UTC

[jira] Created: (TUSCANY-2312) Runtime ignores custom callback when using setCallback()

Runtime ignores custom callback when using setCallback()
--------------------------------------------------------

                 Key: TUSCANY-2312
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2312
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Core Runtime
    Affects Versions: Java-SCA-Next
            Reporter: Kevin Williams


The Java CAA spec states:

   /**
     * Lines 728-732
     * <p>
     * By default, the client component of a service is assumed to be the
     * callback service for the bidirectional service. However, it is possible
     * to change the callback by using the ServiceReference.setCallback()
     * method. The object passed as the callback should implement the interface
     * defined for the callback, including any additional SCA semantics on that
     * interface such as its scope and whether or not it is remotable.
     */

I am getting the following error when I try to provide a custom callback using ServiceReference.setCallback().  I appears that the runtime has injected the client service as the callback rather then the user provided callback resulting in the following exception:

java.lang.IllegalArgumentException: java.lang.NoSuchMethodException: No matching method for operation callBack is found on class org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.impl.AServiceImpl
	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationProvider.createInvoker(JavaImplementationProvider.java:148)
	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addImplementationInterceptor(RuntimeWireImpl.java:315)
	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:188)
	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:109)
	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChain(RuntimeWireImpl.java:115)
	at org.apache.tuscany.sca.core.assembly.RuntimeComponentServiceImpl.getInvocationChain(RuntimeComponentServiceImpl.java:120)
	at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.getInvoker(RuntimeSCAReferenceBindingProvider.java:184)
	at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:197)
	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addReferenceBindingInterceptor(RuntimeWireImpl.java:228)
	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:167)
	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:109)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:243)
	at org.apache.tuscany.sca.core.invocation.JDKCallbackInvocationHandler.invoke(JDKCallbackInvocationHandler.java:91)
	at $Proxy27.callBack(Unknown Source)
	at org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.impl.BServiceImpl.testCallBack(BServiceImpl.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:615)
	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:109)
	at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:108)
	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
	at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:108)
	at org.apache.tuscany.sca.core.invocation.CallbackInterfaceInterceptor.invoke(CallbackInterfaceInterceptor.java:43)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:286)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
	at $Proxy26.testCallBack(Unknown Source)
	at org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.impl.AServiceImpl.testCallback(AServiceImpl.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:615)
	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:109)
	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:286)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
	at $Proxy11.testCallback(Unknown Source)
	at org.apache.tuscany.sca.vtest.javaapi.conversation.callback.CallbackTestCase.customCallback(CallbackTestCase.java:377)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	
The test org.apache.tuscany.sca.vtest.javaapi.conversation.callback.CallbackTestCase.customCallback() demostrates this issue and has been @Ignored




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


[jira] Assigned: (TUSCANY-2312) Runtime ignores custom callback when using setCallback()

Posted by "Simon Nash (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Nash reassigned TUSCANY-2312:
-----------------------------------

    Assignee: Simon Nash

> Runtime ignores custom callback when using setCallback()
> --------------------------------------------------------
>
>                 Key: TUSCANY-2312
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2312
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-Next
>            Reporter: Kevin Williams
>            Assignee: Simon Nash
>
> The Java CAA spec states:
>    /**
>      * Lines 728-732
>      * <p>
>      * By default, the client component of a service is assumed to be the
>      * callback service for the bidirectional service. However, it is possible
>      * to change the callback by using the ServiceReference.setCallback()
>      * method. The object passed as the callback should implement the interface
>      * defined for the callback, including any additional SCA semantics on that
>      * interface such as its scope and whether or not it is remotable.
>      */
> I am getting the following error when I try to provide a custom callback using ServiceReference.setCallback().  I appears that the runtime has injected the client service as the callback rather then the user provided callback resulting in the following exception:
> java.lang.IllegalArgumentException: java.lang.NoSuchMethodException: No matching method for operation callBack is found on class org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.impl.AServiceImpl
> 	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationProvider.createInvoker(JavaImplementationProvider.java:148)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addImplementationInterceptor(RuntimeWireImpl.java:315)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:188)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:109)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChain(RuntimeWireImpl.java:115)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeComponentServiceImpl.getInvocationChain(RuntimeComponentServiceImpl.java:120)
> 	at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.getInvoker(RuntimeSCAReferenceBindingProvider.java:184)
> 	at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:197)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addReferenceBindingInterceptor(RuntimeWireImpl.java:228)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:167)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:109)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:243)
> 	at org.apache.tuscany.sca.core.invocation.JDKCallbackInvocationHandler.invoke(JDKCallbackInvocationHandler.java:91)
> 	at $Proxy27.callBack(Unknown Source)
> 	at org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.impl.BServiceImpl.testCallBack(BServiceImpl.java)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:109)
> 	at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:108)
> 	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
> 	at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:108)
> 	at org.apache.tuscany.sca.core.invocation.CallbackInterfaceInterceptor.invoke(CallbackInterfaceInterceptor.java:43)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:286)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
> 	at $Proxy26.testCallBack(Unknown Source)
> 	at org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.impl.AServiceImpl.testCallback(AServiceImpl.java)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:109)
> 	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:286)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
> 	at $Proxy11.testCallback(Unknown Source)
> 	at org.apache.tuscany.sca.vtest.javaapi.conversation.callback.CallbackTestCase.customCallback(CallbackTestCase.java:377)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	
> The test org.apache.tuscany.sca.vtest.javaapi.conversation.callback.CallbackTestCase.customCallback() demostrates this issue and has been @Ignored

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


[jira] Resolved: (TUSCANY-2312) Runtime ignores custom callback when using setCallback()

Posted by "Simon Nash (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Nash resolved TUSCANY-2312.
---------------------------------

    Resolution: Fixed

Fixed in r666738 and r666740.

The commit for r666738 also includes a fix for a problem where a conversational service implementation that calls RequestContext.getServiceReference() was getting a CallableReference without a conversation object attached.

> Runtime ignores custom callback when using setCallback()
> --------------------------------------------------------
>
>                 Key: TUSCANY-2312
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2312
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-Next
>            Reporter: Kevin Williams
>            Assignee: Simon Nash
>
> The Java CAA spec states:
>    /**
>      * Lines 728-732
>      * <p>
>      * By default, the client component of a service is assumed to be the
>      * callback service for the bidirectional service. However, it is possible
>      * to change the callback by using the ServiceReference.setCallback()
>      * method. The object passed as the callback should implement the interface
>      * defined for the callback, including any additional SCA semantics on that
>      * interface such as its scope and whether or not it is remotable.
>      */
> I am getting the following error when I try to provide a custom callback using ServiceReference.setCallback().  I appears that the runtime has injected the client service as the callback rather then the user provided callback resulting in the following exception:
> java.lang.IllegalArgumentException: java.lang.NoSuchMethodException: No matching method for operation callBack is found on class org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.impl.AServiceImpl
> 	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationProvider.createInvoker(JavaImplementationProvider.java:148)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addImplementationInterceptor(RuntimeWireImpl.java:315)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:188)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:109)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChain(RuntimeWireImpl.java:115)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeComponentServiceImpl.getInvocationChain(RuntimeComponentServiceImpl.java:120)
> 	at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.getInvoker(RuntimeSCAReferenceBindingProvider.java:184)
> 	at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:197)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addReferenceBindingInterceptor(RuntimeWireImpl.java:228)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:167)
> 	at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:109)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:243)
> 	at org.apache.tuscany.sca.core.invocation.JDKCallbackInvocationHandler.invoke(JDKCallbackInvocationHandler.java:91)
> 	at $Proxy27.callBack(Unknown Source)
> 	at org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.impl.BServiceImpl.testCallBack(BServiceImpl.java)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:109)
> 	at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:108)
> 	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
> 	at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:108)
> 	at org.apache.tuscany.sca.core.invocation.CallbackInterfaceInterceptor.invoke(CallbackInterfaceInterceptor.java:43)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:286)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
> 	at $Proxy26.testCallBack(Unknown Source)
> 	at org.apache.tuscany.sca.vtest.javaapi.conversation.callback.custom.impl.AServiceImpl.testCallback(AServiceImpl.java)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:109)
> 	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:286)
> 	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
> 	at $Proxy11.testCallback(Unknown Source)
> 	at org.apache.tuscany.sca.vtest.javaapi.conversation.callback.CallbackTestCase.customCallback(CallbackTestCase.java:377)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	
> The test org.apache.tuscany.sca.vtest.javaapi.conversation.callback.CallbackTestCase.customCallback() demostrates this issue and has been @Ignored

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