summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-03-02 11:14:10 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-03-02 11:14:10 +0000
commita0bab15571fa93dd8015ad44039f08865b96c6b7 (patch)
tree6df9f35c9028e9080fc27e8d9291b1999bee5c3b
parent2d24e43a1f4b73cd759ff7f693179654a2daea30 (diff)
Get rid of some old comments
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@749273 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java162
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java3
2 files changed, 1 insertions, 164 deletions
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java
index 4e2bb11975..dc99d1dc3d 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java
@@ -665,167 +665,7 @@ public class ComponentReferenceWireBuilderImpl extends BaseBuilderImpl implement
} else {
// do nothing as no targets have been specified so the bindings
// in the reference binding list are assumed to be manually configured
- }
-
-
-/*
- // Select the reference bindings matching the target service bindings
- List<Binding> selectedBindings = new ArrayList<Binding>();
- List<Binding> selectedCallbackBindings = null;
-
- // Handle callback
- boolean bidirectional = false;
-
- if (componentReference.getInterfaceContract() != null && componentReference.getInterfaceContract().getCallbackInterface() != null) {
- bidirectional = true;
- selectedCallbackBindings = new ArrayList<Binding>();
- }
-
- for (Target target : targets) {
-
- Component targetComponent = target.getComponent();
- ComponentService targetComponentService = target.getService();
- if (targetComponentService.getService() instanceof CompositeService) {
- CompositeService compositeService = (CompositeService) targetComponentService.getService();
- // Find the promoted component service
- targetComponentService = ServiceConfigurationUtil.getPromotedComponentService(compositeService);
- }
-
- try {
- PolicyConfigurationUtil.determineApplicableBindingPolicySets(componentReference, targetComponentService);
- } catch ( Exception e ) {
- warning("Policy related exception: " + e, e);
- //throw new RuntimeException(e);
- }
-
- // Match the binding against the bindings of the target service
- Binding selected = BindingConfigurationUtil.resolveBindings(componentReference, targetComponent, targetComponentService);
- if (selected == null) {
- warning("NoMatchingBinding", componentReference, componentReference.getName(), targetComponentService.getName());
- } else {
- selectedBindings.add(selected);
- }
- if (bidirectional) {
- Binding selectedCallback = BindingConfigurationUtil.resolveCallbackBindings(componentReference, targetComponent, targetComponentService);
- if (selectedCallback != null) {
- selectedCallbackBindings.add(selectedCallback);
- }
- }
- }
-*/
-
- // Need to tidy up the reference binding list and add in the bindings that
- // have been selected above. The situation so far...
- // Wired reference (1 or more targets are specified)
- // Binding.uri = null - remove as it's left over from target resolution
- // the binding will have been moved to the target from where
- // it will be resolved later
- // Binding.uri != null - the selected and resolved reference binding
- // Unwired reference (0 targets)
- // Binding.uri = null - Either a callback reference or the reference is yet to be wired
- // by the implementation so leave the binding where it is
- // Binding.uri != null - from the composite file so leave it
-/*
- if ((componentReference.getTargets().size() > 0) ||
- (!targets.isEmpty())) {
-
- // Add all the effective bindings
- componentReference.getBindings().clear();
- componentReference.getBindings().addAll(selectedBindings);
- if (bidirectional) {
- componentReference.getCallback().getBindings().clear();
- componentReference.getCallback().getBindings().addAll(selectedCallbackBindings);
- }
-
- // add in sca bindings to represent all unresolved targets. The sca binding
- // will try to resolve the target at a later date.
- for (ComponentService service : componentReference.getTargets()) {
- if (service.isUnresolved()) {
- SCABinding scaBinding = null;
-
- // find the sca binding amongst the candidate binding list. We want to
- // find this one and clone it as it may have been configured with
- // policies
- for (Binding binding : service.getBindings()) {
-
- if (binding instanceof SCABinding) {
- try {
- scaBinding = (SCABinding)((OptimizableBinding)binding).clone();
- } catch (CloneNotSupportedException ex){
- // we know it is supported on the SCA binding
- }
- break;
- }
- }
-
- if (scaBinding != null) {
- // configure the cloned SCA binding for this reference target
- scaBinding.setName(service.getName());
-
- // this service object holds the list of candidate bindings which
- // can be used for later matching
- ((OptimizableBinding)scaBinding).setTargetComponentService(service);
- componentReference.getBindings().add(scaBinding);
- } else {
- // not sure we need to raise a warning here as a warning will already been
- // thrown previously to indicate the reason why there is no sca binding
- // warning("NoSCABindingAvailableForUnresolvedService", componentReference, componentReference.getName(), service.getName());
- }
- }
- }
- }
-
-*/
- // Connect the optimizable bindings to their target component and
- // service
-/*
- for (Binding binding : componentReference.getBindings()) {
- if (!(binding instanceof OptimizableBinding)) {
- continue;
- }
- OptimizableBinding optimizableBinding = (OptimizableBinding)binding;
- if (optimizableBinding.getTargetComponentService() != null) {
- continue;
- }
- String uri = optimizableBinding.getURI();
- if (uri == null) {
- continue;
- }
- uri = URI.create(uri).getPath();
- if (uri.startsWith("/")) {
- uri = uri.substring(1);
- }
-
- // Resolve the target component and service
- ComponentService targetComponentService = componentServices.get(uri);
- Component targetComponent;
- int s = uri.indexOf('/');
- if (s == -1) {
- targetComponent = components.get(uri);
- } else {
- targetComponent = components.get(uri.substring(0, s));
- }
-
- if (targetComponentService != null) {
-
- // Check that the target component service provides
- // a superset of the component reference interface
- if (componentReference.getInterfaceContract() == null ||
- interfaceContractMapper.isCompatible(componentReference.getInterfaceContract(), targetComponentService.getInterfaceContract())) {
-
- } else {
- warning("ReferenceIncompatibleInterface",
- composite,
- composite.getName().toString(),
- componentReference.getName(),
- uri);
- }
- optimizableBinding.setTargetComponent(targetComponent);
- optimizableBinding.setTargetComponentService(targetComponentService);
- optimizableBinding.setTargetBinding(targetComponentService.getBinding(optimizableBinding.getClass()));
- }
- }
-*/
+ }
}
}
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java
index 7fdad726ca..b608bc336c 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java
@@ -223,9 +223,6 @@ public class CompositeBuilderImpl implements CompositeBuilder {
// Build component reference binding-related information
componentReferenceBindingBuilder.build(composite, definitions, monitor);
- // Fuse nested composites
- //FIXME do this later
- //cloneBuilder.fuseCompositeImplementations(composite);
}
}