[jboss-user] [jBPM] - jBPM persistent session ids

Jason Jho do-not-reply at jboss.com
Tue Apr 17 18:01:13 EDT 2012

Jason Jho [https://community.jboss.org/people/jasonjho] created the discussion

"jBPM persistent session ids"

To view the discussion, visit: https://community.jboss.org/message/730695#730695

I am using jBPM 5.2.0 and I have a question about ksession ids.  My understanding is that this session ID is used to reload a persisted session, but there is no clear indication how this is supposed to work when a server is restarted.  For example, if I have a session ID [1] for a workflow process that is persisted and the server goes down, I can reload the session back to it's previous state using this same ID.  However, how am I guaranteed that any new session ID created by the same knowledge base will be uniquely different from the persisted ID?


int id = ksession.getId() ...

// server shuts down - restarts
int savedId = geSavedId();
session = JPAKnowledgeService.+loadStatefulKnowledgeSession+(savedId, kbase, *null*, env);

newSession = kbase.newStatelessKnowledgeSession(...)
newSession.getId() = ???

In the above scenario, could it be possible for newSession.getId() to have the same integer value as the previously saved ID?
If so, how would one be able to distinguish the 2 different sessions?

Thanks for any help.

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/20120417/1c5e9b3d/attachment.html 

More information about the jboss-user mailing list