Ryan Peterson [
http://community.jboss.org/people/rrpeterson] created the discussion
"When to call kSession.dispose()?"
To view the discussion, visit:
http://community.jboss.org/message/627318#627318
--------------------------------------------------------------
I was wondering: How often should kSession.dispose() be called for any given session?
For instance, suppose you have the following:
// create kSession
JPAKnowledgeService.newStatefulKnowledgeSession()
// do some operations with kSession:
ksession.getWorkItemManager().registerWorkItemHandler(x, y);
...
// start the process instance
kSession.startProcess(processId, params)
// Should kSession.dispose() be called here, since we're doing doing work on the
ksession for now?
Suppose we re-load the session later:
JPAKnowledgeService.loadStatefulKnowledgeSession()
// Should kSession.dispose() only be called here?
I'm mostly unsure if .dispose() needs to be called after each transaction with a
kSession, or if it should only be called once the kSession is complete/aborted?
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/627318#627318]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]