[jboss-dev-forums] [jBPM Development] - Re: org.jbpm.workflow.instance.WorkflowRuntimeException: -- Illegal method call. This session was previously disposed.
Maciej Swiderski
do-not-reply at jboss.com
Thu Feb 21 05:46:18 EST 2013
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion
"Re: org.jbpm.workflow.instance.WorkflowRuntimeException: -- Illegal method call. This session was previously disposed."
To view the discussion, visit: https://community.jboss.org/message/798781#798781
--------------------------------------------------------------
problem is that you try to use (probably by mistake) a disposed session:
// Let's reload the session
StatefulKnowledgeSession loadedKsession = JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, kbase, null, env);
// All the listeners and WorkItemHandlers are volatile, so we need to register them each time that we reload the session
// from the DB.
LocalHTWorkItemHandler localHTWorkItemHandler2 = new LocalHTWorkItemHandler(client, *ksession*);
ksession (marked in bold) is disposed session and thus should not be used any more. Use instead session that you just loaded (loadedKsession) and the program will work just fine.
HTH
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/798781#798781]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2035]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20130221/c10d0d66/attachment.html
More information about the jboss-dev-forums
mailing list