Package org.jboss.gravia.provision.spi

Examples of org.jboss.gravia.provision.spi.RuntimeEnvironment


        provisionerRegistration = syscontext.registerService(Provisioner.class, provisioner, null);
        return provisioner;
    }

    private RuntimeEnvironment createEnvironment(ServletContext servletContext, Runtime runtime) {
        return new RuntimeEnvironment(runtime).initDefaultContent();
    }
View Full Code Here


        // event because the Bundle's class loader is not (yet) available
        // We manually add the resource to the {@link RuntimeEnvironment}
        // [TODO] Revisit {@link ModuleListener} handling for OSGi
        Resource envres = environment.getResource(identity);
        if (envres == null && module != null) {
            RuntimeEnvironment runtimeEnv = RuntimeEnvironment.assertRuntimeEnvironment(environment);
            runtimeEnv.addRuntimeResource(resource);
        }

        return new BundleResourceHandle(resource, module, bundle);
    }
View Full Code Here

        // event because the Bundle's class loader is not (yet) available
        // We manually add the resource to the {@link RuntimeEnvironment}
        // [TODO] Revisit {@link ModuleListener} handling for OSGi
        Resource envres = environment.getResource(identity);
        if (envres == null && module != null) {
            RuntimeEnvironment runtimeEnv = RuntimeEnvironment.assertRuntimeEnvironment(environment);
            runtimeEnv.addRuntimeResource(resource);
        }

        return new BundleResourceHandle(resource, module, bundle);
    }
View Full Code Here

        if (registration == null && resref != null  & repref != null) {
            context.removeServiceListener(listener);
            Resolver resolver = context.getService(resref);
            Repository repository = context.getService(repref);
            Runtime runtime = RuntimeLocator.getRequiredRuntime();
            RuntimeEnvironment environment = new RuntimeEnvironment(runtime).initDefaultContent();
            BundleContextResourceInstaller installer = new BundleContextResourceInstaller(context, environment);
            Provisioner provisioner = new DefaultProvisioner(environment, resolver, repository, installer);
            registration = context.registerService(Provisioner.class, provisioner, null);
        }
    }
View Full Code Here

    @SuppressWarnings("deprecation")
    public void start(StartContext startContext) throws StartException {
        Runtime runtime = injectedRuntime.getValue();
        MatchPolicy matchPolicy = new DefaultMatchPolicy();
        File modulesDir = injectedServerEnvironment.getValue().getModulesDir();
        environment = new RuntimeEnvironment(runtime, new SystemResourceStore(modulesDir), matchPolicy);

        ModuleContext syscontext = runtime.getModuleContext();
        registration = syscontext.registerService(RuntimeEnvironment.class, environment, null);
    }
View Full Code Here

                runtime = RuntimeLocator.createRuntime(factory, new DefaultPropertiesProvider(new HashMap<String, Object>(), true, DEFAULT_ENV_PREFIX));
                runtime.init();

                // Register the {@link RuntimeEnvironment} and {@link ResourceInstaller}
                ModuleContext syscontext = runtime.getModuleContext();
                RuntimeEnvironment environment = new RuntimeEnvironment(runtime);
                EmbeddedResourceInstaller resourceInstaller = new EmbeddedResourceInstaller(environment);
                syscontext.registerService(RuntimeEnvironment.class, environment, null);
                syscontext.registerService(ResourceInstaller.class, resourceInstaller, null);
            }
        }
View Full Code Here

            throw new IllegalStateException(ex);
        }
    }

    private void registerServices(ServletContext servletContext, Runtime runtime) {
        RuntimeEnvironment environment = new RuntimeEnvironment(runtime).initDefaultContent();
        TomcatResourceInstaller installer = new TomcatResourceInstaller(environment);
        ModuleContext syscontext = runtime.getModuleContext();
        registrations.add(syscontext.registerService(RuntimeEnvironment.class, environment, null));
        registrations.add(syscontext.registerService(ResourceInstaller.class, installer, null));
    }
View Full Code Here

            sreg.unregister();
        }
    }

    private void registerServices(ServletContext servletContext, Runtime runtime) {
        RuntimeEnvironment environment = new RuntimeEnvironment(runtime).initDefaultContent();
        TomcatResourceInstaller installer = new TomcatResourceInstaller(environment);
        ModuleContext syscontext = runtime.getModuleContext();
        registrations.add(syscontext.registerService(RuntimeEnvironment.class, environment, null));
        registrations.add(syscontext.registerService(ResourceInstaller.class, installer, null));
    }
View Full Code Here

        // event because the Bundle's class loader is not (yet) available
        // We manually add the resource to the {@link RuntimeEnvironment}
        // [TODO] Revisit {@link ModuleListener} handling for OSGi
        Resource envres = environment.getResource(identity);
        if (envres == null && module != null) {
            RuntimeEnvironment runtimeEnv = RuntimeEnvironment.assertRuntimeEnvironment(environment);
            runtimeEnv.addRuntimeResource(resource);
        }

        return new BundleResourceHandle(resource, module, bundle);
    }
View Full Code Here

        Resolver resolver = registerResolverService(runtime);
        registerProvisionerService(servletContext, runtime, repository, resolver);
    }

    private Provisioner registerProvisionerService(ServletContext servletContext, Runtime runtime, Repository repository, Resolver resolver) {
        RuntimeEnvironment environment = createEnvironment(servletContext, runtime);
        TomcatResourceInstaller installer = new TomcatResourceInstaller(environment);
        Provisioner provisioner = new DefaultProvisioner(environment, resolver, repository, installer);
        ModuleContext syscontext = runtime.getModuleContext();
        provisionerRegistration = syscontext.registerService(Provisioner.class, provisioner, null);
        return provisioner;
View Full Code Here

TOP

Related Classes of org.jboss.gravia.provision.spi.RuntimeEnvironment

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.