[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

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

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

Start a new discussion in jBPM at Community

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