org.jbpm.session
Class AbstractSessionManager
java.lang.Object
org.jbpm.session.AbstractSessionManager
- All Implemented Interfaces:
- SessionManager
- Direct Known Subclasses:
- NewSessionSessionManager, SingletonSessionManager
public abstract class AbstractSessionManager
- extends Object
- implements SessionManager
A session manager holds a reference to a ksession and task service. Each thread should request
it's own session manager from the session manager factory.
When the session manager is no longer needed, it should be disposed.
The session manager will make sure that the same ksession and task service will be reused for multiple
invocations within the same transaction, so that subsequent invocations will be able to see the (uncommitted)
changes of previous calls.
TODO: do we allow multiple calls to the same session manager
- when not using user transactions? (yes)
- when using user transactions
- do we expect the user to always call dispose() once? (or can we use transaction synchronization here, but
how to know which one, do we expect user to init transaction listener with method call? or multiple
version of session manager)
- can we use the transaction synchronization to always dispose the ksession at the end of the transaction
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sessionEnvironment
protected SessionEnvironment sessionEnvironment
AbstractSessionManager
public AbstractSessionManager()
getKnowledgeSession
public org.kie.runtime.StatefulKnowledgeSession getKnowledgeSession()
- Specified by:
getKnowledgeSession
in interface SessionManager
getTaskService
public TaskService getTaskService()
- Specified by:
getTaskService
in interface SessionManager
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.