tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r573886 - in /incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl: ContributionManagerImpl.java NodeImpl.java
Date Sat, 08 Sep 2007 18:05:19 GMT
Author: antelder
Date: Sat Sep  8 11:05:19 2007
New Revision: 573886

URL: http://svn.apache.org/viewvc?rev=573886&view=rev
Log:
Change add method to also do the start, change NodeImpl to support classloaders's with nodes

Modified:
    incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/ContributionManagerImpl.java
    incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/NodeImpl.java

Modified: incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/ContributionManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/ContributionManagerImpl.java?rev=573886&r1=573885&r2=573886&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/ContributionManagerImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/ContributionManagerImpl.java
Sat Sep  8 11:05:19 2007
@@ -147,22 +147,6 @@
     	}
     }
 
-    public void startContributionJAR(URL contributionJAR) throws ActivationException, ContributionException,
-        IOException, CompositeBuilderException {
-
-        if (contribution == null) {
-            addContributionJAR(contributionJAR);
-        }
-
-        if (contribution != null) {
-            for (Composite composite : contribution.getDeployables()) {
-                nodeRuntime.getCompositeActivator().start(composite);
-            }
-        } else {
-            throw new ActivationException("Contribution " + contributionLocation + " not
added");
-        }
-    }
-
     public void addContributionJAR(URL contributionJar) throws CompositeBuilderException,
ActivationException {
 
         ContributionService contributionService = nodeRuntime.getContributionService();
@@ -178,6 +162,11 @@
         // activate all of the composites just loaded
         for (Composite composite : contribution.getDeployables()) {
             nodeRuntime.getCompositeActivator().activate(composite);
+        }
+
+        // start all the composites just loaded
+        for (Composite composite : contribution.getDeployables()) {
+            nodeRuntime.getCompositeActivator().start(composite);
         }
     }
 

Modified: incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/NodeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/NodeImpl.java?rev=573886&r1=573885&r2=573886&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/NodeImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/NodeImpl.java
Sat Sep  8 11:05:19 2007
@@ -71,8 +71,8 @@
 	
     private final static Logger logger = Logger.getLogger(NodeImpl.class.getName());
 	
-    final static String LOCAL_DOMAIN_URI = "localdomain";
-    final static String LOCAL_NODE_NAME = "localnode";
+    public final static String LOCAL_DOMAIN_URI = "localdomain";
+    public final static String LOCAL_NODE_NAME = "localnode";
     
     private boolean isStandalone = false;
     
@@ -107,13 +107,6 @@
         this.isStandalone = true;
         init();
     }
-    public NodeImpl(ClassLoader cl) throws ActivationException {
-      this.domainUri = LOCAL_DOMAIN_URI ; 
-      this.nodeUri = LOCAL_NODE_NAME;
-      this.isStandalone = true;
-      this.domainClassLoader = cl;
-      init();
-  }
     
     public NodeImpl(String domainUri)
       throws ActivationException {
@@ -128,6 +121,15 @@
         this.domainUri = domainUri;
         this.nodeUri = nodeUri;
         this.isStandalone = false;
+        init();
+    }    
+    
+    public NodeImpl(String domainUri, String nodeUri, ClassLoader cl)
+    throws ActivationException {
+        this.domainUri = domainUri;
+        this.nodeUri = nodeUri;
+        this.domainClassLoader = cl;
+        this.isStandalone = LOCAL_NODE_NAME.equals(nodeUri);
         init();
     }    
     



---------------------------------------------------------------------
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