Package org.apache.tuscany.sca

Examples of org.apache.tuscany.sca.TuscanyRuntime.createNode()


    @Test
    public void startDistributedTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, InterruptedException {
        TuscanyRuntime runtime = TuscanyRuntime.newInstance();
        try {
        Node node = runtime.createNode("uri:ImportTestCase");
        Node node2 = runtime.createNode("uri:ImportTestCase");
       
        node.installContribution("src/test/resources/sample-helloworld.jar");
        Assert.assertEquals(1, node.getInstalledContributionURIs().size());
        Assert.assertEquals(1, node2.getInstalledContributionURIs().size());
View Full Code Here


    @Test
    public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        TuscanyRuntime runtime = TuscanyRuntime.newInstance();
        try {
        Node node1 = runtime.createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44331");
        node1.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null);
        node1.startComposite("helloworld", "helloworld.composite");

        Node node2 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44332&wka=127.0.0.1:44331");
View Full Code Here

    @Test
    public void distributedDomain() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        TuscanyRuntime runtime = TuscanyRuntime.newInstance();
        try {
        Node node = runtime.createNode("uri:DomainCompositeTestCase");
        testIt(node);
        } finally { runtime.stop(); }
    }

    private void testIt(Node node) throws ContributionReadException, ActivationException, ValidationException {
View Full Code Here

public class StopStartTestCase {

    @Test
    public void startStopInstall() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        TuscanyRuntime runtime = TuscanyRuntime.newInstance();
        Node node1 = runtime.createNode("uri:StartStopTestCase?wka=127.0.0.1:9876");
        Assert.assertEquals("Hello Amelia", node1.getService(HelloworldService.class, "HelloworldComponent").sayHello("Amelia"));
       
        String curi = node1.getInstalledContributionURIs().get(0);
       
        node1.stopComposite(curi, "Helloworld.composite");
View Full Code Here

         //TuscanyRuntime.runComposite("Calculator.composite", "target/classes");
        Node node = null;
           
        try {
            TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
            node = tuscanyRuntime.createNode();
            node.installContribution("AsyncSample", "target/classes", null, null);
            node.startComposite("AsyncSample", "Calculator.composite");
            node.startComposite("AsyncSample", "CalculatorClient.composite");
           
            SCAClientFactory scaClientFactory = SCAClientFactory.newInstance(URI.create("default"));
View Full Code Here

    @Before
    public void startClient() throws Exception {
        try {
            TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
            node = tuscanyRuntime.createNode("myDomain");
           
            node.installContribution("contrib1", "src/main/resources/recursive", null, null);
            node.startComposite("contrib1", "Outer.composite");
            node.startComposite("contrib1", "Client.composite");
View Full Code Here

    @Before
    public void startClient() throws Exception {
        try {
            TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
            node = tuscanyRuntime.createNode("myDomain");
           
            node.installContribution("contrib1", "src/main/resources/recursive", null, null);
           
            node.startComposite("contrib1", "Inner.composite");
            node.startComposite("contrib1", "Outer.composite");
View Full Code Here

        StatusImpl.statusString = "";
       
        TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();

        // create a Tuscany node
        node = tuscanyRuntime.createNode();
       
        // install a contribution
        node.installContribution("HelloworldContrib", "target/classes", null, null);
       
        // start a composite
View Full Code Here

    public void testNoExceptionMessageShutdown() throws Exception{
       
        TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();

        // create a Tuscany node
        node = tuscanyRuntime.createNode();
       
        // install a contribution
        node.installContribution("HelloworldContrib", "target/classes", null, null);
       
        // start a composite
View Full Code Here

        HelloworldClientImplCE.throwTestExceptionOnConstruction = true;
       
        TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();

        // create a Tuscany node
        node = tuscanyRuntime.createNode();
       
        // install a contribution
        node.installContribution("HelloworldContrib", "target/classes", null, null);
       
        // start a composite
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.