org.jbpm.runtime.manager.impl
Class PerRequestRuntimeManager
java.lang.Object
org.jbpm.runtime.manager.impl.AbstractRuntimeManager
org.jbpm.runtime.manager.impl.PerRequestRuntimeManager
- All Implemented Interfaces:
- RuntimeManager, org.kie.internal.runtime.manager.InternalRuntimeManager
public class PerRequestRuntimeManager
- extends AbstractRuntimeManager
RuntimeManager implementation that is backed by "Per Request" strategy - meaning that for every call to
getRuntimeEngine
new instance will be delivered with brand new KieSession and TaskService.
The only exception to this is when invoking within same transaction from different places - as then manager
caches currently active instance in ThreadLocal to avoid concurrent modifications - or "lost" of data.
On dispose of runtime engine manager will ensure that it is destroyed as well so it will get removed from
data base to avoid out dated data.
This implementation does not require any special Context
to proceed.
Constructor Summary |
PerRequestRuntimeManager(org.kie.internal.runtime.manager.RuntimeEnvironment environment,
org.kie.internal.runtime.manager.SessionFactory factory,
org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory,
String identifier)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PerRequestRuntimeManager
public PerRequestRuntimeManager(org.kie.internal.runtime.manager.RuntimeEnvironment environment,
org.kie.internal.runtime.manager.SessionFactory factory,
org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory,
String identifier)
getRuntimeEngine
public RuntimeEngine getRuntimeEngine(Context<?> context)
validate
public void validate(KieSession ksession,
Context<?> context)
throws IllegalStateException
- Throws:
IllegalStateException
disposeRuntimeEngine
public void disposeRuntimeEngine(RuntimeEngine runtime)
close
public void close()
- Specified by:
close
in interface RuntimeManager
- Overrides:
close
in class AbstractRuntimeManager
getFactory
public org.kie.internal.runtime.manager.SessionFactory getFactory()
setFactory
public void setFactory(org.kie.internal.runtime.manager.SessionFactory factory)
getTaskServiceFactory
public org.kie.internal.runtime.manager.TaskServiceFactory getTaskServiceFactory()
setTaskServiceFactory
public void setTaskServiceFactory(org.kie.internal.runtime.manager.TaskServiceFactory taskServiceFactory)
init
public void init()
- Specified by:
init
in class AbstractRuntimeManager
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.