Package org.apache.tuscany.sca.node

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


        public void start() {
            threadContextClassLoader = Thread.currentThread().getContextClassLoader();
            boolean started = false;
            try {
                Thread.currentThread().setContextClassLoader(runtimeClassLoader);
                SCANodeFactory factory = SCANodeFactory.newInstance();
                node = factory.createSCANodeFromClassLoader("DomainManager.composite", getClass().getClassLoader());
                node.start();

                // Set the domain manager's root directory
                DomainManagerConfiguration domainManagerConfiguration = ((SCAClient) node).getService(DomainManagerConfiguration.class, "DomainManagerConfigurationComponent");
                domainManagerConfiguration.setRootDirectory(rootDirectory);
View Full Code Here


     * Bootstrap a new SCA node.
     *
     * @param configurationURI
     */
    public NodeImplementationLauncherBootstrap(String configurationURI) throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        node = new NodeFacade(nodeFactory.createSCANodeFromURL(configurationURI));
    }
View Full Code Here

     *
     * @param configurationURI
     * @param contributionClassLoader
     */
    public NodeImplementationLauncherBootstrap(String compositeURI, ClassLoader contributionClassLoader) throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        node = new NodeFacade(nodeFactory.createSCANodeFromClassLoader(compositeURI, contributionClassLoader));
    }
View Full Code Here

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

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

        public void start() {
            threadContextClassLoader = Thread.currentThread().getContextClassLoader();
            boolean started = false;
            try {
                Thread.currentThread().setContextClassLoader(runtimeClassLoader);
                SCANodeFactory factory = SCANodeFactory.newInstance();
                daemon = factory.createSCANodeFromClassLoader("NodeDaemon.composite", threadContextClassLoader);
                started = true;
            } finally {
                if (!started) {
                    Thread.currentThread().setContextClassLoader(threadContextClassLoader);
                }
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

            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

    /**
     * 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 before each test method
     */
    @BeforeClass
    public static void setUp() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        node = nodeFactory.createSCANodeFromClassLoader("wsdl/wrapped/primitivesservice.composite", null);
        node.start();
        domain = (SCAClient)node;
    }
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.