2011/1/21 Mark Thomas <ma...@apache.org>:
>> How can endAccess throw an exception ?
>
> I asked myself exactly the same question when I read the bug report. My
> conclusion was:
> - StandardSession - it can't unless there is a bug
> - DeltaSession - it can't unless there is a bug
> - Custom session implementation - who knows
>
> It seemed reasonable to add the protection for the custom case
>

StandardSession  -- can StandardSession#accessCount be null? This
field is declared transient.

ReplicatedSession = StandardSession (does not override the method)

DeltaSession -- DeltaManager#registerSessionAtReplicationValve() call
there is not trivial, though I do not see evident issues there. May be
the following:
in ReplicationValve# registerReplicationSession() has the following code:

                if(log.isDebugEnabled())

log.debug(sm.getString("ReplicationValve.crossContext.registerSession",
                        session.getIdInternal(),
                        session.getManager().getContainer().getName()));

If debug logging is enabled and session.recycle() was already called,
session.getManager() will return null.


Anyway as
  a) custom components can be involved there
  b) endAccess() is not a trivial method to be used in recycle()
it would be better to safeguard it.


Backporting the fix to 5.5 waits for the third vote.


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to