Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.SCANodeFactory


    private static SCANode node;

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmstextxmlinjmsobjectout/helloworld.composite",
                                     new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here


    private static SCANode node;

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmsbytesxml/helloworld.composite",
                                     new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here

    private static SCANode node;

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmsbytes/helloworld.composite",
                                     new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here

        CalculatorTestCase.calculatorService = calculatorService;
    }

    @Override
    protected void setUp() throws Exception {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANodeFromClassLoader("CalculatorTest.composite", getClass().getClassLoader());
        node.start();
    }
View Full Code Here

    /**
     * Runs once before the tests
     */
    @BeforeClass
    public static void setUp() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        node = nodeFactory.createSCANodeFromClassLoader("wsdl/wrapped/standard-types-service.composite", null);
        node.start();
        domain = (SCAClient)node;
    }
View Full Code Here

     * Runs once before running the tests
     */
    @BeforeClass
    public static void setUp() throws Exception {
        try {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        node = nodeFactory.createSCANodeFromClassLoader("wsdl/wrapped/helloservice.composite", null);
        node.start();
        client = (SCAClient)node;
        }catch(Throwable e) {
            e.printStackTrace();
        }
View Full Code Here

            throw new IllegalArgumentException(e);
        }
    }

    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();

        List<SCAContribution> contributions = new ArrayList<SCAContribution>();

        if (composites != null && composites.length > 1) {
            // Create an aggregated composite that includes all the composites as Node API only takes one composite
            String content = createDeploymentComposite(applicationClassLoader, composites);
            // Create SCA contributions
            for (String location : contributionURLs) {
                contributions.add(new SCAContribution(location, location));
            }
            node =
                factory.createSCANode("http://tuscany.apache.org/xmlns/sca/1.0/aggregated", content, contributions
                    .toArray(new SCAContribution[contributions.size()]));
        } else {
            for (String location : contributionURLs) {
                contributions.add(new SCAContribution(location, location));
            }
            String composite = (composites != null && composites.length >= 1) ? composites[0] : null;
            if (!contributions.isEmpty()) {
                node =
                    factory.createSCANode(composite, contributions.toArray(new SCAContribution[contributions.size()]));
            } else {
                node = factory.createSCANodeFromClassLoader(composite, applicationClassLoader);
            }
        }
        client = (SCAClient)node;
        compositeActivator = ((NodeImpl)node).getCompositeActivator();
        components = new HashMap<String, Component>();
View Full Code Here

       
        // Determine the node configuration URI
        String nodeConfiguration = NodeImplementationLauncherUtil.nodeConfigurationURI(nodeName);
       
        // Create the SCA node
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        node = nodeFactory.createSCANodeFromURL(nodeConfiguration);
       
        // Register the Servlet host
        ServletHostExtensionPoint servletHosts = servletHosts(node);
        servletHosts.getServletHosts().clear();
        servletHosts.addServletHost(servletHost);
View Full Code Here

            timeout = Long.parseLong(args[0]);
        }

        System.out.println("Starting the Sample SCA Calculator...");

        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANodeFromClassLoader("Calculator.composite", CalculatorServer.class.getClassLoader());
        node.start();

        if (timeout < 0) {
            System.out.println("Press Enter to Exit...");
            System.in.read();
View Full Code Here

            timeout = Long.parseLong(args[0]);
        }
       
        System.out.println("Starting the Sample SCA StockQuote Service...");

        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANodeFromClassLoader("StockQuote.composite", StockQuoteServer.class.getClassLoader());
        node.start();
       
        // Method 1: To access the Spring Application Context instance
        ApplicationContext ctx = SCAApplicationContextProvider.getApplicationContext();
        if (ctx.containsBean("StockQuoteServiceBean"))
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.node.SCANodeFactory

Copyright © 2018 www.massapicom. 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.