You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Bert Lamb <al...@pobox.com> on 2007/02/16 22:24:50 UTC

[SCA Java M2] Should Reference multiplicity be working?

In looking at the 0.95 Java C&I spec (and it looks to be done the same
way in the draft 1.0 spec) I see that it should be possible to have
multiple references collected up in a list using an annotation such as
the following:

@Reference(name="helloService", required=true)
public List<HelloService> helloServices;

However attempting this gives me the following error:

org.apache.tuscany.spi.builder.BuilderConfigException: Incompatible
source and target interfaces
Context stack trace: [application][ClientComponent]
	at org.apache.tuscany.core.builder.ConnectorImpl.checkIfWireable(ConnectorImpl.java:451)
	at org.apache.tuscany.core.builder.ConnectorImpl.connect(ConnectorImpl.java:381)
	at org.apache.tuscany.core.builder.ConnectorImpl.connect(ConnectorImpl.java:101)
	at org.apache.tuscany.spi.extension.CompositeComponentExtension.prepare(CompositeComponentExtension.java:460)
	at org.apache.tuscany.core.deployer.DeployerImpl.deploy(DeployerImpl.java:86)
	at org.apache.tuscany.core.launcher.LauncherImpl.bootApplication(LauncherImpl.java:195)
	at org.apache.tuscany.test.SCATestCase.setUp(SCATestCase.java:65)
	at scademo.ClientServiceImplTest.setUp(ClientServiceImplTest.java:13)
	at junit.framework.TestCase.runBare(TestCase.java:125)
	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:128)
	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)
Caused by: org.apache.tuscany.spi.wire.IncompatibleServiceContractException:
Operation not found on target [hashCode]
	at org.apache.tuscany.spi.wire.WireServiceExtension.checkCompatibility(WireServiceExtension.java:75)
	at org.apache.tuscany.core.builder.ConnectorImpl.checkIfWireable(ConnectorImpl.java:448)
	... 20 more

Should this be working in M2?  Is this broken or is multiplicity per
the spec not supported at this time?

-Bert

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: [SCA Java M2] Should Reference multiplicity be working?

Posted by Raymond Feng <en...@gmail.com>.
Hi,

I added basic support in the code already a few weeks ago. You can annotate 
the reference like:

@Reference
MyInterface[] refs;

or

@Reference
java.lang.Collection refs;

Thanks,
Raymond

----- Original Message ----- 
From: "Jim Marino" <jm...@myromatours.com>
To: <tu...@ws.apache.org>
Sent: Friday, February 16, 2007 1:33 PM
Subject: Re: [SCA Java M2] Should Reference multiplicity be working?


> >
>> Should this be working in M2?  Is this broken or is multiplicity per
>> the spec not supported at this time?
>>
>> -Bert
>>
> Hi Bert,
>
> It's not supported in M2. This is something I'd like to get in as we 
> change over to support federated deployment in the next release. We  are 
> actively working on some changes to core which will make this  easier to 
> support, particularly in the autowire case (a new SCA  feature proposed by 
> Tuscany and accepted as part of the 1.0 specs :-) )
>
> Jim
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: [SCA Java M2] Should Reference multiplicity be working?

Posted by Luciano Resende <lu...@gmail.com>.
There is also a JIRA around this :
http://issues.apache.org/jira/browse/TUSCANY-912

-- 
Luciano Resende
http://people.apache.org/~lresende

On 2/16/07, Jim Marino <jm...@myromatours.com> wrote:
>
> >
> > Should this be working in M2?  Is this broken or is multiplicity per
> > the spec not supported at this time?
> >
> > -Bert
> >
> Hi Bert,
>
> It's not supported in M2. This is something I'd like to get in as we
> change over to support federated deployment in the next release. We
> are actively working on some changes to core which will make this
> easier to support, particularly in the autowire case (a new SCA
> feature proposed by Tuscany and accepted as part of the 1.0 specs :-) )
>
> Jim
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>

Re: [SCA Java M2] Should Reference multiplicity be working?

Posted by Jim Marino <jm...@myromatours.com>.
>
> Should this be working in M2?  Is this broken or is multiplicity per
> the spec not supported at this time?
>
> -Bert
>
Hi Bert,

It's not supported in M2. This is something I'd like to get in as we  
change over to support federated deployment in the next release. We  
are actively working on some changes to core which will make this  
easier to support, particularly in the autowire case (a new SCA  
feature proposed by Tuscany and accepted as part of the 1.0 specs :-) )

Jim


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org