Package org.apache.tuscany.core.bootstrap

Examples of org.apache.tuscany.core.bootstrap.DefaultBootstrapper


        if (systemScdl == null) {
            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);
View Full Code Here


    }

    protected void setUp() throws Exception {
        super.setUp();
        XMLInputFactory xmlFactory = XMLInputFactory.newInstance();
        Bootstrapper bootstrapper = new DefaultBootstrapper(new NullMonitorFactory(), xmlFactory);
        deployer = (DeployerImpl) bootstrapper.createDeployer();
        deploymentContext = new RootDeploymentContext(null, xmlFactory, null, null);
        implementation = new SystemCompositeImplementation();
        implementation.setClassLoader(getClass().getClassLoader());
        componentDefinition = new ComponentDefinition<SystemCompositeImplementation>(implementation);
    }
View Full Code Here

        MonitorFactory mf = getMonitorFactory();


        XMLInputFactory xmlFactory = XMLInputFactory.newInstance("javax.xml.stream.XMLInputFactory", bootClassLoader);

        Bootstrapper bootstrapper = new DefaultBootstrapper(mf, xmlFactory);
        runtime = bootstrapper.createRuntime();
        runtime.start();
        systemComponent = runtime.getSystemComponent();

        // register the runtime info provided by the host
        // FIXME andyp@bea.com -- autowire appears to need an exact type match,
        // hence the need to register this twice
        systemComponent.registerJavaObject(RuntimeInfo.COMPONENT_NAME,
            RuntimeInfo.class,
            (WebappRuntimeInfo) getRuntimeInfo());
        systemComponent.registerJavaObject(WebappRuntimeInfo.COMPONENT_NAME,
            WebappRuntimeInfo.class,
            (WebappRuntimeInfo) getRuntimeInfo());

        // register the monitor factory provided by the host
        systemComponent.registerJavaObject("MonitorFactory", MonitorFactory.class, mf);

        systemComponent.start();

        if (getSystemScdl() == null) {
            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

        // Read optional system monitor factory classname
        MonitorFactory mf = getMonitorFactory();

        XMLInputFactory xmlFactory = XMLInputFactory.newInstance("javax.xml.stream.XMLInputFactory", bootClassLoader);

        Bootstrapper bootstrapper = new DefaultBootstrapper(mf, xmlFactory);
        runtime = bootstrapper.createRuntime();
        runtime.start();
        systemComponent = runtime.getSystemComponent();

        // register the runtime info provided by the host
        RuntimeInfo runtimeInfo = getRuntimeInfo();
        systemComponent.registerJavaObject(RuntimeInfo.COMPONENT_NAME, RuntimeInfo.class, runtimeInfo);
        systemComponent.registerJavaObject(StandaloneRuntimeInfo.COMPONENT_NAME,
                                           StandaloneRuntimeInfo.class,
                                           (StandaloneRuntimeInfo) runtimeInfo);

        // register the monitor factory provided by the host
        systemComponent.registerJavaObject("MonitorFactory", MonitorFactory.class, mf);

        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.core.bootstrap.DefaultBootstrapper

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.