Package org.apache.tuscany.sca.node

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


        node.stop();
        Assert.assertFalse(((NodeFactoryImpl)nf).inited);
       
        nf = NodeFactory.newInstance();
        nf.setAutoDestroy(false);
        node = nf.createNode();
        node.start();
        Assert.assertTrue(((NodeFactoryImpl)nf).inited);
        node.stop();
        Assert.assertTrue(((NodeFactoryImpl)nf).inited);
       
View Full Code Here


    @BeforeClass
    public static void startServer() throws Exception {
        try {
            NodeFactory factory = NodeFactory.newInstance();
            String contribution = ContributionLocationHelper.getContributionLocation(OrderService.class);
            node = factory.createNode("ordersca.composite", new Contribution("order", contribution)).start();
        } catch (Exception e) {
            e.printStackTrace();
        }
    
    }
View Full Code Here

    public static void startServer() throws Exception {
        try {

            NodeFactory factory = NodeFactory.newInstance();
            String contribution = ContributionLocationHelper.getContributionLocation(OrderServiceBare.class);
            node = factory.createNode("ordersca.bare.composite", new Contribution("order.bare", contribution)).start();
        } catch (Exception e) {
            e.printStackTrace();
        }
    
    }
View Full Code Here

    private static Node clientNode;

    @Test
    public void testCalculator() throws Exception {
        NodeFactory factory = NodeFactory.newInstance();
        serviceNode = factory.createNode(new Contribution("service", getJar("../helloworld-service/target")));
        serviceNode.start();
        clientNode = factory.createNode(new Contribution("client", getJar("../helloworld-client/target")));
        clientNode.start();

        Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
View Full Code Here

    @Test
    public void testCalculator() throws Exception {
        NodeFactory factory = NodeFactory.newInstance();
        serviceNode = factory.createNode(new Contribution("service", getJar("../helloworld-service/target")));
        serviceNode.start();
        clientNode = factory.createNode(new Contribution("client", getJar("../helloworld-client/target")));
        clientNode.start();

        Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
        assertNotNull(service);
        assertEquals("Hello Petra", service.sayHello("Petra"));
View Full Code Here

        } catch (Exception e) {
            // expected
            // TODO: better exception than NPE
        }
       
        serviceNode = factory.createNode(new Contribution("service", getJar("../helloworld-service/target")));
        serviceNode.start();

        client = clientNode.getService(Helloworld.class, "HelloworldClient");
        assertNotNull(client);
        assertEquals("Hi Hello Petra", client.sayHello("Petra"));
View Full Code Here

                           "false");
        NodeFactory factory = NodeFactory.getInstance();
        NodeConfiguration configuration1 =
            factory.createNodeConfiguration().setURI("serviceNode")
                .addContribution("service", getJar("../helloworld-service/target"));
        serviceNode = factory.createNode(configuration1).start();

        NodeConfiguration configuration2 =
            factory.createNodeConfiguration().setURI("clientNode")
                .addContribution("client", getJar("../helloworld-client/target"));
        clientNode = factory.createNode(configuration2).start();
View Full Code Here

        serviceNode = factory.createNode(configuration1).start();

        NodeConfiguration configuration2 =
            factory.createNodeConfiguration().setURI("clientNode")
                .addContribution("client", getJar("../helloworld-client/target"));
        clientNode = factory.createNode(configuration2).start();
    }

    /**
     * Get the jar in the target folder without being dependent on the version name to
     * make tuscany releases easier
View Full Code Here

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

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

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

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

        sericeNode = factory.createNode(new File("service-a-config.xml").toURI().toURL());
       
        try {
            sericeNode.start();
        } catch (Exception ex){
            ex.printStackTrace();
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.