You yourself can decide how many sessions you want. Sessions are rather
lightweight (so yes, you could simply create a new session for each
process instance) and simply act as an independent processing unit.
So then the question is, how many sessions do you normally need? Well,
simple applications can easily run with only one session. So all
process instances simply run in the same session. If your application
scales or you have multiple applications, you could decide to create
separate sessions, for example for scalability reasons or simply for
making sure they work independently. In some cases (for example when
you want to make sure process instances don't influence each other
unexpectedly or your process instances don't really run centralized but
rather locally embedded in your application), creating a new session for
each instance is valid as well.
Regarding persistence, multiple sessions can write to the same database,
or you can configure your sessions to write to different databases as
well. All up to your preferences.
Kris
Quoting "Chrystall, Greg" <GChrystall(a)nds.com>:
Hi,
When using persistence what is the best approach to creating
sessions?
I can resume a session if the service was shutdown based on the
session ID, but how often should I be creating new sessions?
Can I have multiple sessions writing to the same database?
Any guidance appreciated.
Greg
________________________________
**************************************************************************************
This message is confidential and intended only for the addressee. If
you have received this message in error, please immediately notify
the postmaster(a)nds.com and delete it from your system as well as any
copies. The content of e-mails as well as traffic data may be
monitored by NDS for employment and security purposes. To protect the
environment please do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex,
TW18 4EX, United Kingdom. A company registered in England and Wales.
Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
Disclaimer:
http://www.kuleuven.be/cwis/email_disclaimer.htm