[jboss-user] [jBPM] - When to call kSession.dispose()?
Ryan Peterson
do-not-reply at jboss.com
Mon Sep 19 17:58:35 EDT 2011
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&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110919/bbbae026/attachment.html
More information about the jboss-user
mailing list