I sent the patch quite some time back now, so I'm not sure where it is.

Being similarly lazy I'm attaching an excerpt of the patched StandardSession.java (from 5.5.23) with changes embedded in it.

Mark Thomas wrote:
Jess Holle wrote:
The HttpSession activation and passivation listeners in Tomcat are
/quite/ broken -- at least last time I checked.

I've been in the habit of patching this part of the code.  I submitted a
patch once, but I mixed in a few other things that were broken in this
area and it was not accepted -- and I've not taken time to slice up my
patch into many smaller ones so they can be individually rejected :-)

I'm being lazy - can you point me towards your patch. I've looked at this a
couple of times and I thought we had it working correctly. If there is
still work to do I will take a look.

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



    /**
     * Perform the internal processing required to passivate
     * this session.
     */
    public void passivate() {

        // Notify interested session event listeners
        fireSessionEvent(Session.SESSION_PASSIVATED_EVENT, null);

        // Notify ActivationListeners
        // changes from here on
        Context context = (Context) manager.getContainer();
        Object listeners[] = context.getApplicationLifecycleListeners();
        if (listeners != null) {
          HttpSessionEvent event =
            new HttpSessionEvent(getSession());
          for (int i = 0; i < listeners.length; i++) {
            if (!(listeners[i] instanceof HttpSessionActivationListener))
              continue;
            try {
              ((HttpSessionActivationListener)listeners[i])
                .sessionWillPassivate(event);
            } catch (Throwable t) {
              manager.getContainer().getLogger().error
                (sm.getString("standardSession.sessionEvent"), t);
            }
          }
        }

    }


    /**
     * Perform internal processing required to activate this
     * session.
     */
    public void activate() {

        // Notify interested session event listeners
        fireSessionEvent(Session.SESSION_ACTIVATED_EVENT, null);

        // Notify ActivationListeners
        // changes from here on
        Context context = (Context) manager.getContainer();
        Object listeners[] = context.getApplicationLifecycleListeners();
        if (listeners != null) {
          HttpSessionEvent event =
            new HttpSessionEvent(getSession());
          for (int i = 0; i < listeners.length; i++) {
            if (!(listeners[i] instanceof HttpSessionActivationListener))
              continue;
            try {
              ((HttpSessionActivationListener)listeners[i])
                .sessionDidActivate(event);
            } catch (Throwable t) {
              manager.getContainer().getLogger().error
                (sm.getString("standardSession.sessionEvent"), t);
            }
          }
        }

    }

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to