Package org.apache.tuscany.core.implementation.system.model

Examples of org.apache.tuscany.core.implementation.system.model.SystemCompositeImplementation


        extensions.put(extensionName, extentionSCDL);
    }

    protected void deployExtension(CompositeComponent composite, String extensionName, URL scdlURL)
        throws LoaderException {
        SystemCompositeImplementation implementation = new SystemCompositeImplementation();
        implementation.setScdlLocation(scdlURL);
        implementation.setClassLoader(new URLClassLoader(new URL[]{scdlURL}, getClass().getClassLoader()));

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

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


        extensions.put(extensionName, extentionSCDL);
    }

    protected void deployExtension(CompositeComponent composite, String extensionName, URL scdlURL)
        throws LoaderException {
        SystemCompositeImplementation implementation = new SystemCompositeImplementation();
        implementation.setScdlLocation(scdlURL);
        URLClassLoader classLoader = new URLClassLoader(new URL[]{scdlURL}, getClass().getClassLoader());
        implementation.setClassLoader(classLoader);

        ComponentDefinition<SystemCompositeImplementation> definition =
            new ComponentDefinition<SystemCompositeImplementation>(extensionName,
                implementation);
View Full Code Here

    }

    public Component build(CompositeComponent parent,
                           ComponentDefinition<SystemCompositeImplementation> componentDefinition,
                           DeploymentContext deploymentContext) throws BuilderConfigException {
        SystemCompositeImplementation impl = componentDefinition.getImplementation();
        CompositeComponentType<?, ?, ?> componentType = impl.getComponentType();

        // create lists of all components and services in this composite
        List<ComponentDefinition<? extends Implementation<?>>> allComponents =
            new ArrayList<ComponentDefinition<? extends Implementation<?>>>();
        allComponents.addAll(componentType.getComponents().values());
View Full Code Here

        // 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
View Full Code Here

            // assume that the URL we were given is not a JAR file so just use the supplied resource
            scdlLocation = url;
        }

        // create a ComponentDefinition to represent the component we are going to deploy
        SystemCompositeImplementation implementation = new SystemCompositeImplementation();
        implementation.setScdlLocation(scdlLocation);
        implementation.setClassLoader(extensionCL);
        ComponentDefinition<SystemCompositeImplementation> definition =
            new ComponentDefinition<SystemCompositeImplementation>(name, implementation);

        // FIXME: [rfeng] Should we reset the thread context class loader here?
        // From the debugger with tomcat, the current TCCL is the RealmClassLoader
View Full Code Here

                                                  String name,
                                                  URL systemScdl,
                                                  ClassLoader systemClassLoader)
        throws LoaderException {

        SystemCompositeImplementation impl = new SystemCompositeImplementation();
        impl.setScdlLocation(systemScdl);
        impl.setClassLoader(systemClassLoader);
        ComponentDefinition<SystemCompositeImplementation> definition =
            new ComponentDefinition<SystemCompositeImplementation>(name, impl);

        return (CompositeComponent) deployer.deploy(parent, definition);
    }
View Full Code Here

        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

TOP

Related Classes of org.apache.tuscany.core.implementation.system.model.SystemCompositeImplementation

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.