Package org.apache.tuscany.spi.deployer

Examples of org.apache.tuscany.spi.deployer.Deployer


        implementation.setClassLoader(new URLClassLoader(new URL[]{scdlURL}, getClass().getClassLoader()));

        ComponentDefinition<SystemCompositeImplementation> definition =
            new ComponentDefinition<SystemCompositeImplementation>(extensionName, implementation);

        Deployer deployer = (Deployer) composite.getSystemChild("deployer").getServiceInstance();
        Component component = deployer.deploy(composite, definition);

        component.start();
    }
View Full Code Here


        ComponentDefinition<SystemCompositeImplementation> definition =
            new ComponentDefinition<SystemCompositeImplementation>(extensionName,
                implementation);

        Deployer deployer = (Deployer) composite.getSystemChild("deployer").getServiceInstance();
        Component component = deployer.deploy(composite, definition);

        component.start();
    }
View Full Code Here

            throw new LoaderException("Null system SCDL URL");
        }

        XMLInputFactory xmlFactory = XMLInputFactory.newInstance("javax.xml.stream.XMLInputFactory", systemClassLoader);
        Bootstrapper bootstrapper = new DefaultBootstrapper(monitor, xmlFactory);
        Deployer bootDeployer = bootstrapper.createDeployer();

        // create and start the core runtime
        runtime = bootstrapper.createRuntime();
        runtime.start(); // REVIEW: is this redundant w/ the composite.start() call below?

        // initialize the runtime info
        CompositeComponent parent = runtime.getSystemComponent();
        RuntimeInfo runtimeInfo = new LauncherRuntimeInfo(getInstallDirectory(), getApplicationRootDirectory(), true);
        parent.registerJavaObject("RuntimeInfo", RuntimeInfo.class, runtimeInfo);

        // registory the monitor factory
        parent.registerJavaObject("MonitorFactory", MonitorFactory.class, monitor);

        // create a ComponentDefinition to represent the component we are going to deploy
        SystemCompositeImplementation moduleImplementation = new SystemCompositeImplementation();
        moduleImplementation.setScdlLocation(systemScdl);
        moduleImplementation.setClassLoader(systemClassLoader);
        ComponentDefinition<SystemCompositeImplementation> definition =
            new ComponentDefinition<SystemCompositeImplementation>(
                ComponentNames.TUSCANY_SYSTEM, moduleImplementation);

        // deploy the component into the runtime under the system parent
        composite = (CompositeComponent) bootDeployer.deploy(parent, definition);

        // start the system
        composite.start();

        deployer = (Deployer) composite.getSystemChild("deployer").getServiceInstance();
View Full Code Here

        componentDefinition.setName("newDeployer");
        CompositeComponent component = (CompositeComponent) deployer.deploy(parent, componentDefinition);
        assertNotNull(component);
        verify(parent);
        component.start();
        Deployer newDeployer = (Deployer) component.getSystemServiceInstance("deployer");
        assertNotNull(newDeployer);

/*      // FIXME
        // load the boot2 file using the newly loaded deployer
        parent.reset();
View Full Code Here

            throw new TuscanyInitException("Could not find system SCDL");
        }

        try {
            // deploy the system scdl
            Deployer deployer = bootstrapper.createDeployer();
            tuscanySystem = deploySystemScdl(deployer,
                systemComponent,
                ComponentNames.TUSCANY_SYSTEM,
                getSystemScdl(),
                bootClassLoader);
View Full Code Here

        systemComponent.start();

        try {
            // deploy the system scdl
            Deployer deployer = bootstrapper.createDeployer();
            tuscanySystem = deploySystemScdl(deployer,
                systemComponent,
                ComponentNames.TUSCANY_SYSTEM,
                getSystemScdl(),
                bootClassLoader);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.spi.deployer.Deployer

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.