JBoss Community

Re: Using multiple kSessions

created by Richard Evans in jBPM - View the full discussion

Hello Maurcion.

 

What are you trying to achieve with the multiple sessions?

=> Get some throughput. I have some latent service tasks so want some concurrency.

=> I realise that an alternative would be to make the service tasks async but this option (I thought) would be a little easier.

 

I mean, what's the purpose of having multiple sessions?

=> Without multiple sessions, multiple threads synchronise on kSession methods and activity is not concurrent

 

Are you running a process in each of those sessions?.

=> Yes.

 

When are the threads being called?

=> I have a request queue (specific to my app) which is queried in one scheduler thread.

=> When the scheduler finds a request it hands to a thread from a pool. Each thread in the pool has its own ksession and starts a corresponding process.

(=> If the process hits a timer then it resumes in a session-specific time  thread.)

 

Does this make sense?

Thanks for your help!

Richard

Reply to this message by going to Community

Start a new discussion in jBPM at Community