Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.SCANodeFactory.createSCANode()


            nodeB = nodeFactory.createSCANode("http://localhost:8200/nodeB", "http://localhost:9999");
            nodeB.addContribution("nodeB", cl.getResource("nodeB/"));
            nodeB.addToDomainLevelComposite(new QName("http://sample", "CalculatorB"));

            // sca-deployables test
            nodeC = nodeFactory.createSCANode("http://localhost:8300/nodeC", "http://localhost:9999");
            nodeC.addContribution("nodeC", cl.getResource("nodeC/"));
            nodeC.addToDomainLevelComposite(new QName("http://sample", "CalculatorC"));
            nodeC.addToDomainLevelComposite(new QName("http://sample", "CalculatorC"));
           
            // start the domain
View Full Code Here


        SubtractService subtractServiceC;

        for(int i=0; i < 40; i++) {
           
            nodeFactory = SCANodeFactory.newInstance();
            node = nodeFactory.createSCANode("http://localhost:8200/node", null);
            node.addContribution("nodeB", cl.getResource("nodeB/"));
            node.addContribution("nodeC", cl.getResource("nodeC/"));
            node.addToDomainLevelComposite(new QName("http://sample", "CalculatorB"));
            node.addToDomainLevelComposite(new QName("http://sample", "CalculatorC"));
            node.start();  
View Full Code Here

                 
            ClassLoader cl = CallableReferenceRemoteTestCase.class.getClassLoader();
           
            SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
           
            nodeA = nodeFactory.createSCANode("http://localhost:8100/nodeA", "http://localhost:9999");
            nodeA.addContribution("nodeA", cl.getResource("nodeA/"));
            nodeA.addToDomainLevelComposite(new QName("http://foo", "CompositeA"));

           
            nodeB = nodeFactory.createSCANode("http://localhost:8200/nodeB", "http://localhost:9999");
View Full Code Here

            nodeA = nodeFactory.createSCANode("http://localhost:8100/nodeA", "http://localhost:9999");
            nodeA.addContribution("nodeA", cl.getResource("nodeA/"));
            nodeA.addToDomainLevelComposite(new QName("http://foo", "CompositeA"));

           
            nodeB = nodeFactory.createSCANode("http://localhost:8200/nodeB", "http://localhost:9999");
            nodeB.addContribution("nodeB", cl.getResource("nodeB/"));
            nodeB.addToDomainLevelComposite(new QName("http://foo", "CompositeB"));

            domain.start();
           
View Full Code Here

           
            cl = DomainAPITestCase.class.getClassLoader();
           
            SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
           
            nodeA = nodeFactory.createSCANode("http://localhost:8100/nodeA", "http://localhost:9999");          
            nodeB = nodeFactory.createSCANode("http://localhost:8200/nodeB", "http://localhost:9999");     
           
        } catch(Exception ex){
            ex.printStackTrace();
       
View Full Code Here

            cl = DomainAPITestCase.class.getClassLoader();
           
            SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
           
            nodeA = nodeFactory.createSCANode("http://localhost:8100/nodeA", "http://localhost:9999");          
            nodeB = nodeFactory.createSCANode("http://localhost:8200/nodeB", "http://localhost:9999");     
           
        } catch(Exception ex){
            ex.printStackTrace();
       
       
View Full Code Here

     * with void return type.
     */
    @Test
    public void atDestroyProper() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        SCANode node = nodeFactory.createSCANode(new File("src/main/resources/proper/AService.composite").toURL().toString(),
                new SCAContribution("TestContribution",
                                    new File("src/main/resources/proper").toURL().toString()));
        node.start();
        AService aService = ((SCAClient)node).getService(AService.class, "AComponent");
        Assert.assertEquals("Hello Pandu", aService.getGreetings("Pandu"));
View Full Code Here

     */
    @Test
    public void atDestroyProtectedMethod() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        try {
            SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err1/AServiceErr1.composite").toURL().toString(),
                    new SCAContribution("TestContribution",
                                        new File("src/main/resources/err1").toURL().toString()));
            Assert.fail();
            node.stop();
        } catch(ServiceRuntimeException e) {
View Full Code Here

     */
    @Test
    public void atDestroyPrivateMethod() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        try {
            SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err2/AServiceErr2.composite").toURL().toString(),
                    new SCAContribution("TestContribution",
                                        new File("src/main/resources/err2").toURL().toString()));
            Assert.fail();
            node.stop();
        } catch(ServiceRuntimeException e) {
View Full Code Here

     */
    @Test
    public void atDestroyNonVoidReturnType() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        try {
            SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err3/AServiceErr3.composite").toURL().toString(),
                    new SCAContribution("TestContribution",
                                        new File("src/main/resources/err3").toURL().toString()));
            Assert.fail();
            node.stop();
        } catch(ServiceRuntimeException e) {
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.