Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.SCANode2.stop()


        try {
            SCANode2 node = nodeFactory.createSCANode(new File("src/main/resources/err4/AServiceErr4.composite").toURL().toString(),
                    new SCAContribution("TestContribution",
                                        new File("src/main/resources/err4").toURL().toString()));
            Assert.fail();
            node.stop();
        } catch(ServiceRuntimeException e) {
            //expected
            Assert.assertNotSame(-1, e.getMessage().indexOf("Destructor must not have argments"));
        }
    }
View Full Code Here


        Shopper shopper = client.getService(Shopper.class, "StoreClient");
       
        String total = shopper.shop("Orange", 5);
        System.out.println("Total: " + total);
       
        storeClientNode.stop();
    }
}
View Full Code Here

    public static void main(String[] args) throws Exception {
        SCANode2 node = SCANode2Factory.newInstance().createSCANodeFromClassLoader("myapp.composite", MyClientImpl.class.getClassLoader());
        node.start();
        run(node);
        System.out.println("Closing the domain");
        node.stop();
    }

    public static void run(SCANode2 node) throws InterruptedException {
        MyClient myClient = ((SCAClient)node).getService(MyClient.class, "MyClientComponent");
        myClient.aClientMethod();
View Full Code Here

                    System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
                    System.out.println("3 / 2=" + calculatorService.divide(3, 2));
                }
            }
           
            node.stop();
           
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }       
    }
View Full Code Here

            System.in.read();
        } catch (IOException e) {
            e.printStackTrace();
        }

        node.stop();
        System.out.println("Callback server stopped");
    }

}
View Full Code Here

       
        System.out.println("Nodes are running, press enter to stop...");
        System.in.read();
       
        for (SCANode2 runtimeNode: runtimeNodes) {
            runtimeNode.stop();
        }
    }

    private static String print(Composite composite) throws XMLStreamException, ContributionWriteException, ParserConfigurationException, SAXException, IOException {
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.