Examples of AssemblyContextImpl


Examples of org.apache.tuscany.model.assembly.impl.AssemblyContextImpl

    private void loadContext(Context ctx) throws ConfigurationException {
        ResourceLoader resourceLoader = new ResourceLoaderImpl(ctx.getLoader().getClassLoader());
        ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
        try {
            AssemblyContextImpl modelContext = new AssemblyContextImpl(modelFactory, modelLoader, resourceLoader, ctx.getName());

            ModuleComponentConfigurationLoader loader = BootstrapHelper.getConfigurationLoader(runtime.getSystemContext(), modelContext);

            // Load the SCDL configuration of the application module
            ModuleComponent moduleComponent = loader.loadModuleComponent(ctx.getName(), ctx.getPath());
View Full Code Here

Examples of org.apache.tuscany.model.assembly.impl.AssemblyContextImpl

        // Create a resource loader from the supplied classloader
        ResourceLoader resourceLoader = new ResourceLoaderImpl(classLoader);

        // Create an assembly model context
        return new AssemblyContextImpl(modelFactory, modelLoader, resourceLoader);
    }
View Full Code Here

Examples of org.apache.tuscany.model.assembly.impl.AssemblyContextImpl

        system.publish(new ModuleStart(this));
        return runtime;
    }

    private ModuleComponent createAppModuleComponent(String name) throws ConfigurationLoadException {
        AssemblyContext assemblyContext = new AssemblyContextImpl(systemFactory, null, null);
        ModuleComponent mc = systemFactory.createModuleComponent();
        mc.setName(name);
        Module module = systemFactory.createModule();
        module.setImplementationClass(CompositeContextImpl.class);
        module.setComponentType(MockFactory.getComponentType());
View Full Code Here

Examples of org.apache.tuscany.model.assembly.impl.AssemblyContextImpl

    protected void setUp() throws Exception {
        super.setUp();
        assemblyFactory = new SystemAssemblyFactoryImpl();
        resourceLoader = new ResourceLoaderImpl(getClass().getClassLoader());
        loaderContext = new LoaderContext(resourceLoader);
        modelContext = new AssemblyContextImpl(assemblyFactory, null, resourceLoader);
        xmlFactory = XMLInputFactory.newInstance();
        registry = new StAXLoaderRegistryImpl();
        registry.setMonitor(org.apache.tuscany.databinding.sdo.LoaderTestSupport.NULL_MONITOR);
    }
View Full Code Here

Examples of org.apache.tuscany.model.assembly.impl.AssemblyContextImpl

    public void testChildContextIsolation() throws Exception {
        CompositeContext parent = createContextHierachy();
        CompositeContext child = (CompositeContext) parent.getContext("test.child");
        Component component = factory.createSystemComponent("TestService1", ModuleScopeSystemComponent.class, ModuleScopeSystemComponentImpl.class, Scope.MODULE);
       
        component.initialize(new AssemblyContextImpl(factory, null, null));
        child.registerModelObject(component);
        parent.publish(new ModuleStart(this));
        child.publish(new ModuleStart(this));
        Assert.assertNotNull(child.getContext("TestService1").getInstance(null));
        try {
View Full Code Here

Examples of org.apache.tuscany.model.assembly.impl.AssemblyContextImpl

    protected void setUp() throws Exception {
        super.setUp();
        assemblyFactory = new SystemAssemblyFactoryImpl();
        resourceLoader = new ResourceLoaderImpl(getClass().getClassLoader());
        loaderContext = new LoaderContext(resourceLoader);
        modelContext = new AssemblyContextImpl(assemblyFactory, null, resourceLoader);
        xmlFactory = XMLInputFactory.newInstance();
        registry = new StAXLoaderRegistryImpl();
        registry.setMonitor(NULL_MONITOR);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.