On Mon, Aug 8, 2011 at 2:56 PM, Greg Dritschler <greg.dritsch...@gmail.com> wrote: > I have the following test case: > Composite A: > - is deployable > - has a component reference with a reference target pointing to some > top-level component outside of A > - does not promote the component reference > Composite B: > - is deployable > - reuses composite A as the implementation of a component > B fails because, when A is used within the context of B, the reference > target is not found within A. > I think it is correct that this is an error, but given some of the > discussion lately about implementation.composite, I'd like a second opinion. > Assembly says > 1880 For a composite used as a component implementation, wires can only link > sources and targets that are > 1881 contained in the same composite > The error happens to be discovered at the time the reference is invoked > (from within the context of B). > "Unable to bind [] - No endpoints found in the domain that match the > reference" > It seems like it could be detected at build time. > Greg
I think you're right that this is a valid error (although given the recent discussion I defer to Mike for the final answer). As part of the async model changes a while back we did include some code to allow for build time reference checking, see DeployerImpl.buildTimeReferenceBind(), however I think that if it doesn't find it at build time it just assumes that it will find it at run time. Which of course it shouldn't in your scenario. If we want to trap the error at build time we need to add so extra code to make the build time check fail in all but the top level case. Can you raise a JIRA. Thanks Simon -- Apache Tuscany committer: tuscany.apache.org Co-author of a book about Tuscany and SCA: tuscanyinaction.com