On Tue, Jun 10, 2008 at 12:01 PM, Simon Laws <[EMAIL PROTECTED]> wrote:
> I'm looking at TUSCANY-2352 (which I raised when I was doing some policy > testing). The issue is that promoted service bindings aren't augmented with > the composite service bindings that promote them. Looking at the > BaseWireBuilderImpl code there is a method called > reconcileReferenceBindings() that does this job for references. There > doesn't appear to be the equivalent for services though. I'm going to go > ahead and add something like a reconcileServiceBindings() method unless > someone can point me at the code that already tries to do this or explain > why we apparently only do this on the reference side? > > Regards > > Simon > I have found the method BaseConfigurationBuilderImpl.configureNestedCompositeServices() that is taking the composite service bindings and creating a new "promoted" service in the promoted component to hold them. This doesn't get called until after references and services have been matched though which is too late for the EndpointBuilder to use the composite service bindings for reference/service matching. The order of calls in the top level CompositeBuilder is; // Collect and fuse includes compositeIncludeBuilder.build(composite); // Expand nested composites compositeCloneBuilder.build(composite); // Configure all components componentConfigurationBuilder.build(composite); // Wire the components componentWireBuilder.build(composite); // Configure composite services compositeServiceConfigurationBuilder.build(composite); // Wire the composite references compositeReferenceWireBuilder.build(composite); The service binding resolution happens in compositeServiceConfigurationBuilder.build(composite); So slightly different question. Anyone know why compositeServiceConfigurationBuilder comes after componentWireBuilder? Simon