To support <reference target > for SCA Binding using URI on r558780 -------------------------------------------------------------------
Key: TUSCANY-1633 URL: https://issues.apache.org/jira/browse/TUSCANY-1633 Project: Tuscany Issue Type: Bug Components: Java SCA Assembly Model Environment: Windows Reporter: Yang Lei We assume we can use SCA binding 's URI for its target service. We see the following problems: 1. When there is a SCABinding element under the reference or we are trying to create one when there is none, the URI is not set. So added a else block to the following code in CompositeBuilderImpl,matchBinding method: if (binding instanceof WireableBinding) { ..... } else { //use terget serviceBinding's URI as referece's binding URI //This is to support reference target if (cloned instanceof SCABinding && cloned.getURI() == null) { cloned.setURI(serviceBinding.getURI()); } } 2. When there is a SCABinding element defined on service side, URI is not set we need to add the else block: // Create and configure an SCA binding for the service if (componentService.getBindings().isEmpty()) { SCABinding scaBinding = componentService.getBinding(SCABinding.class); if (scaBinding == null) { scaBinding = scaBindingFactory.createSCABinding(); scaBinding.setName(componentService.getName()); componentService.getBindings().add(scaBinding); } scaBinding.setComponent(component); scaBinding.setURI(uri); }else { SCABinding scaBinding = componentService.getBinding(SCABinding.class); if (scaBinding != null && scaBinding.getURI()==null) { scaBinding.setURI(uri); } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]