Cannot invoke method on Service that implements multiple @Remotable interfaces
with methods of the same name
------------------------------------------------------------------------------------------------------------
Key: TUSCANY-2180
URL: https://issues.apache.org/jira/browse/TUSCANY-2180
Project: Tuscany
Issue Type: Bug
Components: Java SCA Core Runtime
Affects Versions: Java-SCA-1.1
Environment: SVN Revision 643322
Linux
Reporter: Mark Combellack
Assignee: Mark Combellack
Fix For: Java-SCA-Next
When a Component implementation class implements multiple @Remotable interfaces
which have methods with the same name, it is not possible to invoke the
duplicate method name on the second Remotable interrface.
Consider the following example:
I have two @Remotable services as defined by the following Java interfaces:
@Remotable
public interface LocalTimeService {
Date getCurrentTime();
}
@Remotable
public interface WorldTimeService {
Date getCurrentTime(String timeZone);
}
I have a single Java Component that implements both of these @Remotable
Interfaces:
@Service(interfaces = {LocalTimeService.class, WorldTimeService.class})
public void class TimeServiceImpl implements LocalTimeService, WorldTimeService
{
public Date getCurrentTime() {
// Code not shown
}
public Date getCurrentTime(String timeZone) {
// Code not shown
}
}
If I invoke getCurrentTime(), the code will work
If I invoke getCurrentTime("GMT"), the code will fail. The stack trace is:
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.JDKInvocationHandler.invoke(JDKInvocationHandler.java:266)
at
org.apache.tuscany.sca.core.invocation.JDKCallbackInvocationHandler.invoke(JDKCallbackInvocationHandler.java:101)
at $Proxy20.getCurrentTime(Unknown Source)
at <detail removed>.test(BServiceImpl.java:41)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]