tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r574096 - in /incubator/tuscany/java/sca: distribution/webapp/src/main/java/org/apache/tuscany/sca/webapp/ distribution/webapp/src/main/resources/_node/ modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/ mo...
Date Sun, 09 Sep 2007 22:54:48 GMT
Author: slaws
Date: Sun Sep  9 15:54:46 2007
New Revision: 574096

URL: http://svn.apache.org/viewvc?rev=574096&view=rev
Log:
TUSCANY-1637
Move the contribution manager interface to URLs
Simplify the NodeImpl constructor

Modified:
    incubator/tuscany/java/sca/distribution/webapp/src/main/java/org/apache/tuscany/sca/webapp/WarContextListener.java
    incubator/tuscany/java/sca/distribution/webapp/src/main/resources/_node/management.composite
    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
    incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/ServiceDiscoveryProxyImpl.java
    incubator/tuscany/java/sca/modules/distributed-impl/src/test/java/org/apache/tuscany/sca/distributed/impl/InMemoryTestCase.java
    incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ContributionManager.java
    incubator/tuscany/java/sca/samples/calculator-distributed/build.xml
    incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/CalculatorNode.java
    incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/management.composite
    incubator/tuscany/java/sca/samples/calculator-distributed/src/test/java/calculator/DomainInMemoryTestCase.java
    incubator/tuscany/java/sca/samples/domain-webapp/src/main/java/node/DomainServer.java

Modified: incubator/tuscany/java/sca/distribution/webapp/src/main/java/org/apache/tuscany/sca/webapp/WarContextListener.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/distribution/webapp/src/main/java/org/apache/tuscany/sca/webapp/WarContextListener.java?rev=574096&r1=574095&r2=574096&view=diff
==============================================================================
--- incubator/tuscany/java/sca/distribution/webapp/src/main/java/org/apache/tuscany/sca/webapp/WarContextListener.java
(original)
+++ incubator/tuscany/java/sca/distribution/webapp/src/main/java/org/apache/tuscany/sca/webapp/WarContextListener.java
Sun Sep  9 15:54:46 2007
@@ -264,7 +264,7 @@
         if (servletContext.getInitParameter("nodeName") != null) {
             nodeName = servletContext.getInitParameter("nodeName");
         } else {
-            nodeName = NodeImpl.LOCAL_NODE_NAME;
+            nodeName = NodeImpl.LOCAL_NODE_URI;
         }
 
         if (servletContext.getInitParameter("hotDeployInterval") != null) {

Modified: incubator/tuscany/java/sca/distribution/webapp/src/main/resources/_node/management.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/distribution/webapp/src/main/resources/_node/management.composite?rev=574096&r1=574095&r2=574096&view=diff
==============================================================================
--- incubator/tuscany/java/sca/distribution/webapp/src/main/resources/_node/management.composite
(original)
+++ incubator/tuscany/java/sca/distribution/webapp/src/main/resources/_node/management.composite
Sun Sep  9 15:54:46 2007
@@ -31,11 +31,11 @@
         </service>
         <service name="NodeManagerService">
             <interface.java interface="org.apache.tuscany.sca.distributed.node.NodeManagerService"/>
-            <tuscany:binding.jsonrpc uri="http://localhost:8081/NodeManagerComponent/NodeManagerJson"/>
+            <tuscany:binding.jsonrpc uri="http://localhost:8082/NodeManagerComponent/NodeManagerJson"/>
         </service>
         <service name="ComponentManagerService">
             <interface.java interface="org.apache.tuscany.sca.distributed.node.ComponentManagerService"/>
-            <tuscany:binding.jsonrpc uri="http://localhost:8081/NodeManagerComponent/ComponentManagerJson"/>
+            <tuscany:binding.jsonrpc uri="http://localhost:8082/NodeManagerComponent/ComponentManagerJson"/>
         </service>
     </component>           
     
@@ -43,20 +43,20 @@
         <implementation.java class="org.apache.tuscany.sca.distributed.node.impl.DomainManagerProxyImpl"/>
         <reference name="domainManager">
             <interface.java interface="org.apache.tuscany.sca.distributed.domain.DomainManagerService"/>
-            <binding.ws uri="http://localhost:8080/DomainManagerComponent/DomainManager"/>
+            <binding.ws uri="http://localhost:8081/DomainManagerComponent/DomainManager"/>
         </reference>
     </component>
     
     <component name="ServiceDiscoveryComponent">
         <implementation.java class="org.apache.tuscany.sca.distributed.node.impl.ServiceDiscoveryProxyImpl"
/>
         <reference name="serviceDiscovery">
-            <binding.ws uri="http://localhost:8080/ServiceDiscoveryComponent/ServiceDiscovery"/>
+            <binding.ws uri="http://localhost:8081/ServiceDiscoveryComponent/ServiceDiscovery"/>
         </reference>
     </component>
 
     <component name="node">
         <service name="Resource">
-            <tuscany:binding.http uri="http://localhost:8081/node"/>
+            <tuscany:binding.http uri="http://localhost:8082/node"/>
         </service>
        <tuscany:implementation.resource location="webroot"/>
     </component>    

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=574096&r1=574095&r2=574096&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
Sun Sep  9 15:54:46 2007
@@ -22,6 +22,8 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
 
 import org.apache.tuscany.sca.assembly.Composite;
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
@@ -41,9 +43,9 @@
     protected ReallySmallRuntime nodeRuntime;
     private ClassLoader classLoader;
 
-    private String contributionLocation;
     private ModelResolver modelResolver;
-    private Contribution contribution; 
+    
+    private Map<URL, Contribution> contributions = new HashMap<URL, Contribution>();

     
     public ContributionManagerImpl(String domainURI, String nodeName, Composite nodeComposite,
ReallySmallRuntime nodeRuntime, ClassLoader classLoader, ModelResolver modelResolver) {
         this.domainURI = domainURI;
@@ -52,39 +54,22 @@
         this.nodeRuntime = nodeRuntime;
         this.classLoader = classLoader;
         this.modelResolver = modelResolver;
-        
-    	// work out what the contribution string if its not supplied 
-        if (contributionLocation == null){
-        	if (nodeName != null){
-        		// guess that it's in a directory with the node name
-        		contributionLocation = nodeName + "/";
-        	} else {
-        		// guess that it's in the current directory
-        		contributionLocation = "/";
-        	}
-        }
-
-        this.contributionLocation = contributionLocation;
     }
     
-    public String getContributionLocation(){
-    	return contributionLocation;
-    }
-   
-    public void addContribution(String contributionLocation)
+    public void addContribution(URL contributionLocation)
       throws ActivationException, ContributionException, IOException, CompositeBuilderException
{        
-
-        URL contributionURL = classLoader.getResource(contributionLocation);
     
-        if (contributionURL != null) {
+        if (contributionLocation != null) {
 	        // Get ready to add contributions to the domain
 	        ContributionService contributionService = nodeRuntime.getContributionService();
 	        
 	        // Contribute the SCA application
-	        contribution = contributionService.contribute(contributionLocation, 
-	                                                      contributionURL, 
-	                                                      modelResolver, 
-	                                                      false);
+	        Contribution contribution = contributionService.contribute(contributionLocation.toExternalForm(),

+	                                                                   contributionLocation,

+	                                                                   modelResolver, 
+	                                                                   false);
+	        
+	        contributions.put(contributionLocation, contribution);
 	        
 	        // Add the composites to the top level domain
 	        for(Composite composite: contribution.getDeployables()) {
@@ -101,8 +86,10 @@
         }              
     }
 
-    public void removeContribution(String contributionLocation)
+    public void removeContribution(URL contributionLocation)
       throws ActivationException, ContributionException {
+        
+        Contribution contribution = contributions.get(contributionLocation);
     	
     	stopContribution(contributionLocation);
     	
@@ -117,16 +104,20 @@
         }
 
         // Remove contribution
-        nodeRuntime.getContributionService().remove(contributionLocation);
+        nodeRuntime.getContributionService().remove(contributionLocation.toExternalForm());
     }
     
-    public void startContribution(String contributionLocation)
+    public void startContribution(URL contributionLocation)
       throws ActivationException, ContributionException, IOException, CompositeBuilderException
 {
+        
+        Contribution contribution = contributions.get(contributionLocation);
     	
     	if (contribution == null){
     		addContribution(contributionLocation);
     	}
     	
+        contribution = contributions.get(contributionLocation);
+    	
     	if (contribution != null) {
 	        for(Composite composite: contribution.getDeployables()) {
 	        	 nodeRuntime.getCompositeActivator().start(composite);
@@ -136,8 +127,11 @@
     	}
     }
     
-    public void stopContribution(String contributionLocation)
+    public void stopContribution(URL contributionLocation)
       throws ActivationException {
+        
+        Contribution contribution = contributions.get(contributionLocation);
+        
     	if (contribution != null) {
 	        for(Composite composite: contribution.getDeployables()) {
 	       	 nodeRuntime.getCompositeActivator().stop(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=574096&r1=574095&r2=574096&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
Sun Sep  9 15:54:46 2007
@@ -72,7 +72,7 @@
     private final static Logger logger = Logger.getLogger(NodeImpl.class.getName());
 	
     public final static String LOCAL_DOMAIN_URI = "localdomain";
-    public final static String LOCAL_NODE_NAME = "localnode";
+    public final static String LOCAL_NODE_URI = "localnode";
     
     private boolean isStandalone = false;
     
@@ -100,22 +100,26 @@
        
     // methods defined on the implementation only
     
+    /**
+     * Default constructor creates a standalone node with no connectivity to a wider
+     * domain and no local web page. 
+     */
     public NodeImpl()
       throws ActivationException {
         this.domainUri = LOCAL_DOMAIN_URI ; 
-        this.nodeUri = LOCAL_NODE_NAME;
+        this.nodeUri = LOCAL_NODE_URI;
         this.isStandalone = true;
         init();
     }
-    
-    public NodeImpl(String domainUri)
-      throws ActivationException {
-        this.domainUri = domainUri; 
-        this.nodeUri = LOCAL_NODE_NAME;
-        this.isStandalone = true;
-        init();
-    }
-    
+       
+    /** 
+     * Creates a node connected to a wider domain.  To find its place in the domain 
+     * node and domain identifiers must be provided. 
+     * 
+     * @param domainUri the domain identifier
+     * @param nodeUri the node identifier
+     * @throws ActivationException
+     */
     public NodeImpl(String domainUri, String nodeUri)
     throws ActivationException {
         this.domainUri = domainUri;
@@ -124,12 +128,21 @@
         init();
     }    
     
+    /** 
+     * Creates a node connected to a wider domain and allows a classpath to be specified.
 
+     * To find its place in the domain node and domain identifiers must be provided. 
+     * 
+     * @param domainUri the domain identifier
+     * @param nodeUri the node identifier
+     * @param classpath the classpath to use for loading system resources for the node
+     * @throws ActivationException
+     */
     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);
+        this.isStandalone = LOCAL_DOMAIN_URI.equals(domainUri);
         init();
     }    
     
@@ -147,11 +160,10 @@
             
             // create a node runtime for the domain contributions to run on
             nodeRuntime = new ReallySmallRuntime(domainClassLoader);
-            
           
             // Check if node has been given a domain name to connect to
             if (isStandalone) {
-            	logger.log(Level.INFO, "Domain node will be started stand-alone as no node name
is provided");
+            	logger.log(Level.INFO, "Domain node will be started stand-alone as node and
domain name are not provided");
             	managementRuntime = null;
             	serviceDiscovery = null;
             } else {
@@ -198,7 +210,7 @@
                     // in service discovery. It's not on an SCA binding. 
                     // TODO - really want to be able to hand out service references but they
                     //        don't serialize out over web services yet. 
-                    String nodeManagerUrl = fixUpManagementServiceUrls();               
    
+                    fixUpManagementServiceUrls();                    
                   
                     managementRuntime.getCompositeActivator().activate(composite); 
                     managementRuntime.getCompositeActivator().start(composite);
@@ -211,6 +223,10 @@
                     domainManager = managementRuntime.getService(DomainManagerService.class,
"DomainManagerComponent");
                     nodeManagerInit = managementRuntime.getService(NodeManagerInitService.class,
"NodeManagerComponent/NodeManagerInitService");
                     
+                    // Now get the uri back out of the component no it has been build and
started
+                    // TODO - this doesn't pick up the url from external hosting environments
+                    String nodeManagerUrl = getNodeManagerServiceUrl();
+                    
                     if (nodeManagerUrl != null) {
                         if (isStandalone == false){
                             try {
@@ -258,18 +274,29 @@
      * 
      * @return node manager url
      */    
-    private String fixUpManagementServiceUrls(){
+    private void fixUpManagementServiceUrls(){
         String nodeManagerUrl = null;
         
         // First get the NodeManager binding from the model 
         List<Component> components = managementRuntime.getDomainComposite().getIncludes().get(0).getComponents();
-        Component nodeManagerComponent = null;
-        
+       
         for(Component component : components){
             for (ComponentService service : component.getServices() ){
                 for (Binding binding : service.getBindings() ) {
                     fixUpBindingUrl(binding);  
                 }
+            }            
+        }
+    }
+    
+    private String getNodeManagerServiceUrl(){
+        String nodeManagerUrl = null;
+        
+        // First get the NodeManager binding from the model 
+        List<Component> components = managementRuntime.getDomainComposite().getIncludes().get(0).getComponents();
+        
+        for(Component component : components){
+            for (ComponentService service : component.getServices() ){
                 
                 if ( service.getName().equals("NodeManagerService")) {
                     nodeManagerUrl = service.getBindings().get(0).getURI();
@@ -278,10 +305,10 @@
         }
         
         return nodeManagerUrl;
-    }
+    }    
     
     /**
-     * For http protocol find a port that isn't in use and make sure the domain name is the
real domains name
+     * For http protocol find a port that isn't in use and make sure the domain name is the
real domain name
      * 
      * @param binding
      */
@@ -355,7 +382,7 @@
         // make the domain available to the model. 
         // TODO - No sure how this should be done properly. As a nod to this though
         //        I have a domain factory which always returns the same domain
-        //        object
+        //        object. I.e. this node
         ModelFactoryExtensionPoint factories = nodeRuntime.getExtensionPointRegistry().getExtensionPoint(ModelFactoryExtensionPoint.class);
         DomainFactoryImpl domainFactory = new DomainFactoryImpl(this);
         factories.addFactory(domainFactory);
@@ -364,13 +391,12 @@
         componentManager = new ComponentManagerServiceImpl(domainUri, nodeUri, nodeComposite,
nodeRuntime);
         contributionManager = new ContributionManagerImpl(domainUri, nodeUri, nodeComposite,
nodeRuntime, domainClassLoader, null);
         
-        
         if (isStandalone == false){
             // pass this object into the node manager
             nodeManagerInit.setNode((Node)this);
             
             try {
-                // go out an add this node to the wider domain
+                // go out and add this node to the wider domain
                 domainManager.registerNode(domainUri, nodeUri);
             } catch(Exception ex) {
                 // not sure what to do here

Modified: incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/ServiceDiscoveryProxyImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/ServiceDiscoveryProxyImpl.java?rev=574096&r1=574095&r2=574096&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/ServiceDiscoveryProxyImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/distributed-impl/src/main/java/org/apache/tuscany/sca/distributed/node/impl/ServiceDiscoveryProxyImpl.java
Sun Sep  9 15:54:46 2007
@@ -45,6 +45,7 @@
      * @return dummy valus just so that we don;t have a void return which doesn't work 
      */
     public String registerServiceEndpoint(String domainUri, String nodeUri, String serviceName,
String bindingName, String URL){
+     /*
         System.err.println("Registering service: [" + 
                 domainUri + " " +
                 nodeUri + " " +
@@ -52,6 +53,7 @@
                 bindingName + " " +
                 URL +
                 "]");
+      */
         
         String dummy = null; 
         
@@ -84,11 +86,13 @@
      * @return url the endpoint url
      */
     public String findServiceEndpoint(String domainUri, String serviceName, String bindingName){
+     /*        
         System.err.println("Finding service: [" + 
                 domainUri + " " +
                 serviceName + " " +
                 bindingName +
                 "]");
+      */
         
         String url = null;
         

Modified: incubator/tuscany/java/sca/modules/distributed-impl/src/test/java/org/apache/tuscany/sca/distributed/impl/InMemoryTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed-impl/src/test/java/org/apache/tuscany/sca/distributed/impl/InMemoryTestCase.java?rev=574096&r1=574095&r2=574096&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed-impl/src/test/java/org/apache/tuscany/sca/distributed/impl/InMemoryTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/distributed-impl/src/test/java/org/apache/tuscany/sca/distributed/impl/InMemoryTestCase.java
Sun Sep  9 15:54:46 2007
@@ -50,27 +50,27 @@
         try {
             System.out.println("Setting up domain registry");
             
-            registry = new NodeImpl(DEFULT_DOMAIN_NAME);
+            registry = new NodeImpl();
             registry.start();
-            registry.getContributionManager().startContribution("domain/");
+            registry.getContributionManager().startContribution(InMemoryTestCase.class.getClassLoader().getResource("domain/"));
             
             System.out.println("Setting up domain nodes");
                    
             // Create the domain representation
             domainNodeA = new NodeImpl(DEFULT_DOMAIN_NAME, "nodeA");
             domainNodeA.start();
-            domainNodeA.getContributionManager().startContribution("nodeA/");
+            domainNodeA.getContributionManager().startContribution(InMemoryTestCase.class.getClassLoader().getResource("nodeA/"));
             
             // Create the domain representation
             domainNodeB = new NodeImpl(DEFULT_DOMAIN_NAME, "nodeB");
             domainNodeB.start();
-            domainNodeB.getContributionManager().startContribution("nodeB/");        
+            domainNodeB.getContributionManager().startContribution(InMemoryTestCase.class.getClassLoader().getResource("nodeB/"));
       
             
             // create the node that runs the 
             // subtract component 
             domainNodeC = new NodeImpl(DEFULT_DOMAIN_NAME, "nodeC");
             domainNodeC.start();
-            domainNodeC.getContributionManager().startContribution("nodeC/");         
+            domainNodeC.getContributionManager().startContribution(InMemoryTestCase.class.getClassLoader().getResource("nodeC/"));
        
     
             // get a reference to the calculator service from domainA
             // which will be running this component

Modified: incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ContributionManager.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ContributionManager.java?rev=574096&r1=574095&r2=574096&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ContributionManager.java
(original)
+++ incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/node/ContributionManager.java
Sun Sep  9 15:54:46 2007
@@ -20,6 +20,7 @@
 package org.apache.tuscany.sca.distributed.node;
 
 import java.io.IOException;
+import java.net.URL;
 
 import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
 import org.apache.tuscany.sca.contribution.service.ContributionException;
@@ -36,17 +37,19 @@
     /**
      * Accepts a new contribution and passes it onto the domain implementation
      * 
+     * @param contributionLocation the URL location of the contribution
      * @throws ActivationException
      */
-    public void addContribution(String contributionLocation)
+    public void addContribution(URL contrubutionLocation)
      throws ActivationException, ContributionException, IOException, CompositeBuilderException;
     
     /**
      * Removes the specified contribution from the domain
      * 
+     * @param contributionname
      * throws ActivationException
      */
-    public void removeContribution(String contributionLocation)
+    public void removeContribution(URL contributionName)
       throws ActivationException, ContributionException;
     
     
@@ -55,7 +58,7 @@
      * 
      * @throws ActivationException
      */
-    public void startContribution(String contributionLocation)
+    public void startContribution(URL contributionName)
       throws ActivationException, ContributionException, IOException, CompositeBuilderException;
     
     /**
@@ -63,7 +66,7 @@
      * 
      * @throws ActivationException
      */
-    public void stopContribution(String contributionLocation)
+    public void stopContribution(URL contributionName)
       throws ActivationException;
  
 }

Modified: incubator/tuscany/java/sca/samples/calculator-distributed/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/build.xml?rev=574096&r1=574095&r2=574096&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/build.xml (original)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/build.xml Sun Sep  9 15:54:46
2007
@@ -112,13 +112,15 @@
     <path id="repo.classpath">   	
     	<pathelement location="target/classes"/>
     	<pathelement location="${m2.repo}\commons-io\commons-io\1.1\commons-io-1.1.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\rampart\rampart-core\1.2\rampart-core-1.2.jar"/>
     	<pathelement location="${m2.repo}\xerces\xercesImpl\2.8.1\xercesImpl-2.8.1.jar"/>
     	<pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-jms_1.1_spec\1.1\geronimo-jms_1.1_spec-1.1.jar"/>
     	<pathelement location="${m2.repo}\wsdl4j\wsdl4j\1.6.2\wsdl4j-1.6.2.jar"/>
     	<pathelement location="${m2.repo}\commons-codec\commons-codec\1.3\commons-codec-1.3.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\axis2\axis2-mtompolicy\1.2\axis2-mtompolicy-1.2.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca\1.0-incubating-SNAPSHOT\tuscany-binding-sca-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\xml-apis\xml-apis\1.3.03\xml-apis-1.3.03.jar"/>
-    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-tomcat\1.0-incubating-SNAPSHOT\tuscany-host-tomcat-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\ws\security\wss4j\1.5.3\wss4j-1.5.3.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-resource\1.0-incubating-SNAPSHOT\tuscany-implementation-resource-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-assembly-xml\1.0-incubating-SNAPSHOT\tuscany-assembly-xml-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-assembly\1.0-incubating-SNAPSHOT\tuscany-assembly-1.0-incubating-SNAPSHOT.jar"/>
@@ -126,27 +128,30 @@
     	<pathelement location="${m2.repo}\org\apache\axis2\axis2-java2wsdl\1.2\axis2-java2wsdl-1.2.jar"/>
     	<pathelement location="${m2.repo}\cglib\cglib-nodep\2.1_3\cglib-nodep-2.1_3.jar"/>
     	<pathelement location="${m2.repo}\backport-util-concurrent\backport-util-concurrent\2.2\backport-util-concurrent-2.2.jar"/>
-    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy-xml\1.0-incubating-SNAPSHOT\tuscany-policy-xml-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface\1.0-incubating-SNAPSHOT\tuscany-interface-1.0-incubating-SNAPSHOT.jar"/>
-    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-topology\1.0-incubating-SNAPSHOT\tuscany-topology-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy-xml\1.0-incubating-SNAPSHOT\tuscany-policy-xml-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\commons-logging\commons-logging\1.1\commons-logging-1.1.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-topology\1.0-incubating-SNAPSHOT\tuscany-topology-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-extension-helper\1.0-incubating-SNAPSHOT\tuscany-extension-helper-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-tomcat\1.0-incubating-SNAPSHOT\tuscany-host-tomcat-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-jsonrpc\1.0-incubating-SNAPSHOT\tuscany-binding-jsonrpc-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\logkit\logkit\1.0.1\logkit-1.0.1.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-java-xml\1.0-incubating-SNAPSHOT\tuscany-interface-java-xml-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\commons-fileupload\commons-fileupload\1.1.1\commons-fileupload-1.1.1.jar"/>
     	<pathelement location="${m2.repo}\annogen\annogen\0.1.0\annogen-0.1.0.jar"/>
     	<pathelement location="${m2.repo}\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\rampart\rampart-policy\1.2\rampart-policy-1.2.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-http\1.0-incubating-SNAPSHOT\tuscany-binding-http-1.0-incubating-SNAPSHOT.jar"/>
-    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-embedded\1.0-incubating-SNAPSHOT\tuscany-host-embedded-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\commons-httpclient\commons-httpclient\3.0.1\commons-httpclient-3.0.1.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-embedded\1.0-incubating-SNAPSHOT\tuscany-host-embedded-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-impl\1.2.4\axiom-impl-1.2.4.jar"/>
     	<pathelement location="${m2.repo}\org\apache\httpcomponents\jakarta-httpcore\4.0-alpha4\jakarta-httpcore-4.0-alpha4.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws-xml\1.0-incubating-SNAPSHOT\tuscany-binding-ws-xml-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-java\1.0-incubating-SNAPSHOT\tuscany-contribution-java-1.0-incubating-SNAPSHOT.jar"/>
-    	<pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-api\1.2.4\axiom-api-1.2.4.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java-runtime\1.0-incubating-SNAPSHOT\tuscany-implementation-java-runtime-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-api\1.2.4\axiom-api-1.2.4.jar"/>
     	<pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-commonj_1.1_spec\1.0\geronimo-commonj_1.1_spec-1.0.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy-security\1.0-incubating-SNAPSHOT\tuscany-policy-security-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tomcat\catalina\6.0.10\catalina-6.0.10.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core-spi\1.0-incubating-SNAPSHOT\tuscany-core-spi-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca-axis2\1.0-incubating-SNAPSHOT\tuscany-binding-sca-axis2-1.0-incubating-SNAPSHOT.jar"/>
@@ -155,25 +160,27 @@
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\sca-api\1.0-incubating-SNAPSHOT\sca-api-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-topology-xml\1.0-incubating-SNAPSHOT\tuscany-topology-xml-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tomcat\coyote\6.0.10\coyote-6.0.10.jar"/>
+    	<pathelement location="${m2.repo}\xalan\xalan\2.6.0\xalan-2.6.0.jar"/>
     	<pathelement location="${m2.repo}\com\metaparadigm\json-rpc\1.0\json-rpc-1.0.jar"/>
     	<pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-dom\1.2.4\axiom-dom-1.2.4.jar"/>
-    	<pathelement location="${m2.repo}\junit\junit\4.2\junit-4.2.jar"/>
     	<pathelement location="${m2.repo}\org\apache\ws\commons\schema\XmlSchema\1.3.1\XmlSchema-1.3.1.jar"/>
-    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-namespace\1.0-incubating-SNAPSHOT\tuscany-contribution-namespace-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\junit\junit\4.2\junit-4.2.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws\1.0-incubating-SNAPSHOT\tuscany-binding-ws-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java-xml\1.0-incubating-SNAPSHOT\tuscany-implementation-java-xml-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-namespace\1.0-incubating-SNAPSHOT\tuscany-contribution-namespace-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy\1.0-incubating-SNAPSHOT\tuscany-policy-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-wsdl-xml\1.0-incubating-SNAPSHOT\tuscany-interface-wsdl-xml-1.0-incubating-SNAPSHOT.jar"/>
-    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java\1.0-incubating-SNAPSHOT\tuscany-implementation-java-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-distributed-impl\1.0-incubating-SNAPSHOT\tuscany-distributed-impl-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java\1.0-incubating-SNAPSHOT\tuscany-implementation-java-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\javax\activation\activation\1.1\activation-1.1.jar"/>
     	<pathelement location="${m2.repo}\org\apache\ant\ant\1.7.0\ant-1.7.0.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core\1.0-incubating-SNAPSHOT\tuscany-core-1.0-incubating-SNAPSHOT.jar"/>
-    	<pathelement location="${m2.repo}\org\apache\axis2\axis2-adb\1.2\axis2-adb-1.2.jar"/>
     	<pathelement location="${m2.repo}\org\apache\woden\woden\1.0-incubating-M7a\woden-1.0-incubating-M7a.jar"/>
-    	<pathelement location="${m2.repo}\org\apache\tomcat\annotations-api\6.0.10\annotations-api-6.0.10.jar"/>
-    	<pathelement location="${m2.repo}\avalon-framework\avalon-framework\4.1.3\avalon-framework-4.1.3.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\axis2\axis2-adb\1.2\axis2-adb-1.2.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution\1.0-incubating-SNAPSHOT\tuscany-contribution-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\avalon-framework\avalon-framework\4.1.3\avalon-framework-4.1.3.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\tomcat\annotations-api\6.0.10\annotations-api-6.0.10.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\santuario\xmlsec\1.4.0\xmlsec-1.4.0.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tomcat\juli\6.0.10\juli-6.0.10.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-databinding\1.0-incubating-SNAPSHOT\tuscany-databinding-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\log4j\log4j\1.2.12\log4j-1.2.12.jar"/>
@@ -181,16 +188,17 @@
     	<pathelement location="${m2.repo}\org\codehaus\woodstox\wstx-asl\3.2.1\wstx-asl-3.2.1.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-http\1.0-incubating-SNAPSHOT\tuscany-host-http-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws-axis2\1.0-incubating-SNAPSHOT\tuscany-binding-ws-axis2-1.0-incubating-SNAPSHOT.jar"/>
-    	<pathelement location="${m2.repo}\stax\stax-api\1.0.1\stax-api-1.0.1.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-java\1.0-incubating-SNAPSHOT\tuscany-interface-java-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-impl\1.0-incubating-SNAPSHOT\tuscany-contribution-impl-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-databinding-axiom\1.0-incubating-SNAPSHOT\tuscany-databinding-axiom-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\stax\stax-api\1.0.1\stax-api-1.0.1.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-distributed\1.0-incubating-SNAPSHOT\tuscany-distributed-1.0-incubating-SNAPSHOT.jar"/>
     	<pathelement location="${m2.repo}\org\apache\axis2\axis2-kernel\1.2\axis2-kernel-1.2.jar"/>
     	<pathelement location="${m2.repo}\org\apache\neethi\neethi\2.0.1\neethi-2.0.1.jar"/>
     	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca-xml\1.0-incubating-SNAPSHOT\tuscany-binding-sca-xml-1.0-incubating-SNAPSHOT.jar"/>
-    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core-databinding\1.0-incubating-SNAPSHOT\tuscany-core-databinding-1.0-incubating-SNAPSHOT.jar"/>
   	
-    </path>	
+    	<pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core-databinding\1.0-incubating-SNAPSHOT\tuscany-core-databinding-1.0-incubating-SNAPSHOT.jar"/>
+    	<pathelement location="${m2.repo}\org\apache\rampart\rampart-trust\1.2\rampart-trust-1.2.jar"/>
   	
+   </path>	
     	
     <target name="runDomainNodeRepo">
         <java classname="${domain.class}"

Modified: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/CalculatorNode.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/CalculatorNode.java?rev=574096&r1=574095&r2=574096&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/CalculatorNode.java
(original)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/CalculatorNode.java
Sun Sep  9 15:54:46 2007
@@ -23,7 +23,6 @@
 
 import org.apache.tuscany.sca.distributed.node.impl.NodeImpl;
 
-
 import calculator.CalculatorService;
 
 /**
@@ -57,7 +56,7 @@
             // the application components are added. The null here just gets the node
             // implementation to read a directory from the classpath with the node name
             // TODO - should be done as a management action.       
-            node.getContributionManager().startContribution(nodeName + "/");  
+            node.getContributionManager().startContribution(CalculatorNode.class.getClassLoader().getResource(nodeName
+ "/"));  
                                
             // nodeA is the head node and runs some tests while all other nodes
             // simply listen for incoming messages

Modified: incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/management.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/management.composite?rev=574096&r1=574095&r2=574096&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/management.composite
(original)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/src/main/resources/_node/management.composite
Sun Sep  9 15:54:46 2007
@@ -31,11 +31,11 @@
         </service>
         <service name="NodeManagerService">
             <interface.java interface="org.apache.tuscany.sca.distributed.node.NodeManagerService"/>
-            <tuscany:binding.jsonrpc uri="http://localhost:8081/NodeManagerComponent/NodeManagerJson"/>
+            <tuscany:binding.jsonrpc uri="http://localhost:8082/NodeManagerComponent/NodeManagerJson"/>
         </service>
         <service name="ComponentManagerService">
             <interface.java interface="org.apache.tuscany.sca.distributed.node.ComponentManagerService"/>
-            <tuscany:binding.jsonrpc uri="http://localhost:8081/NodeManagerComponent/ComponentManagerJson"/>
+            <tuscany:binding.jsonrpc uri="http://localhost:8082/NodeManagerComponent/ComponentManagerJson"/>
         </service>
     </component>           
     
@@ -56,7 +56,7 @@
 
     <component name="node">
         <service name="Resource">
-            <tuscany:binding.http uri="http://localhost:8081/node"/>
+            <tuscany:binding.http uri="http://localhost:8082/node"/>
         </service>
        <tuscany:implementation.resource location="webroot"/>
     </component>    

Modified: incubator/tuscany/java/sca/samples/calculator-distributed/src/test/java/calculator/DomainInMemoryTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/calculator-distributed/src/test/java/calculator/DomainInMemoryTestCase.java?rev=574096&r1=574095&r2=574096&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/calculator-distributed/src/test/java/calculator/DomainInMemoryTestCase.java
(original)
+++ incubator/tuscany/java/sca/samples/calculator-distributed/src/test/java/calculator/DomainInMemoryTestCase.java
Sun Sep  9 15:54:46 2007
@@ -49,27 +49,27 @@
         try {
                 System.out.println("Setting up domain registry");
                 
-                registry = new NodeImpl(DEFAULT_DOMAIN_NAME);
+                registry = new NodeImpl();
                 registry.start();
-                registry.getContributionManager().startContribution("domain/");
+                registry.getContributionManager().startContribution(DomainInMemoryTestCase.class.getClassLoader().getResource("domain/"));
                 
                 System.out.println("Setting up distributed nodes");
                        
                 // Create the domain representation
                 domainNodeA = new NodeImpl(DEFAULT_DOMAIN_NAME, "nodeA");
                 domainNodeA.start();
-                domainNodeA.getContributionManager().startContribution("nodeA/");
+                domainNodeA.getContributionManager().startContribution(DomainInMemoryTestCase.class.getClassLoader().getResource("nodeA/"));
                 
                 // Create the domain representation
                 domainNodeB = new NodeImpl(DEFAULT_DOMAIN_NAME, "nodeB");
                 domainNodeB.start();
-                domainNodeB.getContributionManager().startContribution("nodeB/");       

+                domainNodeB.getContributionManager().startContribution(DomainInMemoryTestCase.class.getClassLoader().getResource("nodeB/"));
       
                 
                 // create the node that runs the 
                 // subtract component 
                 domainNodeC = new NodeImpl(DEFAULT_DOMAIN_NAME, "nodeC");
                 domainNodeC.start();
-                domainNodeC.getContributionManager().startContribution("nodeC/");       
 
+                domainNodeC.getContributionManager().startContribution(DomainInMemoryTestCase.class.getClassLoader().getResource("nodeC/"));
        
         
                 // get a reference to the calculator service from domainA
                 // which will be running this component

Modified: incubator/tuscany/java/sca/samples/domain-webapp/src/main/java/node/DomainServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/domain-webapp/src/main/java/node/DomainServer.java?rev=574096&r1=574095&r2=574096&view=diff
==============================================================================
--- incubator/tuscany/java/sca/samples/domain-webapp/src/main/java/node/DomainServer.java
(original)
+++ incubator/tuscany/java/sca/samples/domain-webapp/src/main/java/node/DomainServer.java
Sun Sep  9 15:54:46 2007
@@ -20,9 +20,7 @@
 
 import java.io.IOException;
 
-import org.apache.tuscany.sca.distributed.domain.Domain;
 import org.apache.tuscany.sca.distributed.node.impl.NodeImpl;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
 
 /**
  * This server program that loads a composite to provide simple registry function.
@@ -33,9 +31,9 @@
 
     public static void main(String[] args) {
         try {
-            NodeImpl node = new NodeImpl("DomainServer");
+            NodeImpl node = new NodeImpl();
             node.start();
-            node.getContributionManager().startContribution(".");
+            node.getContributionManager().startContribution(DomainServer.class.getClassLoader().getResource("."));
     
             try {
                 System.out.println("Domain server started (press enter to shutdown)");



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