JBoss Community

What is the right way to work with persistent sessions and processes?

created by Miljenko Norsic in jBPM - View the full discussion

Hi,

 

I've seen a couple of samples that make use of JPA persistence built into the jBPM5, but I do not understand what is the preferred way to work with persistent knowledge sessions and processes?

 

For example, I'd like to know when to create a new persistent knowledge session (and its processes)? One ksession for everything? Or maybe one ksession per group of processes that are related to the same fact (eg. if I'm creating a set of processes that manage Person facts, is it normal to create one persistent ksession per Person fact, and create processes on top of that ksession)?

 

I wonder because if the number of facts per ksession is high, I might have a performance problem when serializing/deserializing facts from database...

 

Another question: is it possible to use "custom" persistence strategy, e.g. if I want Person object instance from ksession to be stored into a separate table instead into a raw byte array?

 

Thanks,

Miljenko

Reply to this message by going to Community

Start a new discussion in jBPM at Community