You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Mark Combellack (JIRA)" <tu...@ws.apache.org> on 2007/10/19 11:36:51 UTC

[jira] Commented: (TUSCANY-1859) Exception when using wires to wire Components

    [ https://issues.apache.org/jira/browse/TUSCANY-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536159 ] 

Mark Combellack commented on TUSCANY-1859:
------------------------------------------

This problem is caused by the references not being built correctly for the wires. It is an assembly time problem caused by CompositeWireBuilderImpl creating the references before the wires.

The original code is:

         // Connect component references to their targets
         connectComponentReferences(composite, components, componentServices, componentReferences);
 
         // Connect component references as described in wires
         connectWires(composite, componentServices, componentReferences);


The fix is to swap the order of the above method calls and connect the wires before connecting the references. The fixed code is:

         // Connect component references as described in wires
         connectWires(composite, componentServices, componentReferences);

         // Connect component references to their targets
         connectComponentReferences(composite, components, componentServices, componentReferences);


I've attached WireFix.patch that does the above fix.

> Exception when using wires to wire Components
> ---------------------------------------------
>
>                 Key: TUSCANY-1859
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1859
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-1.0
>         Environment: Tuscany SVN Head 585955
> Linux
>            Reporter: Mark Combellack
>             Fix For: Java-SCA-Next
>
>         Attachments: WireFix.patch, WiresITest.patch
>
>
> The SCA specification allows components to be connected together using a wire in the .composite file (Assembly specification section 1.6.4 lines 1576 to 1848)
> If I use <wire> in the .composite file, I get the following exception at runtime:
> org.osoa.sca.ServiceUnavailableException: No service invoker is available for reference aWireService (bindingURI=null operation=sayHello).
>   at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:192)
>   at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addBindingInterceptor(RuntimeWireImpl.java:214)
>   at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:156)
>   at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:97)
>   at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:189)
>   at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:123)
>   at $Proxy7.sayHello(Unknown Source)
>   at org.apache.tuscany.sca.itest.WireClientImpl.runTests(WireClientImpl.java:46)
>   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:105)
>   at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:49)
>   at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:232)
>   at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:129)
>   at $Proxy6.runTests(Unknown Source)
>   at org.apache.tuscany.sca.itest.WireTestCase.testWire(WireTestCase.java:46)
>   ...

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org