tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r552344 - /incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/
Date Sun, 01 Jul 2007 17:44:55 GMT
Author: slaws
Date: Sun Jul  1 10:44:54 2007
New Revision: 552344

URL: http://svn.apache.org/viewvc?view=rev&rev=552344
Log:
Take account of distributed domain reorganization

Modified:
    incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingFactoryImpl.java
    incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingImpl.java
    incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingModuleActivator.java
    incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingProviderFactoryImpl.java
    incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingReferenceBindingProvider.java
    incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingServiceBindingProvider.java

Modified: incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingFactoryImpl.java?view=diff&rev=552344&r1=552343&r2=552344
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingFactoryImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingFactoryImpl.java
Sun Jul  1 10:44:54 2007
@@ -22,7 +22,8 @@
 import org.apache.tuscany.sca.assembly.SCABinding;
 import org.apache.tuscany.sca.assembly.SCABindingFactory;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.distributed.host.SCADomainNode;
+import org.apache.tuscany.sca.distributed.host.DistributedSCADomain;
+import org.apache.tuscany.sca.distributed.host.impl.DistributedSCADomainImpl;
 
 /**
  * A factory for the SCA binding model.
@@ -30,16 +31,16 @@
  * @version $Rev$ $Date$
  */
 public class SCABindingFactoryImpl implements SCABindingFactory {
-    private SCADomainNode domainNode;
+    private DistributedSCADomain domain;
     private ExtensionPointRegistry registry;
     
-    public SCABindingFactoryImpl(SCADomainNode domainNode,
+    public SCABindingFactoryImpl(DistributedSCADomain domain,
                                  ExtensionPointRegistry registry) {
-        this.domainNode = domainNode;
+        this.domain = domain;
         this.registry = registry;
     }
     public SCABinding createSCABinding() {     
-        return new SCABindingImpl(domainNode,
+        return new SCABindingImpl(domain,
                                   registry);
     }
     

Modified: incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingImpl.java?view=diff&rev=552344&r1=552343&r2=552344
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingImpl.java
Sun Jul  1 10:44:54 2007
@@ -30,15 +30,14 @@
 import org.apache.tuscany.sca.binding.jms.JMSBindingConstants;
 import org.apache.tuscany.sca.binding.jms.JMSBindingFactory;
 import org.apache.tuscany.sca.binding.jms.JMSBindingFactoryImpl;
-import org.apache.tuscany.sca.binding.jms.JMSBindingProviderFactory;
-import org.apache.tuscany.sca.binding.jms.JMSBindingServiceBindingProvider;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.distributed.assembly.DistributedSCABinding;
-import org.apache.tuscany.sca.distributed.host.SCADomainNode;
+import org.apache.tuscany.sca.distributed.host.DistributedSCADomain;
+import org.apache.tuscany.sca.distributed.host.impl.DistributedSCADomainImpl;
 import org.apache.tuscany.sca.distributed.node.ComponentRegistry;
+import org.apache.tuscany.sca.host.embedded.SCADomain;
 import org.apache.tuscany.sca.policy.Intent;
 import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint;
 
 /**
  * Represents an SCA binding.
@@ -52,7 +51,7 @@
     private List<Intent> requiredIntents = new ArrayList<Intent>();
     private List<Object> extensions = new ArrayList<Object>();
     private boolean isDistributed = false;
-    private SCADomainNode domainNode;
+    private DistributedSCADomain domain;
     private ExtensionPointRegistry registry;
     private ComponentRegistry componentRegistry;
     
@@ -61,14 +60,14 @@
     /**
      * Constructs a new SCA binding.
      */
-    public SCABindingImpl(SCADomainNode domainNode,
+    public SCABindingImpl(DistributedSCADomain domain,
                           ExtensionPointRegistry registry) {
-        this.domainNode = domainNode;
+        this.domain = domain;
         this.registry = registry;
         
-        if (domainNode != null) {
+        if ((domain != null) && (domain.getNodeDomain() != null)) {
             // get the ComponentRegistry
-            this.componentRegistry = domainNode.getNodeService(ComponentRegistry.class, "ComponentRegistry");
+            this.componentRegistry = domain.getNodeDomain().getService(ComponentRegistry.class,
"ComponentRegistry");
         }
     }
     
@@ -156,7 +155,7 @@
         SCABinding serviceSCABinding = service.getBinding(SCABinding.class);
         Component targetComponent = serviceSCABinding.getComponent();
         String serviceName = targetComponent.getName();            
-        String serviceNode = componentRegistry.getComponentNode(targetComponent.getName());
+        String serviceNode = componentRegistry.getComponentNode(domain.getURI(), targetComponent.getName());
         
       
         // set the destination queue to the target service name
@@ -168,7 +167,7 @@
         jmsBinding.setDestinationCreate(JMSBindingConstants.CREATE_ALLWAYS);
         
         // get the reference information
-        String referenceNode = componentRegistry.getComponentNode(component.getName());
+        String referenceNode = componentRegistry.getComponentNode(domain.getURI(), component.getName());
       
         // set the response queue name to this reference
         jmsBinding.setResponseDestinationName(referenceNode +
@@ -203,7 +202,7 @@
         // get the service information
         
         String serviceName = service.getName();            
-        String serviceNode = componentRegistry.getComponentNode(component.getName());
+        String serviceNode = componentRegistry.getComponentNode(domain.getURI(), component.getName());
         
       
         // set the destination queue to the target service name

Modified: incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingModuleActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingModuleActivator.java?view=diff&rev=552344&r1=552343&r2=552344
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingModuleActivator.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingModuleActivator.java
Sun Jul  1 10:44:54 2007
@@ -27,7 +27,9 @@
 import org.apache.tuscany.sca.core.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.core.ModuleActivator;
 import org.apache.tuscany.sca.distributed.assembly.DistributedSCABinding;
-import org.apache.tuscany.sca.distributed.host.SCADomainNode;
+import org.apache.tuscany.sca.distributed.core.DistributedSCADomainExtensionPoint;
+import org.apache.tuscany.sca.distributed.host.DistributedSCADomain;
+import org.apache.tuscany.sca.distributed.host.impl.DistributedSCADomainImpl;
 import org.apache.tuscany.sca.provider.BindingProviderFactory;
 import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint;
 
@@ -46,17 +48,17 @@
     public void start(ExtensionPointRegistry registry) {
         
         // get the local domain from the extension registry
-        SCADomainNode domainNode = registry.getExtensionPoint(SCADomainNode.class);
+        DistributedSCADomain domain = (DistributedSCADomain)registry.getExtensionPoint(DistributedSCADomainExtensionPoint.class);
         
         // Create the SCA binding model factory
-        SCABindingFactory bindingFactory = new SCABindingFactoryImpl(domainNode, registry);
+        SCABindingFactory bindingFactory = new SCABindingFactoryImpl(domain, registry);
         
         // add binding gactory to the factories list
         ModelFactoryExtensionPoint factories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
         factories.addFactory(bindingFactory);
 
         // Add the SCABindingProviderFactory extension
-        BindingProviderFactory<DistributedSCABinding> providerFactory = new SCABindingProviderFactoryImpl(domainNode,
registry);
+        BindingProviderFactory<DistributedSCABinding> providerFactory = new SCABindingProviderFactoryImpl(domain,
registry);
         
         ProviderFactoryExtensionPoint providerFactories = registry.getExtensionPoint(ProviderFactoryExtensionPoint.class);
         providerFactories.addProviderFactory(providerFactory);

Modified: incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingProviderFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingProviderFactoryImpl.java?view=diff&rev=552344&r1=552343&r2=552344
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingProviderFactoryImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingProviderFactoryImpl.java
Sun Jul  1 10:44:54 2007
@@ -19,10 +19,9 @@
 
 package org.apache.tuscany.sca.binding.sca;
 
-import org.apache.tuscany.sca.assembly.SCABinding;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.distributed.assembly.DistributedSCABinding;
-import org.apache.tuscany.sca.distributed.host.SCADomainNode;
+import org.apache.tuscany.sca.distributed.host.DistributedSCADomain;
 import org.apache.tuscany.sca.provider.BindingProviderFactory;
 import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
 import org.apache.tuscany.sca.provider.ServiceBindingProvider;
@@ -35,25 +34,25 @@
  */
 public class SCABindingProviderFactoryImpl implements BindingProviderFactory<DistributedSCABinding>
{
     
-    private SCADomainNode domainNode;
+    private DistributedSCADomain domain;
     private ExtensionPointRegistry registry;
     
-    public SCABindingProviderFactoryImpl(SCADomainNode domainNode,
+    public SCABindingProviderFactoryImpl(DistributedSCADomain domain,
                                          ExtensionPointRegistry registry) {
-        this.domainNode = domainNode;
+        this.domain = domain;
         this.registry = registry;
     }
 
     public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component,
                                                                    RuntimeComponentReference
reference,
                                                                    DistributedSCABinding
binding) {       
-        return new SCABindingReferenceBindingProvider(registry, domainNode, component, reference,
binding);
+        return new SCABindingReferenceBindingProvider(registry, domain, component, reference,
binding);
     }
 
     public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component,
                                                                RuntimeComponentService service,
                                                                DistributedSCABinding binding)
{        
-        return new SCABindingServiceBindingProvider(registry, domainNode, component, service,
binding);
+        return new SCABindingServiceBindingProvider(registry, domain, component, service,
binding);
     }
 
     public Class<DistributedSCABinding> getModelType() {

Modified: incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingReferenceBindingProvider.java?view=diff&rev=552344&r1=552343&r2=552344
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingReferenceBindingProvider.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingReferenceBindingProvider.java
Sun Jul  1 10:44:54 2007
@@ -32,7 +32,7 @@
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.core.runtime.ActivationException;
 import org.apache.tuscany.sca.distributed.assembly.DistributedSCABinding;
-import org.apache.tuscany.sca.distributed.host.SCADomainNode;
+import org.apache.tuscany.sca.distributed.host.DistributedSCADomain;
 import org.apache.tuscany.sca.distributed.node.ComponentRegistry;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.Operation;
@@ -53,7 +53,7 @@
 public class SCABindingReferenceBindingProvider implements ReferenceBindingProvider {
     
     private ExtensionPointRegistry registry;      
-    private SCADomainNode domainNode;
+    private DistributedSCADomain domain;
     private RuntimeComponent component;
     private RuntimeComponentReference reference;
     private DistributedSCABinding binding;
@@ -62,12 +62,12 @@
     private JMSBindingReferenceBindingProvider jmsReferenceProvider = null;
     
     public SCABindingReferenceBindingProvider(ExtensionPointRegistry registry,
-                                              SCADomainNode domainNode,
+                                              DistributedSCADomain domain,
                                               RuntimeComponent component, 
                                               RuntimeComponentReference reference, 
                                               DistributedSCABinding binding) {
         this.registry  = registry;
-        this.domainNode= domainNode;
+        this.domain = domain;
         this.component = component;
         this.reference = reference;
         this.binding   = binding;

Modified: incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingServiceBindingProvider.java?view=diff&rev=552344&r1=552343&r2=552344
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingServiceBindingProvider.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/SCABindingServiceBindingProvider.java
Sun Jul  1 10:44:54 2007
@@ -29,7 +29,7 @@
 import org.apache.tuscany.sca.binding.jms.JMSBindingServiceBindingProvider;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.distributed.assembly.DistributedSCABinding;
-import org.apache.tuscany.sca.distributed.host.SCADomainNode;
+import org.apache.tuscany.sca.distributed.host.DistributedSCADomain;
 import org.apache.tuscany.sca.distributed.node.ComponentRegistry;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint;
@@ -44,8 +44,8 @@
  */
 public class SCABindingServiceBindingProvider implements ServiceBindingProvider {
 
-    ExtensionPointRegistry registry;      
-    SCADomainNode domainNode;
+    private ExtensionPointRegistry registry;      
+    private DistributedSCADomain domain;
     private RuntimeComponent component;
     private RuntimeComponentService service;
     private DistributedSCABinding binding;
@@ -54,12 +54,12 @@
     private JMSBindingServiceBindingProvider jmsServiceProvider = null;    
   
     public SCABindingServiceBindingProvider(ExtensionPointRegistry registry,
-                                            SCADomainNode domainNode,
+                                            DistributedSCADomain domain,
                                             RuntimeComponent component,
                                             RuntimeComponentService service,
                                             DistributedSCABinding binding) {
         this.registry  = registry;
-        this.domainNode= domainNode;        
+        this.domain    = domain;        
         this.component = component;
         this.service   = service;
         this.binding   = binding;



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


Mime
View raw message