Package org.apache.tuscany.sca.node.launcher

Examples of org.apache.tuscany.sca.node.launcher.NodeLauncher$ShutdownThread


       
        DomainManagerLauncher managerLauncher = DomainManagerLauncher.newInstance();
        domainManager = managerLauncher.createDomainManager(domainDir);
        domainManager.start();
       
        NodeLauncher nodeLauncher = NodeLauncher.newInstance();
        storeSupplierNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/StoreSupplierNode");
        storeSupplierNode.start();
       
        storeCatalogsNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/CatalogsNode");
        storeCatalogsNode.start();
       
        storeClientNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/StoreClientNode");
        storeClientNode.start();
       
    }
View Full Code Here


        System.out.println("domain.composite");
        System.out.println(print(domainComposite));
       
        // Now start our SCA nodes
        List<SCANode> runtimeNodes = new ArrayList<SCANode>();
        NodeLauncher launcher = NodeLauncher.newInstance();
        for (Component node: cloudComposite.getComponents()) {
           
            // Create a composite containing the components that we want to run
            // on the node
            Composite runnable = assemblyFactory.createComposite();
            runnable.setName(new QName("http://sample", node.getName()));
            NodeImplementation nodeImplementation = (NodeImplementation)node.getImplementation();
            for (Component component: nodeImplementation.getComposite().getComponents()) {
                for (Component configured: domainComposite.getComponents()) {
                    if (configured.getName().equals(component.getName())) {
                        runnable.getComponents().add(configured);
                        break;
                    }
                }
            }

            // Create the SCA node, give it the composite and the list of contributions
            // to use
            List<Contribution> dependencies = nodeDependencies.get(node);
            org.apache.tuscany.sca.node.launcher.Contribution[] contributions = new org.apache.tuscany.sca.node.launcher.Contribution[dependencies.size()];
            for (int c =0, n = dependencies.size(); c < n; c++) {
                Contribution dependency = dependencies.get(c);
                contributions[c] = new org.apache.tuscany.sca.node.launcher.Contribution(dependency.getURI(), dependency.getLocation());
            }
            SCANode runtimeNode = launcher.createNode("http://sample/" + node.getName(), print(runnable), contributions);
           
            // Start the node
            runtimeNode.start();
            runtimeNodes.add(runtimeNode);
        }
View Full Code Here

       
        DomainManagerLauncher managerLauncher = DomainManagerLauncher.newInstance();
        domainManager = managerLauncher.createDomainManager(domainDir);
        domainManager.start();
       
        NodeLauncher nodeLauncher = NodeLauncher.newInstance();
        storeSupplierNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/StoreSupplierNode");
        storeSupplierNode.start();
       
        storeCatalogsNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/CatalogsNode");
        storeCatalogsNode.start();
       
        storeClientNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/StoreClientNode");
        storeClientNode.start();
       
    }
View Full Code Here

        System.out.println("domain.composite");
        System.out.println(print(domainComposite));
       
        // Now start our SCA nodes
        List<SCANode> runtimeNodes = new ArrayList<SCANode>();
        NodeLauncher launcher = NodeLauncher.newInstance();
        for (Component node: cloudComposite.getComponents()) {
           
            // Create a composite containing the components that we want to run
            // on the node
            Composite runnable = assemblyFactory.createComposite();
            runnable.setName(new QName("http://sample", node.getName()));
            NodeImplementation nodeImplementation = (NodeImplementation)node.getImplementation();
            for (Component component: nodeImplementation.getComposite().getComponents()) {
                for (Component configured: domainComposite.getComponents()) {
                    if (configured.getName().equals(component.getName())) {
                        runnable.getComponents().add(configured);
                        break;
                    }
                }
            }

            // Create the SCA node, give it the composite and the list of contributions
            // to use
            List<Contribution> dependencies = nodeDependencies.get(node);
            org.apache.tuscany.sca.node.launcher.Contribution[] contributions = new org.apache.tuscany.sca.node.launcher.Contribution[dependencies.size()];
            for (int c =0, n = dependencies.size(); c < n; c++) {
                Contribution dependency = dependencies.get(c);
                contributions[c] = new org.apache.tuscany.sca.node.launcher.Contribution(dependency.getURI(), dependency.getLocation());
            }
            SCANode runtimeNode = launcher.createNode("http://sample/" + node.getName(), print(runnable), contributions);
           
            // Start the node
            runtimeNode.start();
            runtimeNodes.add(runtimeNode);
        }
