Examples of RuntimeEnvironment


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

        // 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

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

        BundleContext bundleContext = sysmodule.adapt(Bundle.class).getBundleContext();
        servletContext.setAttribute(BundleContext.class.getName(), bundleContext);
    }

    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

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

        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

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

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

        // 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

Examples of org.kie.api.runtime.manager.RuntimeEnvironment

        Properties auth = new Properties();
        auth.setProperty("max", "Standard");

        UserGroupCallback userGroupCallback = new JBossUserGroupCallbackImpl(auth);

        RuntimeEnvironment environment = RuntimeEnvironmentBuilder.getDefault()
                .entityManagerFactory(emf)
                .userGroupCallback(userGroupCallback)
                .addAsset(ResourceFactory.newClassPathResource("jbpm/processes/sample1.bpmn2"), ResourceType.BPMN2)
                .addEnvironmentEntry(EnvironmentName.TRANSACTION_MANAGER, aptm)
                .get();
View Full Code Here

Examples of org.kie.api.runtime.manager.RuntimeEnvironment

    }

    @Test
    public void testJbpmRuntimeManager() {
        refresh();
        RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newEmptyBuilder()
            .addAsset(
            KieServices.Factory.get().getResources().newClassPathResource(
            "Evaluation.bpmn",getClass().getClassLoader()), ResourceType.BPMN2)
            .get();
        RuntimeManager runtimeManager = RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(environment);
View Full Code Here

Examples of org.kie.api.runtime.manager.RuntimeEnvironment

        props.setProperty("krisv", "IT");
        props.setProperty("john", "HR");
        props.setProperty("mary", "PM");
        EntityManagerFactory emf = (EntityManagerFactory) applicationContext.getBean("myEmf");
        PlatformTransactionManager txManager = (PlatformTransactionManager) applicationContext.getBean("txManager");
        RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder()
          .entityManagerFactory(emf)
          .addEnvironmentEntry(EnvironmentName.TRANSACTION_MANAGER, txManager)
            .addAsset(
            KieServices.Factory.get().getResources().newClassPathResource(
            "Evaluation.bpmn",getClass().getClassLoader()), ResourceType.BPMN2)
View Full Code Here

Examples of org.kie.api.runtime.manager.RuntimeEnvironment

public class KieRuntimeManagerFactoryBean {

    public static Object createRuntime(String type, String asset, String assetType){

        RuntimeEnvironmentBuilder builder;
        RuntimeEnvironment environment;
        RuntimeManager manager;

        if ("empty".equalsIgnoreCase(type)) {
            builder = RuntimeEnvironmentBuilder.Factory.get().newEmptyBuilder();
        } else if ("default".equalsIgnoreCase(type)) {
View Full Code Here

Examples of org.kie.internal.runtime.manager.RuntimeEnvironment

        runtimeManager.disposeRuntimeEngine(runtimeEngine);
        runtimeManager.close();
    }

    private static RuntimeManager getRuntimeManager(String process) {
        RuntimeEnvironment environment = RuntimeEnvironmentBuilder.getEmpty()
                .addAsset(ResourceFactory.newClassPathResource(process), ResourceType.BPMN2)
                .get();
        return RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(environment);
    }
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.