yes i fixed it.
But still the spec doesn't say that i can't ask for the id of the session that was invalidated
Why give the session object with the event if you can't ask or do anything with it.
thats just strange.

johan


On 3/9/06, Ingram Chen <[EMAIL PROTECTED]> wrote:
This happened after session expired or explicitly invalidated.

excerpt from Servlet spec 2.3:

"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
invalidatd or expired."


public class WebSession {
    public void valueUnbound(HttpSessionBindingEvent event)
    {
        //One should not call session.getId() on invalidated session.
        String id = event.getSession().getId();
        Application application = getApplication();
        //.....
    }
}


On 3/9/06, Ingram Chen < [EMAIL PROTECTED]> wrote:
All,

   I upgrade to 1.2beta1 but found session produce invalidataion error occasionally :

2006/3/9 下午 04:42:13 org.apache.catalina.core.ContainerBase backgroundProcess
Warn: Exception processing manager [EMAIL PROTECTED] background process
java.lang.IllegalStateException: getId: Session already invalidated
    at org.apache.catalina.session.StandardSession.getId(StandardSession.java:328)
    at org.apache.catalina.session.StandardSessionFacade.getId(StandardSessionFacade.java:78)
    at wicket.protocol.http.WebSession.valueUnbound(WebSession.java:144)
    at org.apache.catalina.session.StandardSession.removeAttributeInternal (StandardSession.java:1607)
    at org.apache.catalina.session.StandardSession.expire(StandardSession.java:737)
    at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:577)
    at org.apache.catalina.session.ManagerBase.processExpires (ManagerBase.java:678)
    at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:663)
    at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1283)

I can't reproduce this problem exactly and still invetigate it why this happen...
Is there anybody experience same problem ?

(test on tomcat 5.5.12)

--
Ingram Chen
Java [EMAIL PROTECTED]
Institue of BioMedical Sciences Academia Sinica Taiwan
blog: http://www.javaworld.com.tw/roller/page/ingramchen



--
Ingram Chen
Java [EMAIL PROTECTED]
Institue of BioMedical Sciences Academia Sinica Taiwan
blog: http://www.javaworld.com.tw/roller/page/ingramchen

Reply via email to