Should using ComponentContext createSelfReference getService automatically
create a proxy implementing the service interface?

If I change the script HelloWorld testcase [1] to go directly to a script
component instead of a java component (ie
SCARuntime.getComponentContext("HelloWorldJSComponent"))
it fails with a class cast exception as helloWorld = service.getService()
doesn't return an instance of the HelloWorld interface.

This ends up in AtomicComponentExtension createObjectFactory  which has a
comment:
       // FIXME: Is it the correct way to create an ObjectFactory for
itself?

Should this be working yet? Is it the runtime's or implementation
extension's responsibility to be creating the proxy?

  ...ant

[1]
https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/implementation-script/src/test/java/org/apache/tuscany/implementation/script/itests/javascript/HelloWorldTestCase.java

Reply via email to