From: Wolfgang M. <wol...@ex...> - 2009-05-11 09:53:00
|
> When they merely 'use' the application, I don't keep sessions using > functions from the session namespace: all state is stored explicitly in > eXist and a ticket is passed to and from the client to retrieve that state. > I've noticed that a JSESSION cookie is returned with each response, > regardless whether I've created a session in the code or not. This was a bug and has been fixed recently. Some eXist interfaces used to always create a session. > Will a request with a session identifier encoded in the url be processed by > the same thread that sent the page with that identifier in the first place? > Or is there no such relation between sessions and threads? There is no relation. Threads are handled by the servlet engine. It may pass the request to any idle thread. > I would like to experiment with the various settings, but do not understand > them quite well enough: > * <pool max="20" min="1" sync-period="120000" > wait-before-shutdown="120000"/> The "Configuration" documentation page says: > "This pool restricts the number of parallel (basic) operations that can be > executed by the database". Are such connections threads? No. The pool contains the actual low-level database worker objects. Every IO operation on the database needs to obtain one of those objects first. However, a thread does not necessarily correspond to one worker object. Most operations will acquire/release many worker objects in a very fast sequence, allowing other threads to perform other actions in between. A pool of 20 can thus handle a much larger number of threads. You can increase it, though it doesn't make much sense to choose a too large value since IO will become a limiting factor. > * How to set the session expiration? The jetty configuration has these > elements: > <Set name="MinThreads">10</Set> > <Set name="MaxThreads">200</Set> > <Set name="MaxIdleTimeMs">30000</Set> > Does MaxIdleTimeMs govern the expiration of sessions in the sense of the > functions in the session namespace? The session timeout is a standard parameter which can be set in web.xml: <session-config> <session-timeout>30</session-timeout> </session-config> > And a related question: is there a way to trigger some action when a session > expires? I noticed an old discussion in the mailing lists about that topic, > wondered whether something has changed since. No, nothing has been implemented yet. I never really needed that feature. However, I would not object if someone provided a good solution. Wolfgang |