View Full Code Here

        } catch (IOException e) {
            e.printStackTrace();
        }    
       */  
       
        NodeLauncher nodeLauncher = NodeLauncher.newInstance();
        storeSupplierNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/StoreSupplierNode");
        storeSupplierNode.start();
       
        storeCatalogsNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/CatalogsNode");
        storeCatalogsNode.start();
       
        storeClientNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/StoreClientNode");
        storeClientNode.start();
       
    }
View Full Code Here

        System.out.println("domain.composite");
        System.out.println(print(domainComposite));
       
        // Now start our SCA nodes
        List<SCANode> runtimeNodes = new ArrayList<SCANode>();
        NodeLauncher launcher = NodeLauncher.newInstance();
        for (Component node: cloudComposite.getComponents()) {
           
            // Create a composite containing the components that we want to run
            // on the node
            Composite runnable = assemblyFactory.createComposite();
            runnable.setName(new QName("http://sample", node.getName()));
            NodeImplementation nodeImplementation = (NodeImplementation)node.getImplementation();
            for (Component component: nodeImplementation.getComposite().getComponents()) {
                for (Component configured: domainComposite.getComponents()) {
                    if (configured.getName().equals(component.getName())) {
                        runnable.getComponents().add(configured);
                        break;
                    }
                }
            }

            // Create the SCA node, give it the composite and the list of contributions
            // to use
            List<Contribution> dependencies = nodeDependencies.get(node);
            org.apache.tuscany.sca.node.launcher.Contribution[] contributions = new org.apache.tuscany.sca.node.launcher.Contribution[dependencies.size()];
            for (int c =0, n = dependencies.size(); c < n; c++) {
                Contribution dependency = dependencies.get(c);
                contributions[c] = new org.apache.tuscany.sca.node.launcher.Contribution(dependency.getURI(), dependency.getLocation());
            }
            SCANode runtimeNode = launcher.createNode("http://sample/" + node.getName(), print(runnable), contributions);
           
            // Start the node
            runtimeNode.start();
            runtimeNodes.add(runtimeNode);
        }
View Full Code Here

        jmsBroker.setPersistent(false);
        jmsBroker.setUseJmx(false);
        jmsBroker.addConnector("tcp://localhost:61619");
        jmsBroker.start();
       
        NodeLauncher launcher = NodeLauncher.newInstance();
        SCANode node = launcher.createNode(null,
                                           new Contribution("assets", "../assets/target/classes"),
                                           new Contribution("warehouse", "../warehouse-spring/target/classes"));
        node.start();
       
        System.out.println("Press a key to stop");
View Full Code Here

        } catch (IOException e) {
            e.printStackTrace();
        }    
       */  
       
        NodeLauncher nodeLauncher = NodeLauncher.newInstance();
        storeSupplierNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/StoreSupplierNode");
        storeSupplierNode.start();
       
        storeCatalogsNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/CatalogsNode");
        storeCatalogsNode.start();
       
        storeClientNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/StoreClientNode");
        storeClientNode.start();
       
    }
View Full Code Here

        System.out.println("domain.composite");
        System.out.println(print(domainComposite));
       
        // Now start our SCA nodes
        List<SCANode> runtimeNodes = new ArrayList<SCANode>();
        NodeLauncher launcher = NodeLauncher.newInstance();
        for (Component node: cloudComposite.getComponents()) {
           
            // Create a composite containing the components that we want to run
            // on the node
            Composite runnable = assemblyFactory.createComposite();
            runnable.setName(new QName("http://sample", node.getName()));
            NodeImplementation nodeImplementation = (NodeImplementation)node.getImplementation();
            for (Component component: nodeImplementation.getComposite().getComponents()) {
                for (Component configured: domainComposite.getComponents()) {
                    if (configured.getName().equals(component.getName())) {
                        runnable.getComponents().add(configured);
                        break;
                    }
                }
            }

            // Create the SCA node, give it the composite and the list of contributions
            // to use
            List<Contribution> dependencies = nodeDependencies.get(node);
            org.apache.tuscany.sca.node.launcher.Contribution[] contributions = new org.apache.tuscany.sca.node.launcher.Contribution[dependencies.size()];
            for (int c =0, n = dependencies.size(); c < n; c++) {
                Contribution dependency = dependencies.get(c);
                contributions[c] = new org.apache.tuscany.sca.node.launcher.Contribution(dependency.getURI(), dependency.getLocation());
            }
            SCANode runtimeNode = launcher.createNode("http://sample/" + node.getName(), print(runnable), contributions);
           
            // Start the node
            runtimeNode.start();
            runtimeNodes.add(runtimeNode);
        }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.node.launcher.NodeLauncher$ShutdownThread

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.