Package org.apache.tuscany.sca.node

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


        servletContext = config.getServletContext();
        if (servletContext.getAttribute(SCA_NODE_ATTRIBUTE) == null) {
            initContextPath(config);
            contributionRoot = getContributionRoot(servletContext);
            NodeFactory factory = NodeFactory.newInstance();
            node = factory.createNode("WEB-INF/web.composite", new Contribution(contributionRoot, contributionRoot));
            node.start();
            servletContext.setAttribute(SCA_NODE_ATTRIBUTE, node);
        }

        // Initialize the registered Servlets
View Full Code Here


     */
    public NodeImplementationLauncherBootstrap(String compositeURI, String[] uris, String[] locations) throws Exception {
        NodeFactory nodeFactory = NodeFactory.newInstance();
        Contribution[] contributions = new Contribution[uris.length];
        for (int i = 0; i < uris.length; i++) {
            contributions[i] = new Contribution(uris[i], locations[i]);
        }
        node = new NodeFacade(nodeFactory.createNode(compositeURI, contributions));
    }
View Full Code Here

     */
    public NodeImplementationLauncherBootstrap(String compositeURI, String compositeContent, String[] uris, String[] locations) throws Exception {
        NodeFactory nodeFactory = NodeFactory.newInstance();
        Contribution[] contributions = new Contribution[uris.length];
        for (int i = 0; i < uris.length; i++) {
            contributions[i] = new Contribution(uris[i], locations[i]);
        }
        node = new NodeFacade(nodeFactory.createNode(compositeURI, compositeContent, contributions));
    }
View Full Code Here

    private Node node;
   
    @Before
    public void setUp() throws Exception {
        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
        node = NodeFactory.newInstance().createNode("TestNode.composite", new Contribution("test", contribution));
        node.start();
    }
View Full Code Here

            + " </composite>";

    @Test
    public void testNodeWithCompositeContent() {
        NodeFactory factory = new NodeFactoryImpl();
        Contribution contribution = new Contribution("c1", new File("target/test-classes").toURI().toString());
        String compositeURI = "HelloWorld.composite";
        Node node = factory.createNode(compositeURI, composite, contribution);
        testNode(node);
    }
View Full Code Here

    }
   
    @Test
    public void testNodeWithRelativeCompositeURI() {
        NodeFactory factory = new NodeFactoryImpl();
        Contribution contribution = new Contribution("c1", new File("target/test-classes").toURI().toString());
        String compositeURI = "HelloWorld.composite";
        Node node = factory.createNode(compositeURI, contribution);
        testNode(node);
    }
View Full Code Here

    }

    @Override
    protected void setUp() throws Exception {
        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
        node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite", new Contribution("test", contribution));
        node.start();
    }
View Full Code Here

    private Node node;
   
    @Before
    public void setUp() throws Exception {
        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
        node = NodeFactory.newInstance().createNode("TestNode.composite", new Contribution("test", contribution));
        node.start();
    }
View Full Code Here

    @BeforeClass
    public static void init() throws Exception {
        try {
            String contribution = ContributionLocationHelper.getContributionLocation(BindingTestCase.class);
            node = NodeFactory.newInstance().createNode("RMIBindingTest.composite", new Contribution("test", contribution));
            node.start();
            helloWorldRmiService = node.getService(HelloWorldRmiService.class, "HelloWorldRmiServiceComponent");
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

            boolean started = false;
            try {
                Thread.currentThread().setContextClassLoader(runtimeClassLoader);
                NodeFactory factory = NodeFactory.newInstance();
                String contribution = ContributionLocationHelper.getContributionLocation(getClass());
                daemon = factory.createNode("NodeDaemon.composite", new Contribution("node-runtime", contribution));
                started = true;
            } finally {
                if (!started) {
                    Thread.currentThread().setContextClassLoader(threadContextClassLoader);
                }
View Full Code Here

TOP

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

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.