[ 
https://issues.apache.org/jira/browse/TUSCANY-1876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573566#action_12573566
 ] 

Raymond Feng commented on TUSCANY-1876:
---------------------------------------

The proxy lazily report the non-exisiting target. Is it violating the SCA spec?

> @Reference(required=false) ignored
> ----------------------------------
>
>                 Key: TUSCANY-1876
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1876
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-1.0
>         Environment: Ubuntu 7.10, Gutsy Gibbon
> Sun JDK version 1.5.0_13
>            Reporter: Olivier Abdoun
>             Fix For: Java-SCA-Next
>
>         Attachments: optionalreference.tar.gz
>
>
> When specifying @Reference(required=false) and providing no reference for the 
> component in the composite, a proxy is injected in the component and next 
> call to the component fails with:
> org.osoa.sca.ServiceUnavailableException: No service invoker is available for 
> reference foo (bindingURI=null operation=getFoo).
>       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:190)
>       at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:124)
>       at $Proxy6.getFoo(Unknown Source)
>       at foo.Baz.getBar(Baz.java:20)
>       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.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:233)
>       at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:130)
>       at $Proxy5.getBar(Unknown Source)
>       at 
> foo.OptionalReferenceTestCase.testOptionalReference(OptionalReferenceTestCase.java:13)
>       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)
>       at 
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
>       at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

-- 
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]

Reply via email to