Ben Parker wrote:
> Calls to forward() will invoke the complete awake/respond/sleep cycle
> within the outer awake/respond/sleep cycle of the parent transaction.
> This means that if a servlet forwards a request to another servlet, then
> the session will be awakened twice and put to sleep twice (or more
> depending on the number of forward calls). This was causing some issues
> in our application because we use database sessions, but it would apply
> to anyone using the SessionFileStore as well.
the transaction actually awake()s the session only if it does not exist,
so it should not happen twice. Can you check that again? But I think
you're right about sleep(). Transaction.awake() should really increase a
counter if it does not awake the session because it already exists, and
Transaction.sleep() should decrease the counter and send the session to
sleep if it reaches zero. Would this solve your problem?