@Service{interfaces={interface1, interface2}} does not work
-----------------------------------------------------------
Key: TUSCANY-301
URL: http://issues.apache.org/jira/browse/TUSCANY-301
Project: Tuscany
Type: Bug
Components: Java SCA Core
Versions: M1
Reporter: Jean-Sebastien Delfino
Fix For: M1
Attachments:
org.apache.tuscany.samples.helloworldmc.HelloWorldServiceComponentTestCase.txt
@Service should allow you to specify multiple interfaces. This is supported by
org.osoa.sca.Service but if you specify more than one interface on a service
the runtime throws an exception.
To reproduce the problem add the following to a component:
@Service(interfaces={GreetingPortionProvider.class,
GreetingPortionProvider2.class})
Then wire two references using each of these two interfaces to the component.
You will get the following exception:
org.apache.tuscany.core.builder.BuilderConfigException: Incompatible source and
target interface types for reference [greetingSuffix]
Context stack trace:
[tuscany.root][test][test][HelloWorldServiceComponent][GreetingSuffixComponent][tuscany.root]
at
org.apache.tuscany.core.builder.impl.DefaultWireBuilder.connect(DefaultWireBuilder.java:64)
at
org.apache.tuscany.core.runtime.RuntimeContextImpl.connect(RuntimeContextImpl.java:166)
at
org.apache.tuscany.core.context.impl.AbstractCompositeContext.connect(AbstractCompositeContext.java:792)
at
org.apache.tuscany.core.context.impl.AbstractCompositeContext.wireSource(AbstractCompositeContext.java:592)
at
org.apache.tuscany.core.context.impl.AbstractCompositeContext.start(AbstractCompositeContext.java:164)
at
org.apache.tuscany.core.context.scope.CompositeScopeContext.registerFactory(CompositeScopeContext.java:95)
at
org.apache.tuscany.core.context.impl.AbstractCompositeContext.registerConfiguration(AbstractCompositeContext.java:473)
at
org.apache.tuscany.core.context.impl.AbstractCompositeContext.registerModelObject(AbstractCompositeContext.java:420)
at
org.apache.tuscany.core.client.BootstrapHelper.registerModule(BootstrapHelper.java:133)
at
org.apache.tuscany.core.client.TuscanyRuntime.<init>(TuscanyRuntime.java:103)
at
org.apache.tuscany.core.client.TuscanyRuntime.<init>(TuscanyRuntime.java:67)
at
org.apache.tuscany.samples.helloworldmc.HelloWorldServiceComponentTestCase.testGeetings(HelloWorldServiceComponentTestCase.java:32)
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 junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
To reproduce the problem use the attached test case.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira