1) The default session store is memory resident, does WOSession hook into whatever session distribution i setup
for the containers?
I don't think that actually works - the sessions are "sticky" to one container.
2) The instance number. As far as i can see this property becomes meaningless when running in servlet containers.
If the session can be distributed, this may not be an issue, but i not....
Correct; and in WO 5.4 I see for example in WOContext.completeURLWithRequestHandlerKey(..) the application number appearing and I don’t know if this is a good idea with respect to systems which should be able to run on wotaskd *AND* servlet. At the very least, it should be noted that this will not work with a servlet WebObjects application. I think the "application number" should absolutely not be depended upon in the general.
If you use, for example, the Apache 2.2 mod_balancer or Apache 1's mod_jk, the front-end web-server will load-balance the requests over a number of containers -- eg; Jetty or Tomcat. Each container in the cluster gets an identifier (basically an "instance number") and if a request creates or references a session then the URL's generated will contain a path back to the specific container where the session lives. The reference is in the URL like this...
.../MyApp.woa/wo/4.2.13.0;jsessionid=H6qOeduw.7771as1?key=value
...but is ultimately parsed by the load balancer. This means that sessions do not need to be serialised between containers as the requests are sticky to specific container.
Although not directly applicable, section 10 of...
...maybe interesting for you to read over. It describes an AJP adaptor I wrote some years ago which allows a standard WOA to integrate into this sort of deployment using the AJP protocol, but the same concepts apply to servlet. Note also that I am fairly sure the transport between the front-end web-servers' load-balancers and the containers can be HTTP or AJP – this is not AJP specific.
Apache 2.2 also has a "balancer manager" service which allows you to turn containers on and off in terms of routing of traffic.
Put some stuff into or augment the wiki if you take this path.
cheers.