Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.NodeFactory.createNode()


    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        NodeFactory factory = NodeFactory.newInstance();

        serviceNode = factory.createNode(new File("service-b-config.xml").toURI().toURL());
        serviceNode.start();    
    }

    @Test
    public void testNothing() throws Exception {
View Full Code Here


        NodeConfiguration conf =
            factory.createNodeConfiguration().setURI("clientNode").
                addBinding(new QName(SCA11_NS, "binding.sca"), "http://localhost:8085/sca https://localhost:9085/sca")
                .addBinding(new QName(SCA11_NS, "binding.ws"), "http://localhost:8086/ws")
                .addContribution("client", new File("../helloworld-client/target/classes").toURI().toString());
        clientNode = factory.createNode(conf).start();
        Thread.sleep(1000);
    }

    @Test
    public void testCalculator() throws Exception {
View Full Code Here

        NodeConfiguration conf =
            factory.createNodeConfiguration().setURI("serviceNode")
                .addBinding(new QName(SCA11_NS, "binding.sca"), "http://localhost:8087/sca")
                .addBinding(new QName(SCA11_NS, "binding.ws"), "http://localhost:8088/ws")
                .addContribution("service", new File("../helloworld-service/target/classes").toURI().toString());
        serviceNode = factory.createNode(conf).start();
    }

    @AfterClass
    public static void tearDownAfterClass() throws Exception {
        if (serviceNode != null) {
View Full Code Here

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", "false");
        NodeFactory factory = NodeFactory.newInstance();
        node = factory.createNode(
               new Contribution("iface", getJar("../helloworld-iface/target")),
               new Contribution("service", getJar("../helloworld-service/target")),
               new Contribution("client", getJar("../helloworld-client/target")));
        node.start();
    }
View Full Code Here

                                                     "node.xml");
*/
        NodeFactory nodeFactory = NodeFactory.newInstance();
       
        URL nodeConfigURL = nodeDirectory.toURI().resolve("node.xml").toURL();
        Node node = nodeFactory.createNode(nodeConfigURL);
       
        try {
            node.start();
           
            // for testing we're going to set up a deamon that listens for
View Full Code Here

        NodeFactory factory = NodeFactory.getInstance();
        NodeConfiguration config1 =
            factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node1").addContribution("c1", ROOT)
                .addDeploymentComposite("c1", CLIENT).addDeploymentComposite("c1", SERVICE);

        Node node1 = factory.createNode(config1);
        node1.start();
        try {
            runClient(node1);
        } finally {
            node1.stop();
View Full Code Here

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        NodeFactory factory = NodeFactory.newInstance();

        serviceNode = factory.createNode(new File("server-config.xml").toURI().toURL());
        serviceNode.start();
       
//        serviceNode = new DomainNode("tribes:default", new String[]{"../helloworld-service/target/classes"});

    }
View Full Code Here

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        NodeFactory factory = NodeFactory.newInstance();

        clientNode = factory.createNode(new File("client-config.xml").toURI().toURL());
       
        try {
            clientNode.start();
        } catch (Exception ex){
            ex.printStackTrace();
View Full Code Here

public class StockQuoteServer {

    public static void main(String[] args) throws Exception {

      NodeFactory factory = NodeFactory.newInstance();
        Node node = factory.createNode(new File("src/main/resources/context/multiple/MultipleContext.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/context/multiple/").toURI().toURL().toString()));
        node.start();
       
        // Method 1: To access the Spring Application Context instance
        ApplicationContext ctx = SCAApplicationContextProvider.getApplicationContext();
View Full Code Here

*/
public class CalculatorClient {
    public static void main(String[] args) throws Exception {       

      NodeFactory factory = NodeFactory.newInstance();
        Node node = factory.createNode(new File("src/main/resources/spring/annotations/Calculator.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/spring/annotations/").toURI().toURL().toString()));
        node.start();
             
        CalculatorService calculatorService =
            node.getService(CalculatorService.class, "CalculatorServiceComponent");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.