What kind of connection is returned from pool, after this second request?
The answer is "an opened connection", because I assume the user submits the
second page within the 30 minutes and you use the default settings (min pool
size is 1). So if he is alone on your site, he will never use a closed
connection.
With the default settings, exactly one connection is opened when WebSphere
starts and maximum 10 connections will be opened. When a connection has been
used, it returns to the pool and remains opened for 1800 seconds (idle
timeout). So if the application issues exactly one request at a time at
least every 30 minutes, exactly one connection will be created ever, and it
will remain opened all the time.
Now let's say person B comes to the web site while person A continues to
work. B will have to pay the price for a second connection *when both users
hit the submit button at the same time* because the pool has to grow from
one to two opened connection. Afterwards, two connections are opened and two
concurrent requests can be served. Now imagine person B goes away for lunch,
while A stays working at his desk. When B comes back, the pool only has one
connection left (due to the idle timeout). Then B will have to pay the price
to open a second connection *when both users hit the submit button at the
same time*. Then the pool has two connections.
But usually, users won't hit the submit button at the same time and you can
imagine that the first request will be served so rapidly that the second can
be issued with the same connection. And that's exactly the idea behind
pooling: it is not likely that all users will need a connection at the same
time. So, basically, you don't need one connection per user and you'll want
to tune the pool size and the timeouts to reduce overhead of opening
connections while limiting resource usage.
It can come from another user, or from the same user!
In the first case it is concurrent, and in the second it is subsequent!
No, to me "two subsequent requests" means "two requests executed one after
the other", while "two concurrent request" means "two requests at the same
time". Whether it's the same user or not is not relevant. What is relevant
is the moment when the requests are issued. The pool manager doesn't bother
knowing who uses the connection. It just has connections and gives one when
requested, provided one is available.
Thanks very much for your patience
Be my guest. By the way, you may want to read the "WebSphere Connection
Pooling paper" (topic 2, d at
http://www7b.software.ibm.com/wsdd/library/techarticles/0305_issw/recommendedreading.html#sec2).
It discusses the lifecycle of the pool, the settings, etc.