Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001402 [Resin] major always 10-11-06 04:03 01-04-07 12:03
Reporter slonopotamus View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.1.1 Product Version 3.0.22
  Product Build
Summary 0001402: valueBound should not be invoked when session is read from persistent store
Description Java Servlet Specification Version 2.4
SRV.15.1.7 HttpSession
=====
When an application stores an object in or removes an object from a session, the
session checks whether the object implements HttpSessionBindingListener .
If it does, the servlet notifies the object that it has been bound to or unbound from
the session. Notifications are sent after the binding methods complete. For session
that are invalidated or expire, notifications are sent after the session has been
invalidated or expired.
=====

But Resin notifies the object when it is read from persistent store.

I suppose the same applies to HttpSessionAttributeListener because reading from persistent store invokes HttpSession#setAttribute.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0001541)
slonopotamus
10-11-06 05:16

Workaround:

  private static boolean haveResinBug1402 () {
    for (final StackTraceElement element : Thread.currentThread ().getStackTrace ()) {
      if (element.getMethodName ().equals ("load") && element.getClassName ().equals ("com.caucho.server.session.SessionImpl")) {
        return true;
      }
    }
    return false;
  }

  public void valueBound (final HttpSessionBindingEvent event) {
    if (!haveResinBug1402 ()) {
      ...
    }
  }
  public void valueUnbound (final HttpSessionBindingEvent event) {
    if (!haveResinBug1402 ()) {
      ...
    }
  }
 
(0001542)
slonopotamus
10-12-06 07:36

Oops, Resin version is 3.0.21
 
(0001701)
ferg
01-04-07 12:03

server/015o
 

- Issue History
Date Modified Username Field Change
10-11-06 04:03 slonopotamus New Issue
10-11-06 04:03 slonopotamus Issue Monitored: slonopotamus
10-11-06 05:16 slonopotamus Note Added: 0001541
10-12-06 07:36 slonopotamus Note Added: 0001542
01-04-07 12:03 ferg Note Added: 0001701
01-04-07 12:03 ferg Assigned To  => ferg
01-04-07 12:03 ferg Status new => closed
01-04-07 12:03 ferg Resolution open => fixed
01-04-07 12:03 ferg Fixed in Version  => 3.1.1


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
34 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker