On Sep 5, 2006, at 4:03 PM, Raymond Feng wrote:

Hi,

We simply test if sourceInterfaceClass.isAssignableFrom (targetInterfaceClass) in the ConnectorImpl to decide if a source can be wired to a target. I'm getting a BuilderConfigException if I try to wire a reference to a component with a compatible interface defined by the SCA spec. A similar problem (Java vs.WSDL) was reported by Scott in the JIRA issue TUSCANY-686.

org.apache.tuscany.spi.builder.BuilderConfigException: Incompatible source and target interfaces at org.apache.tuscany.core.builder.ConnectorImpl.connect (ConnectorImpl.java:331) at org.apache.tuscany.core.builder.ConnectorImpl.connect (ConnectorImpl.java:116) at org.apache.tuscany.core.implementation.composite.AbstractCompositeComp onent.prepare(AbstractCompositeComponent.java:244) at org.apache.tuscany.core.deployer.DeployerImpl.deploy (DeployerImpl.java:86) at org.apache.tuscany.core.launcher.LauncherImpl.bootApplication (LauncherImpl.java:193)
 at org.apache.tuscany.test.SCATestCase.setUp(SCATestCase.java:65)
 at echo.BootstrapTestCase.setUp(BootstrapTestCase.java:41)
...
Yea that was a shortcut I took for the time being
I'm adding the following two methods to the ServiceContract and Operation models to implement the algorithm (I feel it should be different than equals()). But I wonder if they should be hosted by something else like "WireService". Any opinions?

boolean isCompatibleTarget(ServiceContract<?> targetServiceContract);

boolean isCompatibleTarget(Operation<?> operation);

Another interesting thing is that how databinding transformation will change the "compatiblity" story. Does it make sense to say "two operations are compatible if the they have the same name and input/output/fault types can be transformed from one to the other"? I guess the answer could impact the SCA spec.
I would prefer to add them to something other than model objects as the model should not contain behavior. Wire service seems fine. When you add them, would you mind also including a battery of unit tests for the spec algorithm as well?

Thx!
Jim

Thanks,
Raymond




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to